Added full screen mode
This commit is contained in:
1 parent
348aa632dd
commit
2ee288cbe0
3 files changed
+12
-3
No files matched your search
@@ -5,6 +5,10 @@ project(space-game001 LANGUAGES C CXX)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Build option (Windows-only): when ON, the game launches in fullscreen.
|
||||
# When OFF (default), it launches in a 1280x720 window like before.
|
||||
option(FULLSCREEN "Launch the game in fullscreen mode" OFF)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/ThirdParty.cmake)
|
||||
|
||||
# ===========================================
|
||||
@@ -100,6 +104,10 @@ target_compile_definitions(space-game001 PRIVATE
|
||||
# SHOW_PATH
|
||||
)
|
||||
|
||||
if(FULLSCREEN)
|
||||
target_compile_definitions(space-game001 PRIVATE FULLSCREEN)
|
||||
endif()
|
||||
|
||||
# Линкуем с SDL2main, если он вообще установлен
|
||||
target_link_libraries(space-game001 PRIVATE SDL2main_external_lib)
|
||||
|
||||
|
||||
Reference in new issue
Block a user