Make Qt work

This commit is contained in:
offtkp 2024-08-08 23:15:53 +03:00
parent 67069a8826
commit a4fcb1c4dc
7 changed files with 61 additions and 20 deletions

View file

@ -109,7 +109,7 @@ class Emulator {
#ifdef PANDA3DS_FRONTEND_QT
// For passing the GL context from Qt to the renderer
void initGraphicsContext(GL::Context* glContext) { gpu.initGraphicsContext(nullptr); }
void initGraphicsContext(GL::Context* glContext) { gpu.initGraphicsContext(glContext); }
#else
void initGraphicsContext(SDL_Window* window) { gpu.initGraphicsContext(window); }
#endif

View file

@ -108,6 +108,7 @@ class RendererGL final : public Renderer {
void reset() override;
void display() override; // Display the 3DS screen contents to the window
void initGraphicsContext(SDL_Window* window) override; // Initialize graphics context
void clearBuffer(u32 startAddress, u32 endAddress, u32 value, u32 control) override; // Clear a GPU buffer in VRAM
void displayTransfer(u32 inputAddr, u32 outputAddr, u32 inputSize, u32 outputSize, u32 flags) override; // Perform display transfer
void textureCopy(u32 inputAddr, u32 outputAddr, u32 totalBytes, u32 inputSize, u32 outputSize, u32 flags) override;
@ -129,9 +130,7 @@ class RendererGL final : public Renderer {
void initUbershader(OpenGL::Program& program);
#ifdef PANDA3DS_FRONTEND_QT
virtual void initGraphicsContext(GL::Context* context) override;
#elif defined(PANDA3DS_FRONTEND_SDL)
virtual void initGraphicsContext(SDL_Window* window) override;
void initGraphicsContext(GL::Context* context) override;
#endif
// Take a screenshot of the screen and store it in a file