mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Move SkipUI function
This commit is contained in:
parent
f60f5ccaea
commit
5fae4f36db
5 changed files with 7 additions and 5 deletions
|
@ -132,6 +132,8 @@ enum SystemProperty {
|
|||
SYSPROP_CAN_JIT,
|
||||
|
||||
SYSPROP_KEYBOARD_LAYOUT,
|
||||
|
||||
SYSPROP_SKIP_UI,
|
||||
};
|
||||
|
||||
enum class SystemNotification {
|
||||
|
|
|
@ -45,8 +45,6 @@ public:
|
|||
virtual void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) {}
|
||||
virtual void SendUIMessage(const std::string &message, const std::string &value) {}
|
||||
|
||||
// Used for headless.
|
||||
virtual bool ShouldSkipUI() { return false; }
|
||||
virtual void SendDebugOutput(const std::string &output) {}
|
||||
virtual void SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h) {}
|
||||
};
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include <algorithm>
|
||||
|
||||
#include "ext/xxhash.h"
|
||||
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Data/Color/RGBAUtil.h"
|
||||
#include "Common/File/VFS/VFS.h"
|
||||
#include "Common/Data/Format/ZIMLoad.h"
|
||||
|
@ -237,7 +239,7 @@ void __PPGeSetupListArgs()
|
|||
|
||||
void __PPGeInit() {
|
||||
// PPGe isn't really important for headless, and LoadZIM takes a long time.
|
||||
bool skipZIM = host->ShouldSkipUI();
|
||||
bool skipZIM = System_GetPropertyBool(SYSPROP_SKIP_UI);
|
||||
|
||||
u8 *imageData[12]{};
|
||||
int width[12]{};
|
||||
|
|
|
@ -108,6 +108,8 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
|||
switch (prop) {
|
||||
case SYSPROP_CAN_JIT:
|
||||
return true;
|
||||
case SYSPROP_SKIP_UI:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -36,8 +36,6 @@ public:
|
|||
|
||||
bool AttemptLoadSymbolMap() override { g_symbolMap->Clear(); return false; }
|
||||
|
||||
bool ShouldSkipUI() override { return true; }
|
||||
|
||||
void SendDebugOutput(const std::string &output) override {
|
||||
if (output.find('\n') != output.npos) {
|
||||
DoFlushDebugOutput();
|
||||
|
|
Loading…
Add table
Reference in a new issue