general: limit gamemode to Linux after 5eec980a2d
FAILED: bin/yuzu ld: error: unable to find library -lgamemode FAILED: bin/yuzu-cmd ld: error: undefined symbol: Common::Linux::StartGamemode() >>> referenced by yuzu.cpp >>> src/yuzu_cmd/CMakeFiles/yuzu-cmd.dir/yuzu.cpp.o:(main) ld: error: undefined symbol: Common::Linux::StopGamemode() >>> referenced by yuzu.cpp >>> src/yuzu_cmd/CMakeFiles/yuzu-cmd.dir/yuzu.cpp.o:(main)
This commit is contained in:
parent
9dc9aaf4af
commit
63fe09cf6c
3 changed files with 17 additions and 10 deletions
|
@ -386,7 +386,10 @@ if (NOT WIN32)
|
||||||
target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::DBus gamemode)
|
target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::DBus)
|
||||||
|
endif()
|
||||||
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
target_link_libraries(yuzu PRIVATE gamemode)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(yuzu PRIVATE
|
target_compile_definitions(yuzu PRIVATE
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef __linux__
|
||||||
#include "common/linux/gamemode.h"
|
#include "common/linux/gamemode.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -320,6 +322,8 @@ GMainWindow::GMainWindow(std::unique_ptr<QtConfig> config_, bool has_broken_vulk
|
||||||
provider{std::make_unique<FileSys::ManualContentProvider>()} {
|
provider{std::make_unique<FileSys::ManualContentProvider>()} {
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
SetupSigInterrupts();
|
SetupSigInterrupts();
|
||||||
|
#endif
|
||||||
|
#ifdef __linux__
|
||||||
SetGamemodeEnabled(Settings::values.enable_gamemode.GetValue());
|
SetGamemodeEnabled(Settings::values.enable_gamemode.GetValue());
|
||||||
#endif
|
#endif
|
||||||
system->Initialize();
|
system->Initialize();
|
||||||
|
@ -2122,7 +2126,7 @@ void GMainWindow::OnEmulationStopped() {
|
||||||
|
|
||||||
discord_rpc->Update();
|
discord_rpc->Update();
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
Common::Linux::StopGamemode();
|
Common::Linux::StopGamemode();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3509,7 +3513,7 @@ void GMainWindow::OnStartGame() {
|
||||||
|
|
||||||
discord_rpc->Update();
|
discord_rpc->Update();
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
Common::Linux::StartGamemode();
|
Common::Linux::StartGamemode();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -3533,7 +3537,7 @@ void GMainWindow::OnPauseGame() {
|
||||||
UpdateMenuState();
|
UpdateMenuState();
|
||||||
AllowOSSleep();
|
AllowOSSleep();
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
Common::Linux::StopGamemode();
|
Common::Linux::StopGamemode();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -3817,7 +3821,7 @@ void GMainWindow::OnConfigure() {
|
||||||
const auto old_theme = UISettings::values.theme;
|
const auto old_theme = UISettings::values.theme;
|
||||||
const bool old_discord_presence = UISettings::values.enable_discord_presence.GetValue();
|
const bool old_discord_presence = UISettings::values.enable_discord_presence.GetValue();
|
||||||
const auto old_language_index = Settings::values.language_index.GetValue();
|
const auto old_language_index = Settings::values.language_index.GetValue();
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
const bool old_gamemode = Settings::values.enable_gamemode.GetValue();
|
const bool old_gamemode = Settings::values.enable_gamemode.GetValue();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3881,7 +3885,7 @@ void GMainWindow::OnConfigure() {
|
||||||
if (UISettings::values.enable_discord_presence.GetValue() != old_discord_presence) {
|
if (UISettings::values.enable_discord_presence.GetValue() != old_discord_presence) {
|
||||||
SetDiscordEnabled(UISettings::values.enable_discord_presence.GetValue());
|
SetDiscordEnabled(UISettings::values.enable_discord_presence.GetValue());
|
||||||
}
|
}
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
if (Settings::values.enable_gamemode.GetValue() != old_gamemode) {
|
if (Settings::values.enable_gamemode.GetValue() != old_gamemode) {
|
||||||
SetGamemodeEnabled(Settings::values.enable_gamemode.GetValue());
|
SetGamemodeEnabled(Settings::values.enable_gamemode.GetValue());
|
||||||
}
|
}
|
||||||
|
@ -5194,7 +5198,7 @@ void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
|
||||||
discord_rpc->Update();
|
discord_rpc->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
void GMainWindow::SetGamemodeEnabled(bool state) {
|
void GMainWindow::SetGamemodeEnabled(bool state) {
|
||||||
if (emulation_running) {
|
if (emulation_running) {
|
||||||
Common::Linux::SetGamemodeState(state);
|
Common::Linux::SetGamemodeState(state);
|
||||||
|
|
|
@ -63,7 +63,7 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
#include "common/linux/gamemode.h"
|
#include "common/linux/gamemode.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ int main(int argc, char** argv) {
|
||||||
exit(0);
|
exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
Common::Linux::StartGamemode();
|
Common::Linux::StartGamemode();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ int main(int argc, char** argv) {
|
||||||
void(system.Pause());
|
void(system.Pause());
|
||||||
system.ShutdownMainProcess();
|
system.ShutdownMainProcess();
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __linux__
|
||||||
Common::Linux::StopGamemode();
|
Common::Linux::StopGamemode();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue