mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Add facility to run callbacks on the window thread
This commit is contained in:
@@ -144,3 +144,9 @@ void System_ShowFileInFolder(const Path &path) {
|
||||
void System_BrowseForFolder(RequesterToken token, std::string_view title, const Path &initialPath, RequestCallback callback, RequestFailedCallback failedCallback) {
|
||||
g_requestManager.MakeSystemRequest(SystemRequestType::BROWSE_FOR_FOLDER, token, callback, failedCallback, title, initialPath.ToCString(), 0);
|
||||
}
|
||||
|
||||
void System_RunCallbackInWndProc(void (*callback)(void *, void *), void *userdata) {
|
||||
int64_t castPtr = (int64_t)callback;
|
||||
int64_t castUserData = (int64_t)userdata;
|
||||
g_requestManager.MakeSystemRequest(SystemRequestType::RUN_CALLBACK_IN_WNDPROC, NO_REQUESTER_TOKEN, nullptr, nullptr, "", "", castPtr, castUserData);
|
||||
}
|
||||
|
||||
@@ -176,6 +176,8 @@ inline void System_SendDebugScreenshot(std::string_view data, int height) {
|
||||
g_requestManager.MakeSystemRequest(SystemRequestType::SEND_DEBUG_SCREENSHOT, NO_REQUESTER_TOKEN, nullptr, nullptr, data, "", height);
|
||||
}
|
||||
|
||||
void System_RunCallbackInWndProc(void (*callback)(void *, void *), void *userdata);
|
||||
|
||||
// Non-inline to avoid including Path.h
|
||||
void System_CreateGameShortcut(const Path &path, std::string_view title);
|
||||
void System_ShowFileInFolder(const Path &path);
|
||||
|
||||
@@ -86,6 +86,8 @@ enum class SystemRequestType {
|
||||
GPS_COMMAND,
|
||||
INFRARED_COMMAND,
|
||||
MICROPHONE_COMMAND,
|
||||
|
||||
RUN_CALLBACK_IN_WNDPROC,
|
||||
};
|
||||
|
||||
// Implementations are supposed to process the request, and post the response to the g_RequestManager (see Message.h).
|
||||
|
||||
Reference in New Issue
Block a user