diff --git a/src/spice2x/hooks/graphics/graphics.cpp b/src/spice2x/hooks/graphics/graphics.cpp index ed178f3..deda3c0 100644 --- a/src/spice2x/hooks/graphics/graphics.cpp +++ b/src/spice2x/hooks/graphics/graphics.cpp @@ -11,6 +11,7 @@ #include "cfg/icon.h" #include "cfg/screen_resize.h" #include "games/ddr/ddr.h" +#include "games/gitadora/gitadora.h" #include "games/iidx/iidx.h" #include "hooks/graphics/backends/d3d9/d3d9_backend.h" #include "launcher/shutdown.h" @@ -33,6 +34,7 @@ struct CaptureData { HWND TDJ_SUBSCREEN_WINDOW = nullptr; HWND SDVX_SUBSCREEN_WINDOW = nullptr; +HWND GFDM_SUBSCREEN_WINDOW = nullptr; // icon static HICON WINDOW_ICON = LoadIcon(GetModuleHandle(nullptr), MAKEINTRESOURCE(MAINICON)); @@ -369,12 +371,17 @@ static HWND WINAPI CreateWindowExA_hook(DWORD dwExStyle, LPCSTR lpClassName, LPC bool is_tdj_sub_window = avs::game::is_model("LDJ") && window_name.ends_with(" sub"); bool is_sdvx_sub_window = avs::game::is_model("KFC") && window_name.ends_with(" Sub Screen"); + bool is_gfdm_sub_window = games::gitadora::is_arena_model() && window_name.ends_with("SMALL"); // TDJ windowed mode with subscreen: hide maximize button - if ((is_tdj_sub_window && GRAPHICS_IIDX_WSUB) || is_sdvx_sub_window) { + if ((is_tdj_sub_window && GRAPHICS_IIDX_WSUB) || is_sdvx_sub_window || is_gfdm_sub_window) { dwStyle &= ~(WS_MAXIMIZEBOX); } - if ((is_tdj_sub_window || is_sdvx_sub_window) && GRAPHICS_WSUB_BORDERLESS) { + // mouse clicks become misaligned when resized + if (is_gfdm_sub_window) { + dwStyle &= ~(WS_SIZEBOX); + } + if ((is_tdj_sub_window || is_sdvx_sub_window || is_gfdm_sub_window) && GRAPHICS_WSUB_BORDERLESS) { dwStyle &= ~(WS_OVERLAPPEDWINDOW); } @@ -417,6 +424,11 @@ static HWND WINAPI CreateWindowExA_hook(DWORD dwExStyle, LPCSTR lpClassName, LPC graphics_hook_subscreen_window(SDVX_SUBSCREEN_WINDOW); } + if (is_gfdm_sub_window) { + GFDM_SUBSCREEN_WINDOW = result; + graphics_hook_subscreen_window(GFDM_SUBSCREEN_WINDOW); + } + disable_touch_indicators(result); return result; } diff --git a/src/spice2x/hooks/graphics/graphics.h b/src/spice2x/hooks/graphics/graphics.h index 35263ac..89ef148 100644 --- a/src/spice2x/hooks/graphics/graphics.h +++ b/src/spice2x/hooks/graphics/graphics.h @@ -60,6 +60,7 @@ extern bool GRAPHICS_WSUB_BORDERLESS; extern bool GRAPHICS_WSUB_ALWAYS_ON_TOP; extern HWND TDJ_SUBSCREEN_WINDOW; extern HWND SDVX_SUBSCREEN_WINDOW; +extern HWND GFDM_SUBSCREEN_WINDOW; extern bool SUBSCREEN_FORCE_REDRAW; diff --git a/src/spice2x/touch/touch.cpp b/src/spice2x/touch/touch.cpp index 13f4172..849dd0c 100644 --- a/src/spice2x/touch/touch.cpp +++ b/src/spice2x/touch/touch.cpp @@ -241,7 +241,9 @@ static LRESULT CALLBACK SpiceTouchWndProc(HWND hWnd, UINT msg, WPARAM wParam, LP } const auto is_windowed_sub = - (GRAPHICS_IIDX_WSUB && hWnd == TDJ_SUBSCREEN_WINDOW) || (hWnd == SDVX_SUBSCREEN_WINDOW); + (GRAPHICS_IIDX_WSUB && hWnd == TDJ_SUBSCREEN_WINDOW) || + (hWnd == SDVX_SUBSCREEN_WINDOW) || + (hWnd == GFDM_SUBSCREEN_WINDOW); if (msg == WM_CLOSE) { if (is_windowed_sub) {