Fixed duplication of NvOptimusEnablement if both frontends are enabled

This commit is contained in:
OpenSauce04 2024-10-24 13:22:13 +01:00
parent aa2bf65a83
commit 9697485039
3 changed files with 7 additions and 12 deletions

View File

@ -7,6 +7,13 @@
#include "lime_sdl/lime_sdl.h"
#endif
#ifdef _WIN32
extern "C" {
// tells Nvidia drivers to use the dedicated GPU by default on laptops with switchable graphics
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
}
#endif
int main(int argc, char* argv[]) {
#if ENABLE_QT
bool no_gui = false;

View File

@ -117,13 +117,6 @@
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
#endif
#ifdef _WIN32
extern "C" {
// tells Nvidia drivers to use the dedicated GPU by default on laptops with switchable graphics
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
}
#endif
#ifdef HAVE_SDL2
#include <SDL.h>
#endif

View File

@ -60,11 +60,6 @@
#include <windows.h>
#include <shellapi.h>
extern "C" {
// tells Nvidia drivers to use the dedicated GPU by default on laptops with switchable graphics
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
}
#endif
static void PrintHelp(const char* argv0) {