Delete unused code

This commit is contained in:
Henrik Rydgård committed 2024-12-08 11:25:00 +01:00
1 parent 59ddc7f568
commit b3d08977d5
8 files changed
+4 -50

No files matched your search

+1 -5
View File
@@ -1895,8 +1895,6 @@ void __KernelLoadReset() {
bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_string) {
SceKernelLoadExecParam param{};
PSP_SetLoading("Loading exec...");
auto paramData = PSPPointer<SceKernelLoadExecParam>::Create(paramPtr);
if (paramData.IsValid()) {
param = *paramData;
@@ -1929,7 +1927,6 @@ bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_str
return false;
}
PSP_SetLoading("Loading modules...");
size_t size = fileData.size();
PSPModule *module = __KernelLoadModule(fileData.data(), size, 0, error_string);
@@ -1969,7 +1966,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...");
INFO_LOG(Log::System, "Starting modules...");
if (paramPtr)
__KernelStartModule(module, param.args, (const char*)param_argp, &option);
else
@@ -1986,7 +1983,6 @@ 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();
+1 -1
View File
@@ -321,7 +321,7 @@ bool Load_PSP_ISO(FileLoader *fileLoader, std::string *error_string) {
AndroidJNIThreadContext jniContext;
PSP_SetLoading("Loading executable...");
INFO_LOG(Log::System, "Loading executable...");
// TODO: We can't use the initial error_string pointer.
bool success = __KernelLoadExec(bootpath.c_str(), 0, &PSP_CoreParameter().errorString);
if (success && coreState == CORE_POWERUP) {
+1 -24
View File
@@ -79,14 +79,7 @@
enum CPUThreadState {
CPU_THREAD_NOT_RUNNING,
CPU_THREAD_PENDING,
CPU_THREAD_STARTING,
CPU_THREAD_RUNNING,
CPU_THREAD_SHUTDOWN,
CPU_THREAD_QUIT,
CPU_THREAD_EXECUTE,
CPU_THREAD_RESUME,
};
MetaFileSystem pspFileSystem;
@@ -96,11 +89,6 @@ CoreParameter g_CoreParameter;
static FileLoader *g_loadedFile;
// For background loading thread.
static std::mutex loadingLock;
// For loadingReason updates.
static std::mutex loadingReasonLock;
static std::string loadingReason;
bool audioInitialized;
bool coreCollectDebugStats = false;
static int coreCollectDebugStatsCounter = 0;
@@ -441,7 +429,6 @@ bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) {
}
g_CoreParameter.errorString.clear();
pspIsIniting = true;
PSP_SetLoading("Loading game...");
Path filename = g_CoreParameter.fileToStart;
FileLoader *loadedFile = ResolveFileLoaderTarget(ConstructFileLoader(filename));
@@ -500,7 +487,7 @@ bool PSP_InitUpdate(std::string *error_string) {
}
if (success && gpu == nullptr) {
PSP_SetLoading("Starting graphics...");
INFO_LOG(Log::System, "Starting graphics...");
Draw::DrawContext *draw = g_CoreParameter.graphicsContext ? g_CoreParameter.graphicsContext->GetDrawContext() : nullptr;
success = GPU_Init(g_CoreParameter.graphicsContext, draw);
if (!success) {
@@ -671,16 +658,6 @@ 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;
}
Path GetSysDirectory(PSPDirectories directoryType) {
const Path &memStickDirectory = g_Config.memStickDirectory;
Path pspDirectory;
-3
View File
@@ -86,9 +86,6 @@ void PSP_RunLoopWhileState();
void PSP_RunLoopUntil(u64 globalticks);
void PSP_RunLoopFor(int cycles);
void PSP_SetLoading(const std::string &reason);
std::string PSP_GetLoading();
// Used to wait for background loading thread.
struct PSP_LoadingLock {
PSP_LoadingLock();
-2
View File
@@ -1088,8 +1088,6 @@ bool ShaderManagerGLES::LoadCache(File::IOFile &f) {
return true;
}
PSP_SetLoading("Compiling shaders...");
double start = time_now_d();
for (size_t &i = pending.vertPos; i < pending.vert.size(); i++) {
-1
View File
@@ -103,7 +103,6 @@ void GPU_Vulkan::LoadCache(const Path &filename) {
return;
}
PSP_SetLoading("Loading shader cache...");
// Actually precompiled by IsReady() since we're single-threaded.
FILE *f = File::OpenCFile(filename, "rb");
if (!f)
+1 -13
View File
@@ -1159,8 +1159,6 @@ void EmuScreen::CreateViews() {
root_->Add(saveStatePreview_);
GameInfoBGView *loadingBG = root_->Add(new GameInfoBGView(gamePath_, new AnchorLayoutParams(FILL_PARENT, FILL_PARENT)));
TextView *loadingTextView = root_->Add(new TextView(sc->T(PSP_GetLoading()), new AnchorLayoutParams(bounds.centerX(), NONE, NONE, 40, true)));
loadingTextView_ = loadingTextView;
static const ImageID symbols[4] = {
ImageID("I_CROSS"),
@@ -1173,17 +1171,11 @@ void EmuScreen::CreateViews() {
loadingSpinner_ = loadingSpinner;
loadingBG->SetTag("LoadingBG");
loadingTextView->SetTag("LoadingText");
loadingSpinner->SetTag("LoadingSpinner");
// Don't really need this, and it creates a lot of strings to translate...
loadingTextView->SetVisibility(V_GONE);
loadingTextView->SetShadow(true);
loadingViewColor_ = loadingSpinner->AddTween(new CallbackColorTween(0x00FFFFFF, 0x00FFFFFF, 0.2f, &bezierEaseInOut));
loadingViewColor_->SetCallback([loadingBG, loadingTextView, loadingSpinner](View *v, uint32_t c) {
loadingViewColor_->SetCallback([loadingBG, loadingSpinner](View *v, uint32_t c) {
loadingBG->SetColor(c & 0xFFC0C0C0);
loadingTextView->SetTextColor(c);
loadingSpinner->SetColor(alphaMul(c, 0.7f));
});
loadingViewColor_->Persist();
@@ -1504,10 +1496,6 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
}
if (invalid_) {
// Loading, or after shutdown?
if (loadingTextView_ && loadingTextView_->GetVisibility() == UI::V_VISIBLE)
loadingTextView_->SetText(PSP_GetLoading());
// It's possible this might be set outside PSP_RunLoopFor().
// In this case, we need to double check it here.
if (mode & ScreenRenderMode::TOP) {
-1
View File
@@ -117,7 +117,6 @@ private:
UI::CallbackColorTween *loadingViewColor_ = nullptr;
UI::VisibilityTween *loadingViewVisible_ = nullptr;
UI::Spinner *loadingSpinner_ = nullptr;
UI::TextView *loadingTextView_ = nullptr;
UI::Button *resumeButton_ = nullptr;
UI::Button *resetButton_ = nullptr;
UI::Button *backButton_ = nullptr;