From badf395dade232b74e8327949b45d6bcd846602f Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 10 Nov 2023 22:37:40 +0100 Subject: [PATCH] Remove WIndows shake thing noone likes it also theres been reports of this thing triggering false positives in anti viruses --- src/d_main.c | 2 -- src/doomstat.h | 2 -- src/i_system.h | 2 -- src/m_menu.c | 2 -- src/p_local.h | 1 - src/p_tick.c | 2 -- src/p_user.c | 1 - src/r_main.c | 1 - src/sdl/i_system.c | 6 ------ src/sdl/i_video.c | 3 --- 10 files changed, 22 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 3d946dd85..ed5363c13 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -94,8 +94,6 @@ // platform independant focus loss UINT8 window_notinfocus = false; -INT32 window_x; -INT32 window_y; // // DEMO LOOP diff --git a/src/doomstat.h b/src/doomstat.h index fc4c38733..3f90eb531 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -108,8 +108,6 @@ 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; diff --git a/src/i_system.h b/src/i_system.h index 05826c79e..87198c923 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -369,6 +369,4 @@ const char *I_ClipboardPaste(void); void I_RegisterSysCommands(void); -void I_CursedWindowMovement(int xd, int yd); - #endif diff --git a/src/m_menu.c b/src/m_menu.c index c61b2b6bc..59fb8342b 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1918,8 +1918,6 @@ static menuitem_t OP_TiltMenu[] = {IT_STRING | IT_CVAR, NULL, "Smoothing Divisor", &cv_tiltsmoothing, 20}, {IT_STRING | IT_CVAR, NULL, "Also Tilt During Quakes", &cv_actionmovie, 40}, - - {IT_STRING | IT_CVAR, NULL, "\x85" "Window Shaking During Quakes", &cv_windowquake, 60}, }; enum diff --git a/src/p_local.h b/src/p_local.h index bb7c62046..df8df412e 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -142,7 +142,6 @@ extern consvar_t cv_quaketilt; extern consvar_t cv_tiltsmoothing; extern consvar_t cv_actionmovie; -extern consvar_t cv_windowquake; extern fixed_t t_cam_dist, t_cam_height, t_cam_rotate; extern fixed_t t_cam2_dist, t_cam2_height, t_cam2_rotate; diff --git a/src/p_tick.c b/src/p_tick.c index 38900db9f..39e32e4c8 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -772,8 +772,6 @@ void P_Ticker(boolean run) quake.x = M_RandomRange(-ir,ir); quake.y = M_RandomRange(-ir,ir); quake.z = M_RandomRange(-ir,ir); - if (cv_windowquake.value) - I_CursedWindowMovement(FixedInt(quake.x), FixedInt(quake.y)); ir >>= 2; ir = M_RandomRange(-ir,ir); if (ir < 0) diff --git a/src/p_user.c b/src/p_user.c index 9a660b70e..fb300829e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -7159,7 +7159,6 @@ consvar_t cv_quaketilt = {"quaketilt", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, consvar_t cv_tiltsmoothing = {"tiltsmoothing", "32", CV_SAVE, CV_Natural, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_actionmovie = {"actionmovie", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_windowquake = {"windowquake", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; fixed_t t_cam_dist = -42; fixed_t t_cam_height = -42; diff --git a/src/r_main.c b/src/r_main.c index 1beb80c8a..d2907b2aa 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1940,7 +1940,6 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_quaketilt); CV_RegisterVar(&cv_tiltsmoothing); CV_RegisterVar(&cv_actionmovie); - CV_RegisterVar(&cv_windowquake); CV_RegisterVar(&cv_driftsparkpulse); CV_RegisterVar(&cv_gravstretch); diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 7a9d48678..a2eb279f8 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -1034,12 +1034,6 @@ INT32 I_GetKey (void) return rc; } -void -I_CursedWindowMovement (int xd, int yd) -{ - SDL_SetWindowPosition(window, window_x + xd, window_y + yd); -} - // // I_JoyScale // diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 82e279093..d3085b14b 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -640,9 +640,6 @@ 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)