Skip to content

Commit

Permalink
Treat all keys as a CmdKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan McGrath committed Feb 18, 2024
1 parent bee2123 commit b5ef0e8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/FNAPlatform/SDL2_FNAPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ protected override void CreateHandle()
FNALoggerEXT.LogWarn(e.ToString());
}
}

protected override bool ProcessCmdKey (
ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
WndProc(ref msg);
return true;
}
}
private static Dictionary<IntPtr, HackForm> forms = new Dictionary<IntPtr, HackForm>();

Expand Down Expand Up @@ -145,6 +152,10 @@ public static string ProgramInit(LaunchParameters args)
"1"
);
}
SDL.SDL_SetHint(
SDL.SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP,
"0"
);
}

/* Mount TitleLocation.Path */
Expand Down Expand Up @@ -1010,6 +1021,7 @@ ref bool textInputSuppress
) {
SDL.SDL_Event evt;
char* charsBuffer = stackalloc char[32]; // SDL_TEXTINPUTEVENT_TEXT_SIZE
System.Windows.Forms.Application.DoEvents();
while (SDL.SDL_PollEvent(out evt) == 1)
{
// Keyboard
Expand Down

0 comments on commit b5ef0e8

Please sign in to comment.