Rename screenManager to g_screenManager, readme update

This commit is contained in:
Henrik Rydgård committed 2023-03-22 09:44:44 +01:00
1 parent ceaaaaeff0
commit 94debfbf36
3 files changed
+42 -44

No files matched your search

+6 -6
View File
@@ -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
Official website:
https://www.ppsspp.org/
Official website: https://www.ppsspp.org/
Discord:
https://discord.gg/5NJB6dD
Discord: https://discord.gg/5NJB6dD
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 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).
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).
@@ -412,4 +412,4 @@ Credit goes to:
[#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"
[#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
View File
@@ -148,7 +148,7 @@
#include <Core/HLE/Plugins.h>
ScreenManager *screenManager;
ScreenManager *g_screenManager;
std::string config_filename;
// 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!");
screenManager = new ScreenManager();
g_screenManager = new ScreenManager();
if (g_Config.memStickDirectory.empty()) {
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) {
screenManager->switchScreen(new LogoScreen(AfterLogoScreen::TO_GAME_SETTINGS));
g_screenManager->switchScreen(new LogoScreen(AfterLogoScreen::TO_GAME_SETTINGS));
} else if (gotoTouchScreenTest) {
screenManager->switchScreen(new MainScreen());
screenManager->push(new TouchTestScreen(Path()));
g_screenManager->switchScreen(new MainScreen());
g_screenManager->push(new TouchTestScreen(Path()));
} else if (skipLogo) {
screenManager->switchScreen(new EmuScreen(boot_filename));
g_screenManager->switchScreen(new EmuScreen(boot_filename));
} else {
screenManager->switchScreen(new LogoScreen(AfterLogoScreen::DEFAULT));
g_screenManager->switchScreen(new LogoScreen(AfterLogoScreen::DEFAULT));
}
// Easy testing
@@ -833,7 +833,7 @@ bool CreateGlobalPipelines();
bool NativeInitGraphics(GraphicsContext *graphicsContext) {
INFO_LOG(SYSTEM, "NativeInitGraphics");
_assert_(screenManager);
_assert_(g_screenManager);
// We set this now so any resize during init is processed later.
resized = false;
@@ -864,10 +864,10 @@ bool NativeInitGraphics(GraphicsContext *graphicsContext) {
if (uiContext->Text())
uiContext->Text()->SetFont("Tahoma", 20, 0);
screenManager->setUIContext(uiContext);
screenManager->setDrawContext(g_draw);
screenManager->setPostRenderCallback(&RenderOverlays, nullptr);
screenManager->deviceRestored();
g_screenManager->setUIContext(uiContext);
g_screenManager->setDrawContext(g_draw);
g_screenManager->setPostRenderCallback(&RenderOverlays, nullptr);
g_screenManager->deviceRestored();
#ifdef _WIN32
winAudioBackend = CreateAudioBackend((AudioBackendType)g_Config.iAudioBackend);
@@ -951,8 +951,8 @@ bool CreateGlobalPipelines() {
void NativeShutdownGraphics() {
INFO_LOG(SYSTEM, "NativeShutdownGraphics");
if (screenManager) {
screenManager->deviceLost();
if (g_screenManager) {
g_screenManager->deviceLost();
}
if (gpu)
@@ -1062,7 +1062,7 @@ void RenderOverlays(UIContext *dc, void *userdata) {
void NativeRender(GraphicsContext *graphicsContext) {
_dbg_assert_(graphicsContext != nullptr);
_dbg_assert_(screenManager != nullptr);
_dbg_assert_(g_screenManager != nullptr);
g_GameManager.Update();
@@ -1108,19 +1108,19 @@ void NativeRender(GraphicsContext *graphicsContext) {
ui_draw2d.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;
if (g_Config.bShowGpuProfile)
debugFlags |= Draw::DebugFlags::PROFILE_TIMESTAMPS;
if (g_Config.bGpuLogProfiler)
debugFlags |= Draw::DebugFlags::PROFILE_SCOPES;
screenManager->getDrawContext()->SetDebugFlags(debugFlags);
g_screenManager->getDrawContext()->SetDebugFlags(debugFlags);
// All actual rendering happen in here.
screenManager->render();
if (screenManager->getUIContext()->Text()) {
screenManager->getUIContext()->Text()->OncePerFrame();
g_screenManager->render();
if (g_screenManager->getUIContext()->Text()) {
g_screenManager->getUIContext()->Text()->OncePerFrame();
}
if (resized) {
@@ -1142,7 +1142,7 @@ void NativeRender(GraphicsContext *graphicsContext) {
}
graphicsContext->Resize();
screenManager->resized();
g_screenManager->resized();
// TODO: Move this to the GraphicsContext objects for each backend.
#if !PPSSPP_PLATFORM(WINDOWS) && !defined(ANDROID)
@@ -1259,14 +1259,14 @@ void NativeUpdate() {
for (const auto &item : toProcess) {
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) {
item.cb(item.result, item.value);
}
g_DownloadManager.Update();
screenManager->update();
g_screenManager->update();
g_Discord.Update();
@@ -1275,11 +1275,11 @@ void NativeUpdate() {
bool NativeIsAtTopLevel() {
// This might need some synchronization?
if (!screenManager) {
if (!g_screenManager) {
ERROR_LOG(SYSTEM, "No screen manager active");
return false;
}
Screen *currentScreen = screenManager->topScreen();
Screen *currentScreen = g_screenManager->topScreen();
if (currentScreen) {
bool top = currentScreen->isTopLevel();
INFO_LOG(SYSTEM, "Screen toplevel: %i", (int)top);
@@ -1291,7 +1291,7 @@ bool NativeIsAtTopLevel() {
}
void NativeTouch(const TouchInput &touch) {
if (!screenManager) {
if (!g_screenManager) {
return;
}
@@ -1300,7 +1300,7 @@ void NativeTouch(const TouchInput &touch) {
if (my_isnan(touch.x) || my_isnan(touch.y)) {
return;
}
screenManager->touch(touch);
g_screenManager->touch(touch);
}
bool NativeKey(const KeyInput &key) {
@@ -1323,10 +1323,10 @@ bool NativeKey(const KeyInput &key) {
}
#endif
bool retval = false;
if (screenManager)
if (g_screenManager)
{
HLEPlugins::PluginDataKeys[key.keyCode] = (key.flags & KEY_DOWN) ? 1 : 0;
retval = screenManager->key(key);
retval = g_screenManager->key(key);
}
return retval;
}
@@ -1337,7 +1337,7 @@ void NativeAxis(const AxisInput &axis) {
return;
}
if (!screenManager) {
if (!g_screenManager) {
// Too early.
return;
}
@@ -1346,7 +1346,7 @@ void NativeAxis(const AxisInput &axis) {
// only do special handling of tilt events if tilt is enabled.
HLEPlugins::PluginDataAxis[axis.axisId] = axis.value;
screenManager->axis(axis);
g_screenManager->axis(axis);
if (g_Config.iTiltInputType == TILT_NULL) {
// if tilt events are disabled, don't do anything special.
@@ -1420,10 +1420,10 @@ bool NativeIsRestarting() {
}
void NativeShutdown() {
if (screenManager) {
screenManager->shutdown();
delete screenManager;
screenManager = nullptr;
if (g_screenManager) {
g_screenManager->shutdown();
delete g_screenManager;
g_screenManager = nullptr;
}
#if !PPSSPP_PLATFORM(UWP)
-2
View File
@@ -107,7 +107,6 @@ struct VerySleepy_AddrInfo {
};
static std::wstring windowTitle;
extern ScreenManager *screenManager;
#define TIMER_CURSORUPDATE 1
#define TIMER_CURSORMOVEUPDATE 2
@@ -473,7 +472,6 @@ namespace MainWindow
}
void UpdateWindowTitle() {
// Seems to be fine to call now since we use a UNICODE build...
std::wstring title = windowTitle;
if (PPSSPP_ID >= 1 && GetInstancePeerCount() > 1) {
title.append(ConvertUTF8ToWString(StringFromFormat(" (instance: %d)", (int)PPSSPP_ID)));