You have entered the comedy area
This commit is contained in:
1 parent
e8e10497b8
commit
56b7a15403
6 files changed
+16
No files matched your search
@@ -108,6 +108,8 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
||||
|
||||
// platform independant focus loss
|
||||
UINT8 window_notinfocus = false;
|
||||
INT32 window_x;
|
||||
INT32 window_y;
|
||||
|
||||
//
|
||||
// DEMO LOOP
|
||||
|
||||
@@ -107,6 +107,8 @@ extern boolean digital_disabled;
|
||||
extern boolean menuactive; // Menu overlaid?
|
||||
extern UINT8 paused; // Game paused?
|
||||
extern UINT8 window_notinfocus; // are we in focus? (backend independant -- handles auto pausing and display of "focus lost" message)
|
||||
extern INT32 window_x;
|
||||
extern INT32 window_y;
|
||||
|
||||
extern boolean nodrawers;
|
||||
extern boolean noblit;
|
||||
|
||||
@@ -352,4 +352,6 @@ const char *I_ClipboardPaste(void);
|
||||
|
||||
void I_RegisterSysCommands(void);
|
||||
|
||||
void I_CursedWindowMovement(int xd, int yd);
|
||||
|
||||
#endif
|
||||
@@ -744,6 +744,7 @@ void P_Ticker(boolean run)
|
||||
quake.x = M_RandomRange(-ir,ir);
|
||||
quake.y = M_RandomRange(-ir,ir);
|
||||
quake.z = M_RandomRange(-ir,ir);
|
||||
I_CursedWindowMovement(FixedInt(quake.x), FixedInt(quake.y));
|
||||
ir >>= 2;
|
||||
ir = M_RandomRange(-ir,ir);
|
||||
if (ir < 0)
|
||||
|
||||
@@ -852,6 +852,12 @@ INT32 I_GetKey (void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
void
|
||||
I_CursedWindowMovement (int xd, int yd)
|
||||
{
|
||||
SDL_SetWindowPosition(window, window_x + xd, window_y + yd);
|
||||
}
|
||||
|
||||
//
|
||||
// I_JoyScale
|
||||
//
|
||||
|
||||
@@ -617,6 +617,9 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||
break;
|
||||
case SDL_WINDOWEVENT_MAXIMIZED:
|
||||
break;
|
||||
case SDL_WINDOWEVENT_MOVED:
|
||||
window_x = evt.data1;
|
||||
window_y = evt.data2;
|
||||
}
|
||||
|
||||
if (mousefocus && kbfocus)
|
||||
|
||||
Reference in new issue
Block a user