mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-08-28 21:25:54 +00:00
Qt: Re-add Metal
This commit is contained in:
parent
1e34440479
commit
4d234d9147
3 changed files with 8 additions and 4 deletions
|
@ -10,7 +10,7 @@
|
|||
#include "cheats.hpp"
|
||||
#include "input_mappings.hpp"
|
||||
#include "panda_qt/dsp_debugger.hpp"
|
||||
#include "panda_qt/screen/screen_gl.hpp"
|
||||
#include "panda_qt/screen/screen_mtl.hpp"
|
||||
#include "sdl_sensors.hpp"
|
||||
#include "services/dsp.hpp"
|
||||
#include "version.hpp"
|
||||
|
@ -38,7 +38,7 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent)
|
|||
api = ScreenWidget::API::Metal;
|
||||
|
||||
// We pass a callback to the screen widget that will be triggered every time we resize the screen
|
||||
screen = new ScreenWidgetGL(api, [this](u32 width, u32 height) { handleScreenResize(width, height); }, this);
|
||||
screen = new ScreenWidgetMTL(api, [this](u32 width, u32 height) { handleScreenResize(width, height); }, this);
|
||||
setCentralWidget(screen);
|
||||
|
||||
appRunning = true;
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
#include <qpa/qplatformnativeinterface.h>
|
||||
#endif
|
||||
|
||||
#include "panda_qt/screen//screen_mtl.hpp"
|
||||
#include "panda_qt/screen/screen.hpp"
|
||||
#include "panda_qt/screen/screen_gl.hpp"
|
||||
#include "panda_qt/screen/screen_mtl.hpp"
|
||||
|
||||
// Screen widget, based on https://github.com/stenzek/duckstation/blob/master/src/duckstation-qt/displaywidget.cpp
|
||||
// and https://github.com/melonDS-emu/melonDS/blob/master/src/frontend/qt_sdl/main.cpp
|
||||
|
|
|
@ -9,6 +9,10 @@ ScreenWidgetMTL::ScreenWidgetMTL(API api, ResizeCallback resizeCallback, QWidget
|
|||
show();
|
||||
}
|
||||
|
||||
void ScreenWidgetMTL::resizeDisplay() { resizeMetalView(); }
|
||||
void ScreenWidgetMTL::resizeDisplay() {
|
||||
resizeMetalView();
|
||||
resizeCallback(surfaceWidth, surfaceHeight);
|
||||
}
|
||||
|
||||
bool ScreenWidgetMTL::createContext() { return createMetalContext(); }
|
||||
void* ScreenWidgetMTL::getMTKLayer() { return mtkLayer; }
|
Loading…
Add table
Add a link
Reference in a new issue