Skip to content

Commit

Permalink
RMG-Input: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 authored Dec 29, 2024
1 parent c102aa0 commit 1d69338
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/RMG-Input/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ static void *l_DebugCallContext = nullptr;
// keyboard state
static bool l_KeyboardState[SDL_NUM_SCANCODES];

// config GUI state
static bool l_ConfigGuiOpen = false;

//
// Local Functions
//
Expand Down Expand Up @@ -1076,6 +1079,8 @@ EXPORT m64p_error CALL PluginConfig2(int romConfig)
return M64ERR_NOT_INIT;
}

l_ConfigGuiOpen = true;

// close controllers
close_controllers();

Expand Down Expand Up @@ -1112,6 +1117,8 @@ EXPORT m64p_error CALL PluginConfig2(int romConfig)
// open controllers
open_controllers();

l_ConfigGuiOpen = false;

return M64ERR_SUCCESS;
}

Expand Down Expand Up @@ -1186,7 +1193,7 @@ EXPORT void CALL GetKeys(int Control, BUTTONS* Keys)
{
InputProfile* profile = &l_InputProfiles[Control];

if (!profile->PluggedIn)
if (!profile->PluggedIn || l_ConfigGuiOpen)
{
return;
}
Expand Down

0 comments on commit 1d69338

Please sign in to comment.