mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 08:51:05 +00:00
Fix for Issue #449 Qt errors on startup.
windowHandle() is not initialized until the Window is shown. Moved the slot connect to main.cpp file after show(). Had to change the OnFramebufferSizeChanged(); to a slot.
This commit is contained in:
parent
1981aa3d7e
commit
315b8b5b8f
@ -168,10 +168,6 @@ GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this
|
||||
NotifyClientAreaSizeChanged(std::pair<unsigned,unsigned>(child->width(), child->height()));
|
||||
|
||||
BackupGeometry();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this, SLOT(OnFramebufferSizeChanged()));
|
||||
#endif
|
||||
}
|
||||
|
||||
void GRenderWindow::moveContext()
|
||||
|
@ -129,11 +129,11 @@ public:
|
||||
|
||||
void OnClientAreaResized(unsigned width, unsigned height);
|
||||
|
||||
void OnFramebufferSizeChanged();
|
||||
|
||||
public slots:
|
||||
void moveContext(); // overridden
|
||||
|
||||
void OnFramebufferSizeChanged();
|
||||
|
||||
private:
|
||||
void OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) override;
|
||||
|
||||
|
@ -160,6 +160,10 @@ GMainWindow::GMainWindow()
|
||||
|
||||
show();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
connect(render_window->windowHandle(), SIGNAL(screenChanged(QScreen*)), render_window, SLOT(OnFramebufferSizeChanged()));
|
||||
#endif
|
||||
|
||||
QStringList args = QApplication::arguments();
|
||||
if (args.length() >= 2) {
|
||||
BootGame(args[1].toStdString());
|
||||
|
Loading…
Reference in New Issue
Block a user