Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
melonDS
Commits
d21cd202
Commit
d21cd202
authored
Jul 31, 2020
by
Arisotura
Browse files
fix some pause bugs
parent
a89741c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/frontend/qt_sdl/main.cpp
View file @
d21cd202
...
...
@@ -255,6 +255,7 @@ EmuThread::EmuThread(QObject* parent) : QThread(parent)
{
EmuStatus
=
0
;
EmuRunning
=
2
;
EmuPause
=
0
;
RunningSomething
=
false
;
connect
(
this
,
SIGNAL
(
windowUpdate
()),
mainWindow
->
panel
,
SLOT
(
update
()));
...
...
@@ -564,6 +565,7 @@ void EmuThread::changeWindowTitle(char* title)
void
EmuThread
::
emuRun
()
{
EmuRunning
=
1
;
EmuPause
=
0
;
RunningSomething
=
true
;
// checkme
...
...
@@ -574,6 +576,9 @@ void EmuThread::emuRun()
void
EmuThread
::
emuPause
()
{
EmuPause
++
;
if
(
EmuPause
>
1
)
return
;
PrevEmuStatus
=
EmuRunning
;
EmuRunning
=
2
;
while
(
EmuStatus
!=
2
);
...
...
@@ -584,6 +589,11 @@ void EmuThread::emuPause()
void
EmuThread
::
emuUnpause
()
{
if
(
EmuPause
<
1
)
return
;
EmuPause
--
;
if
(
EmuPause
>
0
)
return
;
EmuRunning
=
PrevEmuStatus
;
if
(
audioDevice
)
SDL_PauseAudioDevice
(
audioDevice
,
0
);
...
...
@@ -593,6 +603,7 @@ void EmuThread::emuUnpause()
void
EmuThread
::
emuStop
()
{
EmuRunning
=
0
;
EmuPause
=
0
;
if
(
audioDevice
)
SDL_PauseAudioDevice
(
audioDevice
,
1
);
if
(
micDevice
)
SDL_PauseAudioDevice
(
micDevice
,
1
);
...
...
src/frontend/qt_sdl/main.h
View file @
d21cd202
...
...
@@ -74,6 +74,7 @@ private:
volatile
int
EmuStatus
;
int
PrevEmuStatus
;
int
EmuRunning
;
int
EmuPause
;
QOffscreenSurface
*
oglSurface
;
QOpenGLContext
*
oglContext
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment