diff --git a/src/console.c b/src/console.c index 56bf5a36d..6fb3294f1 100644 --- a/src/console.c +++ b/src/console.c @@ -638,68 +638,28 @@ INT32 CON_ShiftChar(INT32 ch) if (I_UseNativeKeyboard()) return ch; - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) - { - if (cv_keyboardlayout.value == 3) - { - if (shiftdown ^ capslock) - ch = shiftxform[ch]; - else if (altdown & 0x2) - ch = french_altgrxform[ch]; - else - ch = HU_FallBackFrSpecialLetter(ch); - } - else - { - if (shiftdown ^ capslock) - ch = shiftxform[ch]; - } - } - else // if we're holding shift we should still shift non letter symbols - { - if (cv_keyboardlayout.value == 3) - { - if (shiftdown) - ch = shiftxform[ch]; - else if (altdown & 0x2) - ch = french_altgrxform[ch]; - else - ch = HU_FallBackFrSpecialLetter(ch); - } - else - { - if (shiftdown) - ch = shiftxform[ch]; - } - } - - return ch; -} - -INT32 CON_ShitAndAltGrChar(INT32 ch) -{ if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) { if (shiftdown ^ capslock) ch = shiftxform[ch]; } - else // if we're holding shift we should still shift non letter symbols + else // if we're holding shift we should still shift non letter symbols { if (shiftdown) ch = shiftxform[ch]; - else if (altdown & 0x2) + else if (cv_keyboardlayout.value == 3) { - ch = french_altgrxform[ch]; - } - else - { - ch = HU_FallBackFrSpecialLetter(ch); + if (altdown & 0x2) + ch = french_altgrxform[ch]; + else + ch = HU_FallBackFrSpecialLetter(ch); } } return ch; } + // Clear time of console heads up messages // void CON_ClearHUD(void) @@ -892,7 +852,7 @@ boolean CON_Responder(event_t *ev) return true; // ctrl modifier -- changes behavior, adds shortcuts - if ((cv_keyboardlayout.value != 3 && ctrldown) || (cv_keyboardlayout.value == 3 && ctrldown && !altdown)) + if (ctrldown && (cv_keyboardlayout.value != 3 || (cv_keyboardlayout.value == 3 && !altdown))) { // show all cvars/commands that match what we have inputted if (key == KEY_TAB) diff --git a/src/console.h b/src/console.h index d6d08be44..5dd189e28 100644 --- a/src/console.h +++ b/src/console.h @@ -49,7 +49,6 @@ extern UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *or extern UINT8 *consolebgmap; INT32 CON_ShiftChar(INT32 ch); -INT32 CON_ShitAndAltGrChar(INT32 ch); void CON_SetupBackColormap(void); void CON_ClearHUD(void); // clear heads up messages diff --git a/src/d_main.c b/src/d_main.c index 94e945e8b..356710ffb 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1318,7 +1318,7 @@ void D_AddPostloadFiles(void) static boolean AddIWAD(const char * file, const char *dir) { - char * path = va(pandf, dir, file); + char *path = va(pandf, dir, file); if (FIL_ReadFileOK(path)) { diff --git a/src/m_menu.c b/src/m_menu.c index b81cffb29..e2adba64e 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -7955,7 +7955,7 @@ static void M_DrawSetupMultiPlayerMenu(void) patch_t *statbg = (patch_t *)W_CachePatchName("K_STATBG", PU_PATCH); patch_t *statlr = (patch_t *)W_CachePatchName("K_STATLR", PU_PATCH); patch_t *statud = (patch_t *)W_CachePatchName("K_STATUD", PU_PATCH); - patch_t *statdot = (patch_t *)W_CachePatchName("K_SDOT0", PU_PATCH); + patch_t *statdot = (patch_t *)W_CachePatchName("K_SDOT0" , PU_PATCH); patch_t *patch; UINT8 frame; UINT8 speed; diff --git a/src/m_textinput.c b/src/m_textinput.c index 7d050dfc7..c49294094 100644 --- a/src/m_textinput.c +++ b/src/m_textinput.c @@ -256,7 +256,7 @@ static boolean M_TextInputHandleBase(textinput_t *input, INT32 key, boolean emot return true; } - if ((cv_keyboardlayout.value != 3 && ctrldown) || (cv_keyboardlayout.value == 3 && ctrldown && !altdown)) + if (ctrldown && (cv_keyboardlayout.value != 3 || (cv_keyboardlayout.value == 3 && !altdown))) { if (key == 'x' || key == 'X') { @@ -392,7 +392,7 @@ static boolean M_TextInputHandleBase(textinput_t *input, INT32 key, boolean emot key = '/'; // same capslock code as hu_stuff.c's HU_responder. Check there for details. - key = cv_keyboardlayout.value == 3 ? CON_ShitAndAltGrChar(key) : CON_ShiftChar(key); + key = CON_ShiftChar(key); // enter a char into the command prompt if (key < 32 || key > 127)