mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-04 23:41:07 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
b03f950c5a
3 changed files with 7 additions and 36 deletions
29
src/d_main.c
29
src/d_main.c
|
@ -187,35 +187,6 @@ UINT8 shiftdown = 0; // 0x1 left, 0x2 right
|
||||||
UINT8 ctrldown = 0; // 0x1 left, 0x2 right
|
UINT8 ctrldown = 0; // 0x1 left, 0x2 right
|
||||||
UINT8 altdown = 0; // 0x1 left, 0x2 right
|
UINT8 altdown = 0; // 0x1 left, 0x2 right
|
||||||
boolean capslock = 0; // gee i wonder what this does.
|
boolean capslock = 0; // gee i wonder what this does.
|
||||||
//
|
|
||||||
// D_ModifierKeyResponder
|
|
||||||
// Sets global shift/ctrl/alt variables, never actually eats events
|
|
||||||
//
|
|
||||||
static inline void D_ModifierKeyResponder(event_t *ev)
|
|
||||||
{
|
|
||||||
if (ev->type == ev_keydown || ev->type == ev_console) switch (ev->data1)
|
|
||||||
{
|
|
||||||
case KEY_LSHIFT: shiftdown |= 0x1; return;
|
|
||||||
case KEY_RSHIFT: shiftdown |= 0x2; return;
|
|
||||||
case KEY_LCTRL: ctrldown |= 0x1; return;
|
|
||||||
case KEY_RCTRL: ctrldown |= 0x2; return;
|
|
||||||
case KEY_LALT: altdown |= 0x1; return;
|
|
||||||
case KEY_RALT: altdown |= 0x2; return;
|
|
||||||
case KEY_CAPSLOCK: capslock = !capslock; return;
|
|
||||||
|
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
else if (ev->type == ev_keyup) switch (ev->data1)
|
|
||||||
{
|
|
||||||
case KEY_LSHIFT: shiftdown &= ~0x1; return;
|
|
||||||
case KEY_RSHIFT: shiftdown &= ~0x2; return;
|
|
||||||
case KEY_LCTRL: ctrldown &= ~0x1; return;
|
|
||||||
case KEY_RCTRL: ctrldown &= ~0x2; return;
|
|
||||||
case KEY_LALT: altdown &= ~0x1; return;
|
|
||||||
case KEY_RALT: altdown &= ~0x2; return;
|
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// D_ProcessEvents
|
// D_ProcessEvents
|
||||||
|
|
|
@ -2002,11 +2002,11 @@ EXPORT void HWRAPI(RenderBatches) (int *sNumPolys, int *sNumVerts, int *sNumCall
|
||||||
boolean stopFlag = false;
|
boolean stopFlag = false;
|
||||||
boolean changeState = false;
|
boolean changeState = false;
|
||||||
boolean changeShader = false;
|
boolean changeShader = false;
|
||||||
GLuint nextShader;
|
GLuint nextShader = 0U;
|
||||||
boolean changeTexture = false;
|
boolean changeTexture = false;
|
||||||
GLuint nextTexture;
|
GLuint nextTexture = 0U;
|
||||||
boolean changePolyFlags = false;
|
boolean changePolyFlags = false;
|
||||||
FBITFIELD nextPolyFlags;
|
FBITFIELD nextPolyFlags = 0U;
|
||||||
boolean changeSurfaceInfo = false;
|
boolean changeSurfaceInfo = false;
|
||||||
FSurfaceInfo nextSurfaceInfo;
|
FSurfaceInfo nextSurfaceInfo;
|
||||||
|
|
||||||
|
|
|
@ -402,7 +402,7 @@ static visplane_t *new_visplane(unsigned hash)
|
||||||
visplane_t *check = freetail;
|
visplane_t *check = freetail;
|
||||||
if (!check)
|
if (!check)
|
||||||
{
|
{
|
||||||
check = calloc(2, sizeof (*check));
|
check = calloc(1, sizeof (*check));
|
||||||
if (check == NULL) I_Error("%s: Out of memory", "new_visplane"); // FIXME: ugly
|
if (check == NULL) I_Error("%s: Out of memory", "new_visplane"); // FIXME: ugly
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue