From d7832a7d4f09666565571422a190c02d46079e53 Mon Sep 17 00:00:00 2001 From: Plagman Date: Fri, 26 Jan 2007 22:37:48 +0000 Subject: [PATCH] Winlayer keyboard input fix for OSD buffer issues and removed blending in drawrooms. git-svn-id: https://svn.eduke32.com/eduke32@475 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/polymost.c | 2 +- polymer/build/src/winlayer.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 5cab5bdea..9fa90a9d0 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -1681,7 +1681,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method) } if ((!(method&3)) && (!fullbrightdrawingpass)) { - //bglDisable(GL_BLEND); + bglDisable(GL_BLEND); if (!peelcompiling) bglDisable(GL_ALPHA_TEST); } else { diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index 77b9f3cbd..bcdf95272 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -651,6 +651,7 @@ unsigned char bgetchar(void) if (keyasciififoplc == keyasciififoend) return 0; c = keyasciififo[keyasciififoplc]; keyasciififoplc = ((keyasciififoplc+1)&(KEYFIFOSIZ-1)); + //OSD_Printf("bgetchar %d, %d-%d\n",c,keyasciififoplc,keyasciififoend); return c; } @@ -3624,9 +3625,10 @@ static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPA case WM_CHAR: if (((keyasciififoend+1)&(KEYFIFOSIZ-1)) == keyasciififoplc) return 0; + if ((keyasciififoend - keyasciififoplc) > 0) return 0; keyasciififo[keyasciififoend] = (unsigned char)wParam; keyasciififoend = ((keyasciififoend+1)&(KEYFIFOSIZ-1)); - //OSD_Printf("Char %d, %d-%d\n",wParam,keyasciififoplc,keyasciififoend); + //OSD_Printf("WM_CHAR %d, %d-%d\n",wParam,keyasciififoplc,keyasciififoend); return 0; case WM_HOTKEY: