Fix: Old bug - uninitialised local static! (bFreshReset)

Change: Better formatting
This commit is contained in:
tomch
2008-07-26 21:52:35 +00:00
parent bc36b0afd3
commit d2749a9c44

View File

@@ -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;
}