Skip to content

Commit

Permalink
r21 再修正 というかやり方変えた
Browse files Browse the repository at this point in the history
  • Loading branch information
ePi5131 committed Apr 25, 2022
1 parent b4284ab commit 655ca7a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
9 changes: 7 additions & 2 deletions patch.aul.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
patch.aul r20
patch.aul r21
Copyright (c) 2021-2022 ePi
https://scrapbox.io/ePi5131/patch.aul

Expand Down Expand Up @@ -171,7 +171,7 @@ https://scrapbox.io/ePi5131/patch.aul
Lua追加要素詳細
_PATCH
patch.aulのバージョン情報
現在は "patch.aul r20" という文字列が格納されている
現在は "patch.aul r21" という文字列が格納されている

obj.randex(seed,time)
seed : integer
Expand Down Expand Up @@ -279,3 +279,8 @@ Lua追加要素詳細

r20
設定ダイアログのサイズが変更されたときの画面外の領域が正しく描画されないのを修正

r21
再修正 というかやり方を変えた
settingdialog_moveスイッチが機能してなかったのを修正

2 changes: 1 addition & 1 deletion patch/macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
#endif //define PATCH_SWITCH_FAST

#else // ifdef PATCH_INTERNAL
#define PATCH_VERSION_STR "r20"
#define PATCH_VERSION_STR "r21"

#define PATCH_SWITCH_EXCEPTION_LOG
#define PATCH_SWITCH_SYSINFO_MODIFY
Expand Down
18 changes: 6 additions & 12 deletions patch/patch_setting_dialog_move.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,14 @@ namespace patch {
inline class setting_dialog_move_t {
inline static std::jthread th;
inline static std::atomic_bool waiting;

static bool enabled() {
return PATCH_SWITCHER_MEMBER(PATCH_SWITCH_SETTINGDIALOG_MOVE);
}
public:
void operator()(HWND hwnd) {
if (!waiting.load()) {
PostMessage(hwnd, WM_SETREDRAW, FALSE, NULL);
th = std::jthread(
[](HWND hwnd) {
waiting.store(true);
std::this_thread::sleep_for(std::chrono::milliseconds{ 10 });
PostMessage(hwnd, WM_SETREDRAW, TRUE, NULL);
waiting.store(false);
},
hwnd
);
}
if (!enabled())return;
std::this_thread::sleep_for(std::chrono::milliseconds{ 10 });
}
} setting_dialog_move;
}
Expand Down
8 changes: 2 additions & 6 deletions patch/patch_setting_dialog_wndproc_override.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

#include "patch_setting_dialog_wndproc_override.hpp"

#include "patch_setting_dialog_move.hpp"

namespace patch {
LRESULT CALLBACK setting_dialog_t::wndproc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
switch (message) {
Expand All @@ -23,12 +25,6 @@ namespace patch {
setting_dialog_move(hwnd);
#endif
break;
case WM_SIZE:
#ifdef PATCH_SWITCH_FAST_SETTINGDIALOG
InvalidateRect(hwnd, nullptr, FALSE);
UpdateWindow(hwnd);
#endif
break;
}
return wndproc_orig(hwnd, message, wparam, lparam);
}
Expand Down
2 changes: 0 additions & 2 deletions patch/patch_setting_dialog_wndproc_override.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include "global.hpp"
#include "util_magic.hpp"

#include "patch_setting_dialog_move.hpp"

namespace patch {

inline class setting_dialog_t {
Expand Down

0 comments on commit 655ca7a

Please sign in to comment.