mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
update changelog
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
05/31/2025 [spice2x]
|
05/31/2025 [spice2x]
|
||||||
|
IIDX: fix windowed subscreen not accepting mouse clicks when
|
||||||
|
overlay is active
|
||||||
IIDX: tape LED over API
|
IIDX: tape LED over API
|
||||||
UI tweaks
|
|
||||||
Option to make command line args take precedence
|
Option to make command line args take precedence
|
||||||
|
UI tweaks
|
||||||
|
|
||||||
05/09/2025 [spice2x]
|
05/09/2025 [spice2x]
|
||||||
Check for window focus when processing input (-inputfocus)
|
Check for window focus when processing input (-inputfocus)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "touch/touch.h"
|
#include "touch/touch.h"
|
||||||
#include "util/logging.h"
|
#include "util/logging.h"
|
||||||
#include "util/utils.h"
|
#include "util/utils.h"
|
||||||
|
#include "hooks/graphics/graphics.h"
|
||||||
|
|
||||||
#if !defined(IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS) || \
|
#if !defined(IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS) || \
|
||||||
!defined(IMGUI_DISABLE_DEFAULT_ALLOCATORS) || \
|
!defined(IMGUI_DISABLE_DEFAULT_ALLOCATORS) || \
|
||||||
@@ -175,10 +176,22 @@ static void ImGui_ImplSpice_UpdateMousePos() {
|
|||||||
static_cast<int>(pos.y / io.DisplaySize.y * window_size.y));
|
static_cast<int>(pos.y / io.DisplaySize.y * window_size.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto active_window = ::GetForegroundWindow();
|
||||||
|
|
||||||
|
// if the main focus is a windowed subscreen, put the imgui cursor in a place that won't
|
||||||
|
// trigger any overlay, don't process anything else
|
||||||
|
const auto is_windowed_subscreen =
|
||||||
|
(GRAPHICS_IIDX_WSUB && active_window == TDJ_SUBSCREEN_WINDOW) ||
|
||||||
|
(active_window == SDVX_SUBSCREEN_WINDOW);
|
||||||
|
if (is_windowed_subscreen) {
|
||||||
|
io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// set mouse position
|
// set mouse position
|
||||||
io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
|
io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
|
||||||
POINT pos;
|
POINT pos;
|
||||||
if (HWND active_window = ::GetForegroundWindow()) {
|
if (active_window) {
|
||||||
if (active_window == g_hWnd
|
if (active_window == g_hWnd
|
||||||
|| ::IsChild(active_window, g_hWnd)
|
|| ::IsChild(active_window, g_hWnd)
|
||||||
|| ::IsChild(g_hWnd, active_window)
|
|| ::IsChild(g_hWnd, active_window)
|
||||||
@@ -208,7 +221,7 @@ static void ImGui_ImplSpice_UpdateMousePos() {
|
|||||||
static size_t delay_touch = 0;
|
static size_t delay_touch = 0;
|
||||||
static size_t delay_touch_target = 2;
|
static size_t delay_touch_target = 2;
|
||||||
static DWORD last_touch_id = ~0u;
|
static DWORD last_touch_id = ~0u;
|
||||||
if (!touch_points.empty()) {
|
if (!touch_points.empty() && !is_windowed_subscreen) {
|
||||||
|
|
||||||
// use the first touch point
|
// use the first touch point
|
||||||
auto &tp = touch_points[0];
|
auto &tp = touch_points[0];
|
||||||
|
|||||||
@@ -240,8 +240,11 @@ static LRESULT CALLBACK SpiceTouchWndProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
|||||||
rawinput::touch::display_update();
|
rawinput::touch::display_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto is_windowed_sub =
|
||||||
|
(GRAPHICS_IIDX_WSUB && hWnd == TDJ_SUBSCREEN_WINDOW) || (hWnd == SDVX_SUBSCREEN_WINDOW);
|
||||||
|
|
||||||
if (msg == WM_CLOSE) {
|
if (msg == WM_CLOSE) {
|
||||||
if ((GRAPHICS_IIDX_WSUB && hWnd == TDJ_SUBSCREEN_WINDOW) || (hWnd == SDVX_SUBSCREEN_WINDOW)) {
|
if (is_windowed_sub) {
|
||||||
log_misc("touch", "ignore WM_CLOSE for subscreen window");
|
log_misc("touch", "ignore WM_CLOSE for subscreen window");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -461,11 +464,14 @@ static LRESULT CALLBACK SpiceTouchWndProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
|||||||
};
|
};
|
||||||
|
|
||||||
// check if imgui is handling this mouse event
|
// check if imgui is handling this mouse event
|
||||||
if (overlay::OVERLAY != nullptr && overlay::OVERLAY->get_active() && ImGui::GetIO().WantCaptureMouse) {
|
if (is_windowed_sub) {
|
||||||
|
// do nothing, don't let imgui hijack clicks on the sub window
|
||||||
|
result.action = ACTION_PASS;
|
||||||
|
|
||||||
|
} else if (overlay::OVERLAY != nullptr && overlay::OVERLAY->get_active() && ImGui::GetIO().WantCaptureMouse) {
|
||||||
result.action = ACTION_RETURN_DEFAULT;
|
result.action = ACTION_RETURN_DEFAULT;
|
||||||
|
|
||||||
} else if (TOUCH_HANDLER != nullptr) {
|
} else if (TOUCH_HANDLER != nullptr) {
|
||||||
|
|
||||||
// call touch handler
|
// call touch handler
|
||||||
TOUCH_HANDLER->handle_message(result, hWnd, msg, wParam, lParam);
|
TOUCH_HANDLER->handle_message(result, hWnd, msg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user