mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Windows: Make layout switch duplicate guard bidirectional.
git-svn-id: https://svn.eduke32.com/eduke32@5971 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d0611405e9
commit
fefd94d8ef
1 changed files with 10 additions and 10 deletions
|
@ -281,21 +281,21 @@ void Win_GetOriginalLayoutName(void)
|
|||
|
||||
void Win_SetKeyboardLayoutUS(int const toggle)
|
||||
{
|
||||
if (toggle)
|
||||
{
|
||||
static int done = 0;
|
||||
static int currentstate;
|
||||
|
||||
if (!done)
|
||||
if (toggle != currentstate)
|
||||
{
|
||||
if (toggle)
|
||||
{
|
||||
// 00000409 is "American English"
|
||||
switchlayout("00000409");
|
||||
|
||||
done = 1;
|
||||
}
|
||||
currentstate = toggle;
|
||||
}
|
||||
else if (OriginalLayoutName[0])
|
||||
{
|
||||
switchlayout(OriginalLayoutName);
|
||||
currentstate = toggle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue