mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix some window title issues, etc.
This commit is contained in:
parent
e5c6cea6f1
commit
87e51a5c04
6 changed files with 10 additions and 19 deletions
|
@ -181,6 +181,7 @@ void CPU_Init() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (coreParameter.updateRecent) {
|
if (coreParameter.updateRecent) {
|
||||||
g_Config.AddRecent(filename);
|
g_Config.AddRecent(filename);
|
||||||
}
|
}
|
||||||
|
@ -290,6 +291,7 @@ void PSP_Shutdown() {
|
||||||
CPU_Shutdown();
|
CPU_Shutdown();
|
||||||
}
|
}
|
||||||
GPU_Shutdown();
|
GPU_Shutdown();
|
||||||
|
host->SetWindowTitle(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PSP_RunLoopUntil(u64 globalticks) {
|
void PSP_RunLoopUntil(u64 globalticks) {
|
||||||
|
|
|
@ -192,6 +192,9 @@ namespace DSound
|
||||||
|
|
||||||
void DSound_StopSound()
|
void DSound_StopSound()
|
||||||
{
|
{
|
||||||
|
if (!dsBuffer)
|
||||||
|
return;
|
||||||
|
|
||||||
if (threadData == 0)
|
if (threadData == 0)
|
||||||
threadData = 1;
|
threadData = 1;
|
||||||
|
|
||||||
|
@ -227,11 +230,8 @@ namespace DSound
|
||||||
return playCursor;
|
return playCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
float DSound_GetTimer()
|
float DSound_GetTimer()
|
||||||
{
|
{
|
||||||
return (float)DSound_GetCurSample()*(1.0f/(4.0f*44100.0f));
|
return (float)DSound_GetCurSample()*(1.0f/(4.0f*44100.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,9 @@ void WindowsHost::ShutdownGL()
|
||||||
|
|
||||||
void WindowsHost::SetWindowTitle(const char *message)
|
void WindowsHost::SetWindowTitle(const char *message)
|
||||||
{
|
{
|
||||||
std::string title = std::string("PPSSPP ") + PPSSPP_GIT_VERSION + " - " + message;
|
std::string title = std::string("PPSSPP ") + PPSSPP_GIT_VERSION;
|
||||||
|
if (message)
|
||||||
|
title = title + " - " + message;
|
||||||
|
|
||||||
int size = MultiByteToWideChar(CP_UTF8, 0, title.c_str(), (int) title.size(), NULL, 0);
|
int size = MultiByteToWideChar(CP_UTF8, 0, title.c_str(), (int) title.size(), NULL, 0);
|
||||||
if (size > 0)
|
if (size > 0)
|
||||||
|
|
|
@ -333,7 +333,6 @@ namespace MainWindow
|
||||||
SetTimer(hwndMain, TIMER_CURSORUPDATE, CURSORUPDATE_INTERVAL_MS, 0);
|
SetTimer(hwndMain, TIMER_CURSORUPDATE, CURSORUPDATE_INTERVAL_MS, 0);
|
||||||
|
|
||||||
Update();
|
Update();
|
||||||
SetPlaying(0);
|
|
||||||
|
|
||||||
if(g_Config.bFullScreenOnLaunch)
|
if(g_Config.bFullScreenOnLaunch)
|
||||||
_ViewFullScreen(hwndMain);
|
_ViewFullScreen(hwndMain);
|
||||||
|
@ -694,7 +693,6 @@ namespace MainWindow
|
||||||
Core_EnableStepping(false);
|
Core_EnableStepping(false);
|
||||||
}
|
}
|
||||||
NativeMessageReceived("stop", "");
|
NativeMessageReceived("stop", "");
|
||||||
SetPlaying(0);
|
|
||||||
Update();
|
Update();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1156,8 +1154,7 @@ namespace MainWindow
|
||||||
// Ugly, need to wait for the stop message to process in the EmuThread.
|
// Ugly, need to wait for the stop message to process in the EmuThread.
|
||||||
Sleep(20);
|
Sleep(20);
|
||||||
|
|
||||||
MainWindow::SetPlaying(filename);
|
Update();
|
||||||
MainWindow::Update();
|
|
||||||
|
|
||||||
NativeMessageReceived("boot", filename);
|
NativeMessageReceived("boot", filename);
|
||||||
}
|
}
|
||||||
|
@ -1497,16 +1494,6 @@ namespace MainWindow
|
||||||
UpdateScreenScale();
|
UpdateScreenScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetPlaying(const char *text) {
|
|
||||||
char temp[256];
|
|
||||||
if (text == 0)
|
|
||||||
snprintf(temp, 256, "PPSSPP %s", PPSSPP_GIT_VERSION);
|
|
||||||
else
|
|
||||||
snprintf(temp, 256, "%s - PPSSPP %s", text, PPSSPP_GIT_VERSION);
|
|
||||||
temp[255] = '\0';
|
|
||||||
SetWindowText(hwndMain, temp);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SaveStateActionFinished(bool result, void *userdata) {
|
void SaveStateActionFinished(bool result, void *userdata) {
|
||||||
PostMessage(hwndMain, WM_USER_SAVESTATE_FINISH, 0, 0);
|
PostMessage(hwndMain, WM_USER_SAVESTATE_FINISH, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,6 @@ namespace MainWindow
|
||||||
HWND GetHWND();
|
HWND GetHWND();
|
||||||
HINSTANCE GetHInstance();
|
HINSTANCE GetHInstance();
|
||||||
HWND GetDisplayHWND();
|
HWND GetDisplayHWND();
|
||||||
void SetPlaying(const char*text);
|
|
||||||
void BrowseAndBoot(std::string defaultPath, bool browseDirectory = false);
|
void BrowseAndBoot(std::string defaultPath, bool browseDirectory = false);
|
||||||
void SaveStateActionFinished(bool result, void *userdata);
|
void SaveStateActionFinished(bool result, void *userdata);
|
||||||
void _ViewFullScreen(HWND hWnd);
|
void _ViewFullScreen(HWND hWnd);
|
||||||
|
|
|
@ -123,6 +123,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||||
DialogManager::AddDlg(vfpudlg = new CVFPUDlg(_hInstance, hwndMain, currentDebugMIPS));
|
DialogManager::AddDlg(vfpudlg = new CVFPUDlg(_hInstance, hwndMain, currentDebugMIPS));
|
||||||
|
|
||||||
host = new WindowsHost(hwndMain, hwndDisplay);
|
host = new WindowsHost(hwndMain, hwndDisplay);
|
||||||
|
host->SetWindowTitle(0);
|
||||||
|
|
||||||
// Emu thread is always running!
|
// Emu thread is always running!
|
||||||
EmuThread_Start();
|
EmuThread_Start();
|
||||||
|
|
Loading…
Add table
Reference in a new issue