fix: 优化 3D 游戏模式

This commit is contained in:
刘旭 2022-05-06 19:16:54 +08:00
commit 475c32a2ef
3 changed files with 15 additions and 4 deletions

View file

@ -413,8 +413,9 @@ LRESULT App::_HostWndProcStatic(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
LRESULT App::_HostWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
for (auto& pair : _wndProcHandlers) {
const auto& result = pair.second(hWnd, message, wParam, lParam);
// 以反向调用回调
for (auto it = _wndProcHandlers.rbegin(); it != _wndProcHandlers.rend(); ++it) {
const auto& result = it->second(hWnd, message, wParam, lParam);
if (result.has_value()) {
return result.value();
}