Commit b085c193 authored by sairuk's avatar sairuk
Browse files

Added cmake files for Debian and Raspberry Pi, ESC key now returns to the menu...

Added cmake files for Debian and Raspberry Pi, ESC key now returns to the menu when menu is enabled in config, will exit if menu is disabled.
parent 4b16481a
# Default CMake Setup. Used for Debian Builds.
set(lib_base /usr/include)
set(sdl_root ${lib_base}/SDL)
include_directories("${sdl_root}")
link_libraries(cannonball
SDL
SDLmain
)
# Linking
link_directories(
"${sdl_root}/lib"
)
# Location for Cannonball to create save files
# Used to auto-generate setup.hpp with various file paths
set(xml_directory ./)
set(sdl_flags "SDL_DOUBLEBUF | SDL_SWSURFACE")
# Default CMake Setup. Used for Raspberry Pi (Raspbian) Builds.
set(lib_base /usr/include)
set(sdl_root ${lib_base}/SDL)
include_directories("${sdl_root}")
link_libraries(cannonball
SDL
SDLmain
)
# Linking
link_directories(
"${sdl_root}/lib"
)
add_definitions(-O3 -march=armv6 -mfpu=vfp -mfloat-abi=hard)
# Location for Cannonball to create save files
# Used to auto-generate setup.hpp with various file paths
set(xml_directory ./)
set(sdl_flags "SDL_DOUBLEBUF | SDL_HWSURFACE")
......@@ -61,7 +61,7 @@ static void process_events(void)
case SDL_KEYDOWN:
// Handle key presses.
if (event.key.keysym.sym == SDLK_ESCAPE)
quit_func(0);
state = config.menu.enabled ? STATE_INIT_MENU : STATE_QUIT;
else
input.handle_key_down(&event.key.keysym);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment