mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 02:29:51 +01:00
Merge branch 'master' into TemporaryHackishBranch
# Conflicts: # Common/GPU/OpenGL/GLQueueRunner.cpp # Common/GPU/OpenGL/GLRenderManager.h # Common/GPU/OpenGL/thin3d_gl.cpp # Common/GPU/Vulkan/VulkanRenderManager.cpp # Common/GPU/Vulkan/thin3d_vulkan.cpp # Common/UI/Context.cpp # Core/Config.cpp # Core/Config.h # Core/HLE/proAdhoc.cpp # Core/HLE/proAdhocServer.cpp # Core/HLE/sceKernelThread.cpp # Core/HLE/sceNet.cpp # Core/HLE/sceNetAdhoc.cpp # Core/Util/PPGeDraw.cpp # GPU/Common/PresentationCommon.cpp # GPU/Common/TextureCacheCommon.cpp # GPU/GLES/TextureCacheGLES.cpp # GPU/Vulkan/TextureCacheVulkan.cpp # README.md # UI/EmuScreen.cpp # UI/GameSettingsScreen.cpp # UI/NativeApp.cpp # UI/ProfilerDraw.cpp # Windows/git-version-gen.cmd # ext/native/base/logging.h
This commit is contained in:
commit
431e19977c
1077 files changed
+68238
-27951
No files matched your search
+51
-38
@@ -22,7 +22,6 @@
|
||||
// It's improving slowly, though. :)
|
||||
#include "stdafx.h"
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "Common/KeyMap.h"
|
||||
#include "Common/OSVersion.h"
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
@@ -32,19 +31,23 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/display.h"
|
||||
#include "base/NativeApp.h"
|
||||
#include "base/timeutil.h"
|
||||
#include "i18n/i18n.h"
|
||||
#include "input/input_state.h"
|
||||
#include "input/keycodes.h"
|
||||
#include "thread/threadutil.h"
|
||||
#include "util/text/utf8.h"
|
||||
#include "Common/System/Display.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Input/InputState.h"
|
||||
#include "Common/Input/KeyCodes.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include "Core/Instance.h"
|
||||
#include "Core/KeyMap.h"
|
||||
#include "Core/MIPS/JitCommon/JitCommon.h"
|
||||
#include "Core/MIPS/JitCommon/JitBlockCache.h"
|
||||
#include "Windows/InputBox.h"
|
||||
@@ -479,7 +482,11 @@ namespace MainWindow
|
||||
|
||||
void UpdateWindowTitle() {
|
||||
// Seems to be fine to call now since we use a UNICODE build...
|
||||
SetWindowText(hwndMain, windowTitle.c_str());
|
||||
std::wstring title = windowTitle;
|
||||
if (PPSSPP_ID >= 1 && GetInstancePeerCount() > 1) {
|
||||
title.append(ConvertUTF8ToWString(StringFromFormat(" (instance: %d)", (int)PPSSPP_ID)));
|
||||
}
|
||||
SetWindowText(hwndMain, title.c_str());
|
||||
}
|
||||
|
||||
void SetWindowTitle(const wchar_t *title) {
|
||||
@@ -566,23 +573,23 @@ namespace MainWindow
|
||||
}
|
||||
|
||||
void CreateDebugWindows() {
|
||||
disasmWindow[0] = new CDisasm(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(disasmWindow[0]);
|
||||
disasmWindow[0]->Show(g_Config.bShowDebuggerOnLoad);
|
||||
disasmWindow = new CDisasm(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(disasmWindow);
|
||||
disasmWindow->Show(g_Config.bShowDebuggerOnLoad);
|
||||
|
||||
#if PPSSPP_API(ANY_GL)
|
||||
geDebuggerWindow = new CGEDebugger(MainWindow::GetHInstance(), MainWindow::GetHWND());
|
||||
DialogManager::AddDlg(geDebuggerWindow);
|
||||
#endif
|
||||
memoryWindow[0] = new CMemoryDlg(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(memoryWindow[0]);
|
||||
memoryWindow = new CMemoryDlg(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(memoryWindow);
|
||||
}
|
||||
|
||||
void DestroyDebugWindows() {
|
||||
DialogManager::RemoveDlg(disasmWindow[0]);
|
||||
if (disasmWindow[0])
|
||||
delete disasmWindow[0];
|
||||
disasmWindow[0] = 0;
|
||||
DialogManager::RemoveDlg(disasmWindow);
|
||||
if (disasmWindow)
|
||||
delete disasmWindow;
|
||||
disasmWindow = 0;
|
||||
|
||||
#if PPSSPP_API(ANY_GL)
|
||||
DialogManager::RemoveDlg(geDebuggerWindow);
|
||||
@@ -591,10 +598,10 @@ namespace MainWindow
|
||||
geDebuggerWindow = 0;
|
||||
#endif
|
||||
|
||||
DialogManager::RemoveDlg(memoryWindow[0]);
|
||||
if (memoryWindow[0])
|
||||
delete memoryWindow[0];
|
||||
memoryWindow[0] = 0;
|
||||
DialogManager::RemoveDlg(memoryWindow);
|
||||
if (memoryWindow)
|
||||
delete memoryWindow;
|
||||
memoryWindow = 0;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK DisplayProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
@@ -644,14 +651,14 @@ namespace MainWindow
|
||||
|
||||
// Simulate doubleclick, doesn't work with RawInput enabled
|
||||
static double lastMouseDown;
|
||||
double now = real_time_now();
|
||||
double now = time_now_d();
|
||||
if ((now - lastMouseDown) < 0.001 * GetDoubleClickTime()) {
|
||||
if (!g_Config.bShowTouchControls && !g_Config.bMouseControl && GetUIState() == UISTATE_INGAME && g_Config.bFullscreenOnDoubleclick) {
|
||||
SendToggleFullscreen(!g_Config.bFullScreen);
|
||||
}
|
||||
lastMouseDown = 0.0;
|
||||
} else {
|
||||
lastMouseDown = real_time_now();
|
||||
lastMouseDown = time_now_d();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -708,10 +715,8 @@ namespace MainWindow
|
||||
break;
|
||||
|
||||
case WM_TOUCH:
|
||||
{
|
||||
touchHandler.handleTouchEvent(hWnd, message, wParam, lParam);
|
||||
return 0;
|
||||
}
|
||||
touchHandler.handleTouchEvent(hWnd, message, wParam, lParam);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
@@ -747,6 +752,7 @@ namespace MainWindow
|
||||
|
||||
case WM_ACTIVATE:
|
||||
{
|
||||
UpdateWindowTitle();
|
||||
bool pause = true;
|
||||
if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) {
|
||||
WindowsRawInput::GainFocus();
|
||||
@@ -758,8 +764,8 @@ namespace MainWindow
|
||||
}
|
||||
if (!noFocusPause && g_Config.bPauseOnLostFocus && GetUIState() == UISTATE_INGAME) {
|
||||
if (pause != Core_IsStepping()) { // != is xor for bools
|
||||
if (disasmWindow[0])
|
||||
SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_STOPGO, 0);
|
||||
if (disasmWindow)
|
||||
SendMessage(disasmWindow->GetDlgHandle(), WM_COMMAND, IDC_STOPGO, 0);
|
||||
else
|
||||
Core_EnableStepping(pause);
|
||||
}
|
||||
@@ -780,6 +786,10 @@ namespace MainWindow
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
UpdateWindowTitle();
|
||||
break;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
// This window is always covered by DisplayWindow. No reason to erase.
|
||||
return 1;
|
||||
@@ -889,7 +899,10 @@ namespace MainWindow
|
||||
#ifndef _M_ARM
|
||||
DinputDevice::CheckDevices();
|
||||
#endif
|
||||
WindowsCaptureDevice::CheckDevices();
|
||||
if (winCamera)
|
||||
winCamera->CheckDevices();
|
||||
if (winMic)
|
||||
winMic->CheckDevices();
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
|
||||
case WM_VERYSLEEPY_MSG:
|
||||
@@ -954,13 +967,13 @@ namespace MainWindow
|
||||
break;
|
||||
|
||||
case WM_USER + 1:
|
||||
if (disasmWindow[0])
|
||||
disasmWindow[0]->NotifyMapLoaded();
|
||||
if (memoryWindow[0])
|
||||
memoryWindow[0]->NotifyMapLoaded();
|
||||
if (disasmWindow)
|
||||
disasmWindow->NotifyMapLoaded();
|
||||
if (memoryWindow)
|
||||
memoryWindow->NotifyMapLoaded();
|
||||
|
||||
if (disasmWindow[0])
|
||||
disasmWindow[0]->UpdateDialog();
|
||||
if (disasmWindow)
|
||||
disasmWindow->UpdateDialog();
|
||||
|
||||
SetForegroundWindow(hwndMain);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user