mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Rename screenManager to g_screenManager, readme update
This commit is contained in:
1 parent
ceaaaaeff0
commit
94debfbf36
3 files changed
+42
-44
No files matched your search
@@ -7,11 +7,9 @@ Additional code by many contributors, see the Credits screen
|
|||||||
|
|
||||||
Originally released under the GPL 2.0 (and later) in November 2012
|
Originally released under the GPL 2.0 (and later) in November 2012
|
||||||
|
|
||||||
Official website:
|
Official website: https://www.ppsspp.org/
|
||||||
https://www.ppsspp.org/
|
|
||||||
|
|
||||||
Discord:
|
Discord: https://discord.gg/5NJB6dD
|
||||||
https://discord.gg/5NJB6dD
|
|
||||||
|
|
||||||
No BIOS file required to play, PPSSPP is an "HLE" emulator. Default settings balance good compatibility and speed.
|
No BIOS file required to play, PPSSPP is an "HLE" emulator. Default settings balance good compatibility and speed.
|
||||||
|
|
||||||
@@ -19,9 +17,11 @@ To contribute, see [the development page](https://www.ppsspp.org/development.htm
|
|||||||
|
|
||||||
For the latest source code, see [our GitHub page](https://github.com/hrydgard/ppsspp).
|
For the latest source code, see [our GitHub page](https://github.com/hrydgard/ppsspp).
|
||||||
|
|
||||||
|
For documentation of all kinds (usage, reference, development), see the [documentation on the main website](https://www.ppsspp.org/docs)
|
||||||
|
|
||||||
For build instructions and other development tutorials, see [the wiki](https://github.com/hrydgard/ppsspp/wiki).
|
For build instructions and other development tutorials, see [the wiki](https://github.com/hrydgard/ppsspp/wiki).
|
||||||
|
|
||||||
If you want to download regularly updated builds for Android, Windows x86 and x64, proceed to this [page](https://buildbot.orphis.net/ppsspp/)
|
If you want to download regularly updated builds for Android, Windows x86 and x64, [visit Orphis' buildbot](https://buildbot.orphis.net/ppsspp/)
|
||||||
|
|
||||||
For game compatibility, see [community compatibility feedback](https://report.ppsspp.org/games).
|
For game compatibility, see [community compatibility feedback](https://report.ppsspp.org/games).
|
||||||
|
|
||||||
@@ -412,4 +412,4 @@ Credit goes to:
|
|||||||
[#16709]: https://github.com/hrydgard/ppsspp/issues/16709 "Correct some shader errors in reporting"
|
[#16709]: https://github.com/hrydgard/ppsspp/issues/16709 "Correct some shader errors in reporting"
|
||||||
[#16708]: https://github.com/hrydgard/ppsspp/issues/16708 "Additional fixes from both our reports and Play reports"
|
[#16708]: https://github.com/hrydgard/ppsspp/issues/16708 "Additional fixes from both our reports and Play reports"
|
||||||
[#16703]: https://github.com/hrydgard/ppsspp/issues/16703 "Minor fixes based on the latest Google Play report"
|
[#16703]: https://github.com/hrydgard/ppsspp/issues/16703 "Minor fixes based on the latest Google Play report"
|
||||||
[#16706]: https://github.com/hrydgard/ppsspp/issues/16706 "softgpu: Fix lighting with 0 exp"
|
[#16706]: https://github.com/hrydgard/ppsspp/issues/16706 "softgpu: Fix lighting with 0 exp"
|
||||||
+36
-36
@@ -148,7 +148,7 @@
|
|||||||
|
|
||||||
#include <Core/HLE/Plugins.h>
|
#include <Core/HLE/Plugins.h>
|
||||||
|
|
||||||
ScreenManager *screenManager;
|
ScreenManager *g_screenManager;
|
||||||
std::string config_filename;
|
std::string config_filename;
|
||||||
|
|
||||||
// Really need to clean this mess of globals up... but instead I add more :P
|
// Really need to clean this mess of globals up... but instead I add more :P
|
||||||
@@ -789,19 +789,19 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_LOG(SYSTEM, "ScreenManager!");
|
DEBUG_LOG(SYSTEM, "ScreenManager!");
|
||||||
screenManager = new ScreenManager();
|
g_screenManager = new ScreenManager();
|
||||||
if (g_Config.memStickDirectory.empty()) {
|
if (g_Config.memStickDirectory.empty()) {
|
||||||
INFO_LOG(SYSTEM, "No memstick directory! Asking for one to be configured.");
|
INFO_LOG(SYSTEM, "No memstick directory! Asking for one to be configured.");
|
||||||
screenManager->switchScreen(new LogoScreen(AfterLogoScreen::MEMSTICK_SCREEN_INITIAL_SETUP));
|
g_screenManager->switchScreen(new LogoScreen(AfterLogoScreen::MEMSTICK_SCREEN_INITIAL_SETUP));
|
||||||
} else if (gotoGameSettings) {
|
} else if (gotoGameSettings) {
|
||||||
screenManager->switchScreen(new LogoScreen(AfterLogoScreen::TO_GAME_SETTINGS));
|
g_screenManager->switchScreen(new LogoScreen(AfterLogoScreen::TO_GAME_SETTINGS));
|
||||||
} else if (gotoTouchScreenTest) {
|
} else if (gotoTouchScreenTest) {
|
||||||
screenManager->switchScreen(new MainScreen());
|
g_screenManager->switchScreen(new MainScreen());
|
||||||
screenManager->push(new TouchTestScreen(Path()));
|
g_screenManager->push(new TouchTestScreen(Path()));
|
||||||
} else if (skipLogo) {
|
} else if (skipLogo) {
|
||||||
screenManager->switchScreen(new EmuScreen(boot_filename));
|
g_screenManager->switchScreen(new EmuScreen(boot_filename));
|
||||||
} else {
|
} else {
|
||||||
screenManager->switchScreen(new LogoScreen(AfterLogoScreen::DEFAULT));
|
g_screenManager->switchScreen(new LogoScreen(AfterLogoScreen::DEFAULT));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Easy testing
|
// Easy testing
|
||||||
@@ -833,7 +833,7 @@ bool CreateGlobalPipelines();
|
|||||||
bool NativeInitGraphics(GraphicsContext *graphicsContext) {
|
bool NativeInitGraphics(GraphicsContext *graphicsContext) {
|
||||||
INFO_LOG(SYSTEM, "NativeInitGraphics");
|
INFO_LOG(SYSTEM, "NativeInitGraphics");
|
||||||
|
|
||||||
_assert_(screenManager);
|
_assert_(g_screenManager);
|
||||||
|
|
||||||
// We set this now so any resize during init is processed later.
|
// We set this now so any resize during init is processed later.
|
||||||
resized = false;
|
resized = false;
|
||||||
@@ -864,10 +864,10 @@ bool NativeInitGraphics(GraphicsContext *graphicsContext) {
|
|||||||
if (uiContext->Text())
|
if (uiContext->Text())
|
||||||
uiContext->Text()->SetFont("Tahoma", 20, 0);
|
uiContext->Text()->SetFont("Tahoma", 20, 0);
|
||||||
|
|
||||||
screenManager->setUIContext(uiContext);
|
g_screenManager->setUIContext(uiContext);
|
||||||
screenManager->setDrawContext(g_draw);
|
g_screenManager->setDrawContext(g_draw);
|
||||||
screenManager->setPostRenderCallback(&RenderOverlays, nullptr);
|
g_screenManager->setPostRenderCallback(&RenderOverlays, nullptr);
|
||||||
screenManager->deviceRestored();
|
g_screenManager->deviceRestored();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
winAudioBackend = CreateAudioBackend((AudioBackendType)g_Config.iAudioBackend);
|
winAudioBackend = CreateAudioBackend((AudioBackendType)g_Config.iAudioBackend);
|
||||||
@@ -951,8 +951,8 @@ bool CreateGlobalPipelines() {
|
|||||||
void NativeShutdownGraphics() {
|
void NativeShutdownGraphics() {
|
||||||
INFO_LOG(SYSTEM, "NativeShutdownGraphics");
|
INFO_LOG(SYSTEM, "NativeShutdownGraphics");
|
||||||
|
|
||||||
if (screenManager) {
|
if (g_screenManager) {
|
||||||
screenManager->deviceLost();
|
g_screenManager->deviceLost();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpu)
|
if (gpu)
|
||||||
@@ -1062,7 +1062,7 @@ void RenderOverlays(UIContext *dc, void *userdata) {
|
|||||||
|
|
||||||
void NativeRender(GraphicsContext *graphicsContext) {
|
void NativeRender(GraphicsContext *graphicsContext) {
|
||||||
_dbg_assert_(graphicsContext != nullptr);
|
_dbg_assert_(graphicsContext != nullptr);
|
||||||
_dbg_assert_(screenManager != nullptr);
|
_dbg_assert_(g_screenManager != nullptr);
|
||||||
|
|
||||||
g_GameManager.Update();
|
g_GameManager.Update();
|
||||||
|
|
||||||
@@ -1108,19 +1108,19 @@ void NativeRender(GraphicsContext *graphicsContext) {
|
|||||||
ui_draw2d.PushDrawMatrix(ortho);
|
ui_draw2d.PushDrawMatrix(ortho);
|
||||||
ui_draw2d_front.PushDrawMatrix(ortho);
|
ui_draw2d_front.PushDrawMatrix(ortho);
|
||||||
|
|
||||||
screenManager->getUIContext()->SetTintSaturation(g_Config.fUITint, g_Config.fUISaturation);
|
g_screenManager->getUIContext()->SetTintSaturation(g_Config.fUITint, g_Config.fUISaturation);
|
||||||
|
|
||||||
Draw::DebugFlags debugFlags = Draw::DebugFlags::NONE;
|
Draw::DebugFlags debugFlags = Draw::DebugFlags::NONE;
|
||||||
if (g_Config.bShowGpuProfile)
|
if (g_Config.bShowGpuProfile)
|
||||||
debugFlags |= Draw::DebugFlags::PROFILE_TIMESTAMPS;
|
debugFlags |= Draw::DebugFlags::PROFILE_TIMESTAMPS;
|
||||||
if (g_Config.bGpuLogProfiler)
|
if (g_Config.bGpuLogProfiler)
|
||||||
debugFlags |= Draw::DebugFlags::PROFILE_SCOPES;
|
debugFlags |= Draw::DebugFlags::PROFILE_SCOPES;
|
||||||
screenManager->getDrawContext()->SetDebugFlags(debugFlags);
|
g_screenManager->getDrawContext()->SetDebugFlags(debugFlags);
|
||||||
|
|
||||||
// All actual rendering happen in here.
|
// All actual rendering happen in here.
|
||||||
screenManager->render();
|
g_screenManager->render();
|
||||||
if (screenManager->getUIContext()->Text()) {
|
if (g_screenManager->getUIContext()->Text()) {
|
||||||
screenManager->getUIContext()->Text()->OncePerFrame();
|
g_screenManager->getUIContext()->Text()->OncePerFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resized) {
|
if (resized) {
|
||||||
@@ -1142,7 +1142,7 @@ void NativeRender(GraphicsContext *graphicsContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
graphicsContext->Resize();
|
graphicsContext->Resize();
|
||||||
screenManager->resized();
|
g_screenManager->resized();
|
||||||
|
|
||||||
// TODO: Move this to the GraphicsContext objects for each backend.
|
// TODO: Move this to the GraphicsContext objects for each backend.
|
||||||
#if !PPSSPP_PLATFORM(WINDOWS) && !defined(ANDROID)
|
#if !PPSSPP_PLATFORM(WINDOWS) && !defined(ANDROID)
|
||||||
@@ -1259,14 +1259,14 @@ void NativeUpdate() {
|
|||||||
|
|
||||||
for (const auto &item : toProcess) {
|
for (const auto &item : toProcess) {
|
||||||
HandleGlobalMessage(item.msg, item.value);
|
HandleGlobalMessage(item.msg, item.value);
|
||||||
screenManager->sendMessage(item.msg.c_str(), item.value.c_str());
|
g_screenManager->sendMessage(item.msg.c_str(), item.value.c_str());
|
||||||
}
|
}
|
||||||
for (const auto &item : inputToProcess) {
|
for (const auto &item : inputToProcess) {
|
||||||
item.cb(item.result, item.value);
|
item.cb(item.result, item.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_DownloadManager.Update();
|
g_DownloadManager.Update();
|
||||||
screenManager->update();
|
g_screenManager->update();
|
||||||
|
|
||||||
g_Discord.Update();
|
g_Discord.Update();
|
||||||
|
|
||||||
@@ -1275,11 +1275,11 @@ void NativeUpdate() {
|
|||||||
|
|
||||||
bool NativeIsAtTopLevel() {
|
bool NativeIsAtTopLevel() {
|
||||||
// This might need some synchronization?
|
// This might need some synchronization?
|
||||||
if (!screenManager) {
|
if (!g_screenManager) {
|
||||||
ERROR_LOG(SYSTEM, "No screen manager active");
|
ERROR_LOG(SYSTEM, "No screen manager active");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Screen *currentScreen = screenManager->topScreen();
|
Screen *currentScreen = g_screenManager->topScreen();
|
||||||
if (currentScreen) {
|
if (currentScreen) {
|
||||||
bool top = currentScreen->isTopLevel();
|
bool top = currentScreen->isTopLevel();
|
||||||
INFO_LOG(SYSTEM, "Screen toplevel: %i", (int)top);
|
INFO_LOG(SYSTEM, "Screen toplevel: %i", (int)top);
|
||||||
@@ -1291,7 +1291,7 @@ bool NativeIsAtTopLevel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NativeTouch(const TouchInput &touch) {
|
void NativeTouch(const TouchInput &touch) {
|
||||||
if (!screenManager) {
|
if (!g_screenManager) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1300,7 +1300,7 @@ void NativeTouch(const TouchInput &touch) {
|
|||||||
if (my_isnan(touch.x) || my_isnan(touch.y)) {
|
if (my_isnan(touch.x) || my_isnan(touch.y)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
screenManager->touch(touch);
|
g_screenManager->touch(touch);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeKey(const KeyInput &key) {
|
bool NativeKey(const KeyInput &key) {
|
||||||
@@ -1323,10 +1323,10 @@ bool NativeKey(const KeyInput &key) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
bool retval = false;
|
bool retval = false;
|
||||||
if (screenManager)
|
if (g_screenManager)
|
||||||
{
|
{
|
||||||
HLEPlugins::PluginDataKeys[key.keyCode] = (key.flags & KEY_DOWN) ? 1 : 0;
|
HLEPlugins::PluginDataKeys[key.keyCode] = (key.flags & KEY_DOWN) ? 1 : 0;
|
||||||
retval = screenManager->key(key);
|
retval = g_screenManager->key(key);
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
@@ -1337,7 +1337,7 @@ void NativeAxis(const AxisInput &axis) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!screenManager) {
|
if (!g_screenManager) {
|
||||||
// Too early.
|
// Too early.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1346,7 +1346,7 @@ void NativeAxis(const AxisInput &axis) {
|
|||||||
|
|
||||||
// only do special handling of tilt events if tilt is enabled.
|
// only do special handling of tilt events if tilt is enabled.
|
||||||
HLEPlugins::PluginDataAxis[axis.axisId] = axis.value;
|
HLEPlugins::PluginDataAxis[axis.axisId] = axis.value;
|
||||||
screenManager->axis(axis);
|
g_screenManager->axis(axis);
|
||||||
|
|
||||||
if (g_Config.iTiltInputType == TILT_NULL) {
|
if (g_Config.iTiltInputType == TILT_NULL) {
|
||||||
// if tilt events are disabled, don't do anything special.
|
// if tilt events are disabled, don't do anything special.
|
||||||
@@ -1420,10 +1420,10 @@ bool NativeIsRestarting() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NativeShutdown() {
|
void NativeShutdown() {
|
||||||
if (screenManager) {
|
if (g_screenManager) {
|
||||||
screenManager->shutdown();
|
g_screenManager->shutdown();
|
||||||
delete screenManager;
|
delete g_screenManager;
|
||||||
screenManager = nullptr;
|
g_screenManager = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !PPSSPP_PLATFORM(UWP)
|
#if !PPSSPP_PLATFORM(UWP)
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ struct VerySleepy_AddrInfo {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static std::wstring windowTitle;
|
static std::wstring windowTitle;
|
||||||
extern ScreenManager *screenManager;
|
|
||||||
|
|
||||||
#define TIMER_CURSORUPDATE 1
|
#define TIMER_CURSORUPDATE 1
|
||||||
#define TIMER_CURSORMOVEUPDATE 2
|
#define TIMER_CURSORMOVEUPDATE 2
|
||||||
@@ -473,7 +472,6 @@ namespace MainWindow
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UpdateWindowTitle() {
|
void UpdateWindowTitle() {
|
||||||
// Seems to be fine to call now since we use a UNICODE build...
|
|
||||||
std::wstring title = windowTitle;
|
std::wstring title = windowTitle;
|
||||||
if (PPSSPP_ID >= 1 && GetInstancePeerCount() > 1) {
|
if (PPSSPP_ID >= 1 && GetInstancePeerCount() > 1) {
|
||||||
title.append(ConvertUTF8ToWString(StringFromFormat(" (instance: %d)", (int)PPSSPP_ID)));
|
title.append(ConvertUTF8ToWString(StringFromFormat(" (instance: %d)", (int)PPSSPP_ID)));
|
||||||
|
|||||||
Reference in new issue
Block a user