Skip to content

Commit

Permalink
hide mouse cursor in game
Browse files Browse the repository at this point in the history
remove unused git patches
  • Loading branch information
DiaLight committed Jul 21, 2024
1 parent dcc65da commit 5b627d6
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 1,036 deletions.
736 changes: 0 additions & 736 deletions patches/0001-decompiled.patch

This file was deleted.

20 changes: 0 additions & 20 deletions patches/0002-notify_another_instance_is_running.patch

This file was deleted.

20 changes: 0 additions & 20 deletions patches/0003-add_win10_support.patch

This file was deleted.

41 changes: 0 additions & 41 deletions patches/0004-use_cwd_as_dk2_home_dir.patch

This file was deleted.

25 changes: 0 additions & 25 deletions patches/0005-bring_to_foreground.patch

This file was deleted.

27 changes: 0 additions & 27 deletions patches/0006-fix_keyboard_state_on_alt_tab.patch

This file was deleted.

34 changes: 0 additions & 34 deletions patches/0007-fix_close_window.patch

This file was deleted.

34 changes: 0 additions & 34 deletions patches/0008-fix_mouse_pos_on_resized_window.patch

This file was deleted.

45 changes: 0 additions & 45 deletions patches/0009-use_wheel_to_zoom.patch

This file was deleted.

33 changes: 0 additions & 33 deletions patches/0010-replace_mouse_dinput_to_user32.patch

This file was deleted.

21 changes: 0 additions & 21 deletions patches/0011-control_windowed_mode.patch

This file was deleted.

1 change: 1 addition & 0 deletions src/dkii_exe_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void dk2::resolveDk2HomeDir() {
}

LRESULT dk2::CWindowTest_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
if(hide_mouse_cursor_in_window::window_proc(hWnd, Msg, wParam, lParam)) return TRUE;
replace_mouse_dinput_to_user32::emulate_dinput_from_user32(hWnd, Msg, wParam, lParam);
fix_mouse_pos_on_resized_window::window_proc(hWnd, Msg, wParam, lParam);
use_wheel_to_zoom::window_proc(hWnd, Msg, wParam, lParam);
Expand Down
12 changes: 12 additions & 0 deletions src/patches/micro_patches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ void fix_close_window::window_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lP
}
}

bool hide_mouse_cursor_in_window::window_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
switch(Msg) {
case WM_SETCURSOR: {
if (LOWORD(lParam) == HTCLIENT) {
SetCursor(NULL);
return true;
}
}
}
return false;
}

bool skippable_title_screen::enabled = true;
bool skippable_title_screen::skipKeyPressed() {
if(!skippable_title_screen::enabled) return false;
Expand Down
4 changes: 4 additions & 0 deletions src/patches/micro_patches.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ namespace fix_close_window {
void window_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
}

namespace hide_mouse_cursor_in_window {
bool window_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
}

namespace skippable_title_screen {
extern bool enabled;
bool skipKeyPressed();
Expand Down

0 comments on commit 5b627d6

Please sign in to comment.