mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +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)
|
void Win_SetKeyboardLayoutUS(int const toggle)
|
||||||
{
|
{
|
||||||
if (toggle)
|
static int currentstate;
|
||||||
{
|
|
||||||
static int done = 0;
|
|
||||||
|
|
||||||
if (!done)
|
if (toggle != currentstate)
|
||||||
|
{
|
||||||
|
if (toggle)
|
||||||
{
|
{
|
||||||
// 00000409 is "American English"
|
// 00000409 is "American English"
|
||||||
switchlayout("00000409");
|
switchlayout("00000409");
|
||||||
|
currentstate = toggle;
|
||||||
done = 1;
|
}
|
||||||
|
else if (OriginalLayoutName[0])
|
||||||
|
{
|
||||||
|
switchlayout(OriginalLayoutName);
|
||||||
|
currentstate = toggle;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (OriginalLayoutName[0])
|
|
||||||
{
|
|
||||||
switchlayout(OriginalLayoutName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue