mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
a
This commit is contained in:
parent
6470bc6e4b
commit
5ed6f9135c
2 changed files with 10 additions and 13 deletions
|
|
@ -8,6 +8,7 @@ option(STEAM "Build for Steam" OFF)
|
|||
set(STEAMWORKS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/steamworks" CACHE PATH "Path to Steamworks folder")
|
||||
option(DEBUG "Debug mode" ON)
|
||||
set(SDLTTF_VENDORED ON)
|
||||
set(ZLIB_USE_STATIC_LIBS ON)
|
||||
## Misc setup ##
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
|
@ -138,14 +139,15 @@ set(MAIN_SOURCE
|
|||
if(WIN32)
|
||||
list(APPEND MAIN_SOURCE assets/resources.rc)
|
||||
list(APPEND DEFINES UNICODE)
|
||||
list(APPEND PLATFORM_LIBRARIES Secur32 Shlwapi)
|
||||
list(APPEND PLATFORM_LIBRARIES Secur32 Shlwapi winmm z)
|
||||
#list(APPEND PLATFORM_LIBS winmm z)
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/windows
|
||||
)
|
||||
elseif(APPLE)
|
||||
list(APPEND MAIN_HEADERS src/mac-desktop.h)
|
||||
list(APPEND MAIN_SOURCE src/mac-desktop.mm)
|
||||
else()
|
||||
elseif(LINUX)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LINUXPKGS REQUIRED gtk+-3.0 libxfconf-0)
|
||||
include_directories(${LINUXPKGS_INCLUDE_DIRS})
|
||||
|
|
@ -306,6 +308,7 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32
|
|||
${EMBEDDED_SOURCE}
|
||||
)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(SDL3 CONFIG)
|
||||
find_package(SDL3_image CONFIG)
|
||||
find_package(SDL3_sound CONFIG)
|
||||
|
|
@ -337,11 +340,8 @@ target_include_directories(${PROJECT_NAME}
|
|||
${SIGC2_INCLUDE_DIRS}
|
||||
${Ruby_INCLUDE_DIRS}
|
||||
Boost::boost ${Boost_INCLUDE_DIRS}
|
||||
${VORBISFILE_INCLUDE_DIRS})
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND PLATFORM_LIBS winmm z)
|
||||
endif()
|
||||
${VORBISFILE_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
|
|
@ -354,7 +354,7 @@ target_link_libraries(${PROJECT_NAME}
|
|||
${Ruby_LIBRARIES}
|
||||
Boost::boost ${Boost_LIBRARIES}
|
||||
${VORBISFILE_LIBRARIES}
|
||||
|
||||
ZLIB::ZLIB
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <SDL3/SDL.h>
|
||||
#include <SDL3_image/SDL_image.h>
|
||||
#include <SDL3_ttf/SDL_ttf.h>
|
||||
|
||||
#include <SDL3/SDL_messagebox.h>
|
||||
|
||||
// OS-Specific code
|
||||
#if defined _WIN32
|
||||
|
|
@ -100,7 +100,6 @@ struct linux_DialogData{
|
|||
|
||||
static int linux_dialog(void *rawData){
|
||||
linux_DialogData *data = reinterpret_cast<linux_DialogData*>(rawData);
|
||||
|
||||
// Determine correct flags
|
||||
GtkMessageType gtktype;
|
||||
GtkButtonsType gtkbuttons = GTK_BUTTONS_OK;
|
||||
|
|
@ -135,8 +134,6 @@ static int linux_dialog(void *rawData){
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#elif defined OS_W32
|
||||
/* Convert WCHAR pointer to std::string */
|
||||
static std::string w32_fromWide(const WCHAR *ustr){
|
||||
|
|
@ -466,7 +463,7 @@ bool Oneshot::msgbox(int type, const char *body, const char *title){
|
|||
title = "";
|
||||
#ifdef OS_LINUX
|
||||
linux_DialogData data = {type, body, title, 0};
|
||||
g_idle_add(linux_dialog, &data);
|
||||
gdk_threads_add_idle(linux_dialog, &data);
|
||||
gtk_main();
|
||||
return data.result;
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue