mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Another one bites the dust (SendUIMessage)
This commit is contained in:
parent
56c26eef4d
commit
adccc480a0
9 changed files with 11 additions and 14 deletions
|
@ -130,3 +130,4 @@ inline void System_SetWindowTitle(const std::string ¶m) {
|
|||
|
||||
// Non-inline to avoid including Path.h
|
||||
void System_CreateGameShortcut(const Path &path, const std::string &title);
|
||||
|
||||
|
|
|
@ -200,6 +200,9 @@ std::vector<std::string> System_GetCameraDeviceList();
|
|||
bool System_AudioRecordingIsAvailable();
|
||||
bool System_AudioRecordingState();
|
||||
|
||||
// This will be changed to take an enum. Currently simply implemented by forwarding to NativeMessageReceived.
|
||||
void System_PostUIMessage(const std::string &message, const std::string ¶m);
|
||||
|
||||
// For these functions, most platforms will use the implementation provided in UI/AudioCommon.cpp,
|
||||
// no need to implement separately.
|
||||
void System_AudioGetDebugStats(char *buf, size_t bufSize);
|
||||
|
|
|
@ -31,7 +31,6 @@ public:
|
|||
virtual void ToggleDebugConsoleVisibility() {}
|
||||
|
||||
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) {}
|
||||
|
||||
virtual void SendDebugOutput(const std::string &output) {}
|
||||
virtual void SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h) {}
|
||||
|
|
|
@ -307,7 +307,7 @@ bool Load_PSP_ISO(FileLoader *fileLoader, std::string *error_string) {
|
|||
|
||||
//in case we didn't go through EmuScreen::boot
|
||||
g_Config.loadGameConfig(id, g_paramSFO.GetValueString("TITLE"));
|
||||
host->SendUIMessage("config_loaded", "");
|
||||
System_PostUIMessage("config_loaded", "");
|
||||
INFO_LOG(LOADER, "Loading %s...", bootpath.c_str());
|
||||
|
||||
PSPLoaders_Shutdown();
|
||||
|
|
|
@ -41,10 +41,6 @@ public:
|
|||
osm.Show(message, duration, color, -1, true, id);
|
||||
}
|
||||
|
||||
void SendUIMessage(const std::string &message, const std::string &value) override {
|
||||
NativeMessageReceived(message.c_str(), value.c_str());
|
||||
}
|
||||
|
||||
private:
|
||||
Path SymbolMapFilename(Path currentFilename);
|
||||
MainWindow* mainWindow;
|
||||
|
|
|
@ -23,15 +23,7 @@
|
|||
|
||||
class NativeHost : public Host {
|
||||
public:
|
||||
NativeHost() {}
|
||||
|
||||
void UpdateSound() override {}
|
||||
|
||||
void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override {
|
||||
osm.Show(message, duration, color, -1, true, id);
|
||||
}
|
||||
|
||||
void SendUIMessage(const std::string &message, const std::string &value) override {
|
||||
NativeMessageReceived(message.c_str(), value.c_str());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1354,6 +1354,10 @@ void NativeMessageReceived(const char *message, const char *value) {
|
|||
pendingMessages.push_back(pendingMessage);
|
||||
}
|
||||
|
||||
void System_PostUIMessage(const std::string &message, const std::string &value) {
|
||||
NativeMessageReceived(message.c_str(), value.c_str());
|
||||
}
|
||||
|
||||
void NativeResized() {
|
||||
// NativeResized can come from any thread so we just set a flag, then process it later.
|
||||
VERBOSE_LOG(G3D, "NativeResized - setting flag");
|
||||
|
|
|
@ -115,6 +115,7 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
|||
}
|
||||
}
|
||||
void System_Notify(SystemNotification notification) {}
|
||||
void System_PostUIMessage(const std::string &message, const std::string ¶m) {}
|
||||
bool System_MakeRequest(SystemRequestType type, int requestId, const std::string ¶m1, const std::string ¶m2, int param3) { return false; }
|
||||
void System_InputBoxGetString(const std::string &title, const std::string &defaultValue, std::function<void(bool, const std::string &)> cb) { cb(false, ""); }
|
||||
void System_AskForPermission(SystemPermission permission) {}
|
||||
|
|
|
@ -88,6 +88,7 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
|||
}
|
||||
}
|
||||
void System_Notify(SystemNotification notification) {}
|
||||
void System_PostUIMessage(const std::string &message, const std::string ¶m) {}
|
||||
void System_AudioGetDebugStats(char *buf, size_t bufSize) { if (buf) buf[0] = '\0'; }
|
||||
void System_AudioClear() {}
|
||||
void System_AudioPushSamples(const s32 *audio, int numSamples) {}
|
||||
|
|
Loading…
Add table
Reference in a new issue