Fix segfault on exit
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
|
|||||||
if(kDown & KEY_B)
|
if(kDown & KEY_B)
|
||||||
{
|
{
|
||||||
stopPlayback();
|
stopPlayback();
|
||||||
changeFile(NULL, NULL);
|
changeFile(NULL, &playbackInfo);
|
||||||
consoleSelect(&topScreen);
|
consoleSelect(&topScreen);
|
||||||
puts("Stopped");
|
puts("Stopped");
|
||||||
continue;
|
continue;
|
||||||
@@ -238,8 +238,8 @@ int main(int argc, char **argv)
|
|||||||
out:
|
out:
|
||||||
puts("Exiting...");
|
puts("Exiting...");
|
||||||
runThreads = false;
|
runThreads = false;
|
||||||
stopPlayback();
|
svcSignalEvent(playbackFailEvent);
|
||||||
changeFile(NULL, NULL);
|
changeFile(NULL, &playbackInfo);
|
||||||
|
|
||||||
gfxExit();
|
gfxExit();
|
||||||
sdmcExit();
|
sdmcExit();
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
static volatile bool stop = false;
|
static volatile bool stop = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should only be called from a new thread only.
|
* Should only be called from a new thread only, and have only one playback
|
||||||
|
* thread at time. This function has not been written for more than one
|
||||||
|
* playback thread in mind.
|
||||||
*/
|
*/
|
||||||
void playFile(void* infoIn)
|
void playFile(void* infoIn)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user