mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 17:59:08 +02:00
Merge pull request #10715 from unknownbrackets/loading
UI: Show more detailed loading status
This commit is contained in:
5 files changed
+28
-2
No files matched your search
@@ -1588,6 +1588,8 @@ void __KernelLoadReset() {
|
||||
bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_string) {
|
||||
SceKernelLoadExecParam param;
|
||||
|
||||
PSP_SetLoading("Loading game...");
|
||||
|
||||
if (paramPtr)
|
||||
Memory::ReadStruct(paramPtr, ¶m);
|
||||
else
|
||||
@@ -1626,6 +1628,7 @@ bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_str
|
||||
|
||||
pspFileSystem.ReadFile(handle, temp, (size_t)info.size);
|
||||
|
||||
PSP_SetLoading("Loading modules...");
|
||||
Module *module = __KernelLoadModule(temp, (size_t)info.size, 0, error_string);
|
||||
|
||||
if (!module || module->isFake) {
|
||||
@@ -1666,6 +1669,7 @@ bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_str
|
||||
if (module->nm.module_start_thread_stacksize != 0)
|
||||
option.stacksize = module->nm.module_start_thread_stacksize;
|
||||
|
||||
PSP_SetLoading("Starting modules...");
|
||||
if (paramPtr)
|
||||
__KernelStartModule(module, param.args, (const char*)param_argp, &option);
|
||||
else
|
||||
@@ -1682,6 +1686,7 @@ bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_str
|
||||
|
||||
bool __KernelLoadGEDump(const std::string &base_filename, std::string *error_string) {
|
||||
__KernelLoadReset();
|
||||
PSP_SetLoading("Generating code...");
|
||||
|
||||
mipsr4k.pc = PSP_GetUserMemoryBase();
|
||||
|
||||
|
||||
@@ -81,6 +81,8 @@ ParamSFOData g_paramSFO;
|
||||
static GlobalUIState globalUIState;
|
||||
static CoreParameter coreParameter;
|
||||
static FileLoader *loadedFile;
|
||||
static std::mutex loadingReasonLock;
|
||||
static std::string loadingReason;
|
||||
|
||||
bool audioInitialized;
|
||||
|
||||
@@ -311,6 +313,7 @@ bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) {
|
||||
}
|
||||
coreParameter.errorString = "";
|
||||
pspIsIniting = true;
|
||||
PSP_SetLoading("Loading game...");
|
||||
|
||||
CPU_Init();
|
||||
|
||||
@@ -334,6 +337,7 @@ bool PSP_InitUpdate(std::string *error_string) {
|
||||
bool success = coreParameter.fileToStart != "";
|
||||
*error_string = coreParameter.errorString;
|
||||
if (success && gpu == nullptr) {
|
||||
PSP_SetLoading("Starting graphics...");
|
||||
success = GPU_Init(coreParameter.graphicsContext, coreParameter.thin3d);
|
||||
if (!success) {
|
||||
PSP_Shutdown();
|
||||
@@ -416,6 +420,17 @@ void PSP_RunLoopFor(int cycles) {
|
||||
PSP_RunLoopUntil(CoreTiming::GetTicks() + cycles);
|
||||
}
|
||||
|
||||
void PSP_SetLoading(const std::string &reason) {
|
||||
std::lock_guard<std::mutex> guard(loadingReasonLock);
|
||||
loadingReason = reason;
|
||||
}
|
||||
|
||||
std::string PSP_GetLoading() {
|
||||
std::lock_guard<std::mutex> guard(loadingReasonLock);
|
||||
return loadingReason;
|
||||
|
||||
}
|
||||
|
||||
CoreParameter &PSP_CoreParameter() {
|
||||
return coreParameter;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,9 @@ void PSP_EndHostFrame();
|
||||
void PSP_RunLoopUntil(u64 globalticks);
|
||||
void PSP_RunLoopFor(int cycles);
|
||||
|
||||
void PSP_SetLoading(const std::string &reason);
|
||||
std::string PSP_GetLoading();
|
||||
|
||||
// Call before PSP_BeginHostFrame() in order to not miss any GPU stats.
|
||||
void Core_UpdateDebugStats(bool collectStats);
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/Reporting.h""
|
||||
#include "Core/System.h"
|
||||
#include "GPU/Math3D.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
@@ -869,6 +870,8 @@ bool ShaderManagerGLES::ContinuePrecompile(float sliceTime) {
|
||||
return true;
|
||||
}
|
||||
|
||||
PSP_SetLoading("Compiling shaders...");
|
||||
|
||||
double start = real_time_now();
|
||||
// Let's try to keep it under sliceTime if possible.
|
||||
double end = start + sliceTime;
|
||||
|
||||
+1
-1
@@ -861,7 +861,7 @@ void EmuScreen::CreateViews() {
|
||||
root_->Add(new OnScreenMessagesView(new AnchorLayoutParams((Size)bounds.w, (Size)bounds.h)));
|
||||
|
||||
GameInfoBGView *loadingBG = root_->Add(new GameInfoBGView(gamePath_, new AnchorLayoutParams(FILL_PARENT, FILL_PARENT)));
|
||||
TextView *loadingTextView = root_->Add(new TextView(sc->T("Loading game..."), new AnchorLayoutParams(bounds.centerX(), bounds.centerY(), NONE, NONE, true)));
|
||||
TextView *loadingTextView = root_->Add(new TextView(sc->T(PSP_GetLoading()), new AnchorLayoutParams(bounds.centerX(), bounds.centerY(), NONE, NONE, true)));
|
||||
static const int symbols[4] = {
|
||||
I_CROSS,
|
||||
I_CIRCLE,
|
||||
|
||||
Reference in new issue
Block a user