all repos — mgba @ 40f87518be2d84bcfa650d55568ee39c2ac6294d

mGBA Game Boy Advance Emulator

Qt: Don't link against SDLMAIN, Qt already handles that. (#551)

waddlesplash waddlesplash@gmail.com
Wed, 29 Mar 2017 23:46:20 -0400
commit

40f87518be2d84bcfa650d55568ee39c2ac6294d

parent

874ad93f4dba11722ccfb02aa7a3533777d8e03e

2 files changed, 8 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/CMakeLists.txtsrc/platform/qt/CMakeLists.txt

@@ -22,7 +22,7 @@ endif()

if(SDL2_FOUND) link_directories(${SDL2_LIBDIR}) endif() - list(APPEND PLATFORM_LIBRARY ${SDL_LIBRARY} ${SDLMAIN_LIBRARY}) + list(APPEND PLATFORM_LIBRARY ${SDL_LIBRARY}) list(APPEND PLATFORM_SRC ${PLATFORM_SRC} ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-events.c ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-audio.c) include_directories(${SDL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/platform/sdl) endif()
M src/platform/qt/main.cppsrc/platform/qt/main.cpp

@@ -3,6 +3,10 @@ *

* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// This must be defined before anything else is included. +#define SDL_MAIN_HANDLED + #include "GBAApp.h" #include "Window.h"

@@ -22,6 +26,9 @@ #endif

#endif int main(int argc, char* argv[]) { +#ifdef BUILD_SDL + SDL_SetMainReady(); +#endif QGBA::GBAApp application(argc, argv); QLocale locale = QLocale::system();