mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-15 04:06:57 +02:00
[cmake] Start requiring SDL2 (#3632)
Closes #3466 Like said in the issue and the OpenSSL equivalent, disabling SDL2 on desktop is just not something we want to do. It's not worth the added burden of supporting the n+1'th matrix. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3632 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
7758f70833
commit
f25582833a
8 changed files with 33 additions and 58 deletions
|
|
@ -431,11 +431,6 @@ if (WIN32 AND NOT YUZU_USE_BUNDLED_QT)
|
|||
add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/eden.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0)
|
||||
endif()
|
||||
|
||||
if (ENABLE_SDL2)
|
||||
target_link_libraries(yuzu PRIVATE SDL2::SDL2)
|
||||
target_compile_definitions(yuzu PRIVATE HAVE_SDL2)
|
||||
endif()
|
||||
|
||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||
target_link_libraries(yuzu PRIVATE dynarmic::dynarmic)
|
||||
endif()
|
||||
|
|
@ -454,6 +449,6 @@ if (NOT MSVC AND (APPLE OR NOT YUZU_STATIC_BUILD))
|
|||
endif()
|
||||
|
||||
# Remember that the linker is incredibly stupid.
|
||||
target_link_libraries(yuzu PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
target_link_libraries(yuzu PRIVATE OpenSSL::SSL OpenSSL::Crypto SDL2::SDL2)
|
||||
|
||||
create_target_directory_groups(yuzu)
|
||||
|
|
|
|||
|
|
@ -149,9 +149,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
|||
#include "video_core/renderer_base.h"
|
||||
#include "video_core/shader_notify.h"
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
#include <boost/container/flat_set.hpp>
|
||||
|
||||
|
|
@ -602,7 +600,7 @@ MainWindow::MainWindow(bool has_broken_vulkan)
|
|||
VkDeviceInfo::PopulateRecords(vk_device_records, this->window()->windowHandle());
|
||||
}
|
||||
|
||||
#if defined(HAVE_SDL2) && !defined(_WIN32)
|
||||
#if !defined(_WIN32)
|
||||
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
||||
|
||||
// Set a screensaver inhibition reason string. Currently passed to DBus by SDL and visible to
|
||||
|
|
@ -1881,7 +1879,7 @@ void MainWindow::OnSigInterruptNotifierActivated() {
|
|||
void MainWindow::PreventOSSleep() {
|
||||
#ifdef _WIN32
|
||||
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
||||
#elif defined(HAVE_SDL2)
|
||||
#else
|
||||
SDL_DisableScreenSaver();
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1889,7 +1887,7 @@ void MainWindow::PreventOSSleep() {
|
|||
void MainWindow::AllowOSSleep() {
|
||||
#ifdef _WIN32
|
||||
SetThreadExecutionState(ES_CONTINUOUS);
|
||||
#elif defined(HAVE_SDL2)
|
||||
#else
|
||||
SDL_EnableScreenSaver();
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue