mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DolphinQt: adapt so that it can boot games.
This commit is contained in:
24
Source/Core/DolphinQt/VideoInterface/RenderWidget.cpp
Normal file
24
Source/Core/DolphinQt/VideoInterface/RenderWidget.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "DolphinQt/VideoInterface/RenderWidget.h"
|
||||
|
||||
DRenderWidget::DRenderWidget(QWidget* parent_widget)
|
||||
: QWidget(parent_widget)
|
||||
{
|
||||
setAttribute(Qt::WA_NativeWindow, true);
|
||||
setAttribute(Qt::WA_OpaquePaintEvent, true);
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
}
|
||||
|
||||
void DRenderWidget::closeEvent(QCloseEvent* e)
|
||||
{
|
||||
// TODO: update render window positions in config
|
||||
|
||||
// TODO: Do this differently...
|
||||
emit Closed();
|
||||
QWidget::closeEvent(e);
|
||||
}
|
28
Source/Core/DolphinQt/VideoInterface/RenderWidget.h
Normal file
28
Source/Core/DolphinQt/VideoInterface/RenderWidget.h
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class DRenderWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DRenderWidget(QWidget* parent_widget = nullptr);
|
||||
|
||||
protected:
|
||||
// Some window managers start window dragging if an "empty" window area was clicked.
|
||||
// Prevent this by intercepting the mouse press event.
|
||||
void mousePressEvent(QMouseEvent*) override {}
|
||||
void paintEvent(QPaintEvent*) override {}
|
||||
|
||||
private slots:
|
||||
void closeEvent(QCloseEvent* e) override;
|
||||
|
||||
signals:
|
||||
void Closed();
|
||||
};
|
||||
|
@ -1,11 +0,0 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "VideoBackends/OGL/GLInterfaceBase.h"
|
||||
|
||||
cInterfaceBase* HostGL_CreateGLInterface()
|
||||
{
|
||||
// TODO
|
||||
return nullptr;
|
||||
}
|
Reference in New Issue
Block a user