forked from thedax/ppsspp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqtemugl.cpp
75 lines (62 loc) · 1008 Bytes
/
qtemugl.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include "qtemugl.h"
QtEmuGL::QtEmuGL(QWidget *parent) :
QGLWidget(parent),
running_(false),
thread()
{
setAutoBufferSwap(false);
}
void QtEmuGL::init(InputState *inputState)
{
thread.init(inputState);
}
void QtEmuGL::SetRunning(bool value)
{
running_ = value;
}
void QtEmuGL::initializeGL()
{
}
void QtEmuGL::paintGL()
{
update();
}
void QtEmuGL::start_rendering()
{
thread.start();
}
void QtEmuGL::stop_rendering()
{
thread.setRunning(false);
thread.wait();
thread.Shutdown();
}
void QtEmuGL::start_game(QString filename)
{
thread.startGame(filename);
}
void QtEmuGL::stop_game()
{
thread.stopGame();
}
void QtEmuGL::LockDraw(bool value)
{
thread.LockGL(value);
}
void QtEmuGL::resizeEvent(QResizeEvent *evt)
{
// TODO
//glt.resizeViewport(evt->size());
}
void QtEmuGL::paintEvent(QPaintEvent *)
{
}
void QtEmuGL::closeEvent(QCloseEvent *evt)
{
//TODO stopRendering();
QGLWidget::closeEvent(evt);
}
void QtEmuGL::mouseDoubleClickEvent(QMouseEvent *)
{
emit doubleClick();
}