Merge remote-tracking branch 'upstream/master' into stencil-logicop-clear

This commit is contained in:
wheremyfoodat 2023-07-27 14:23:00 +03:00
commit 03733569e0
6 changed files with 133 additions and 12 deletions

View file

@ -61,7 +61,7 @@ class Emulator {
#ifdef PANDA3DS_ENABLE_HTTP_SERVER
HttpServer httpServer;
friend class HttpServer;
friend struct HttpServer;
#endif
// Keep the handle for the ROM here to reload when necessary and to prevent deleting it

View file

@ -4,6 +4,7 @@
#include <array>
#include <atomic>
#include <condition_variable>
#include <filesystem>
#include <map>
#include <memory>
#include <mutex>
@ -12,12 +13,12 @@
#include "helpers.hpp"
enum class HttpActionType { None, Screenshot, Key, TogglePause, Reset };
enum class HttpActionType { None, Screenshot, Key, TogglePause, Reset, LoadRom };
class Emulator;
namespace httplib {
class Server;
class Response;
struct Response;
}
// Wrapper for httplib::Response that allows the HTTP server to wait for the response to be ready
@ -41,7 +42,8 @@ class HttpAction {
HttpActionType getType() const { return type; }
static std::unique_ptr<HttpAction> createScreenshotAction(DeferredResponseWrapper& response);
static std::unique_ptr<HttpAction> createKeyAction(uint32_t key, bool state);
static std::unique_ptr<HttpAction> createKeyAction(u32 key, bool state);
static std::unique_ptr<HttpAction> createLoadRomAction(DeferredResponseWrapper& response, const std::filesystem::path& path, bool paused);
static std::unique_ptr<HttpAction> createTogglePauseAction();
static std::unique_ptr<HttpAction> createResetAction();
};