mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-08-15 18:27:29 +00:00
Fix: Old bug - uninitialised local static! (bFreshReset)
Change: Better formatting
This commit is contained in:
@@ -166,16 +166,17 @@ DWORD KeybGetNumQueries () // Used in determining 'idleness' of Apple system
|
||||
//===========================================================================
|
||||
void KeybQueueKeypress (int key, BOOL bASCII)
|
||||
{
|
||||
static bool bFreshReset;
|
||||
static bool bFreshReset = false;
|
||||
|
||||
if (bASCII == ASCII)
|
||||
{
|
||||
if (bFreshReset && key == 0x03)
|
||||
{
|
||||
bFreshReset = 0;
|
||||
bFreshReset = false;
|
||||
return; // Swallow spurious CTRL-C caused by CTRL-BREAK
|
||||
}
|
||||
bFreshReset = 0;
|
||||
|
||||
bFreshReset = false;
|
||||
if (key > 0x7F)
|
||||
return;
|
||||
|
||||
@@ -223,6 +224,7 @@ void KeybQueueKeypress (int key, BOOL bASCII)
|
||||
}
|
||||
//Remap some keys for Pravets8A/C, which has a different charset for Pravtes82/M, whose keys MUST NOT be remapped.
|
||||
if (g_Apple2Type == A2TYPE_PRAVETS8A) //&& (g_bCapsLock == false))
|
||||
{
|
||||
if (g_bCapsLock == false) //i.e. cyrillic letters
|
||||
{
|
||||
if (key == '[') keycode = '{';
|
||||
@@ -258,12 +260,15 @@ void KeybQueueKeypress (int key, BOOL bASCII)
|
||||
if ((key == '[') || (key == ']') || (key == 92) || (key == '^') || (key == 95))
|
||||
P8Shift= true;
|
||||
if (key == 96) //This line shall generate sth. else i.e. ` In fact. this character is not generateable by the pravets keyboard.
|
||||
{keycode = '^';
|
||||
P8Shift= true;}
|
||||
{
|
||||
keycode = '^';
|
||||
P8Shift= true;
|
||||
}
|
||||
if (key == 126) keycode = '^';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_Apple2Type == A2TYPE_PRAVETS8A)
|
||||
@@ -298,7 +303,7 @@ void KeybQueueKeypress (int key, BOOL bASCII)
|
||||
#endif
|
||||
|
||||
CpuReset();
|
||||
bFreshReset = 1;
|
||||
bFreshReset = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user