Skip to content

Commit

Permalink
Force start with dedicated Graphics Card
Browse files Browse the repository at this point in the history
  • Loading branch information
AshKetshup committed May 15, 2024
1 parent 8a32267 commit ccc26c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MarchGL/MarchGL.sln
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Global
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release All Platforms|x86.Build.0 = Release All Platforms|Win32
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|ARM.ActiveCfg = Release|ARM
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|ARM.Build.0 = Release|ARM
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|x64.ActiveCfg = Debug|x64
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|x64.Build.0 = Debug|x64
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|x64.ActiveCfg = Release|x64
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|x64.Build.0 = Release|x64
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|x86.ActiveCfg = Release|Win32
{A7B998F8-8331-4269-B318-1D7E813A2199}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
Expand Down
8 changes: 8 additions & 0 deletions MarchGL/MarchGL/src/marchgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
namespace fs = std::filesystem;
#endif

extern "C" {
// AMD GPU code should take this code path
__declspec( dllexport ) int AmdPowerXpressRequestHighPerformance = 1;
// Nvidia takes this code path
__declspec( dllexport ) unsigned long NvOptimusEnablement = 0x00000001;
}


static void PushStyleCompact() {
ImGuiStyle& style = ImGui::GetStyle();
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(style.FramePadding.x, (float) (int) ( style.FramePadding.y * 0.60f )));
Expand Down

0 comments on commit ccc26c9

Please sign in to comment.