Skip to content

Commit

Permalink
#582 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed Aug 11, 2018
1 parent 3275257 commit 6e4b33e
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,22 +1075,26 @@ static void onConsoleLoadCommandConfirmed(Console* console, const char* param)

static void load(Console* console, const char* path, const char* hash)
{
s32 size = 0;
const char* name = getCartName(path);
if(hash)
{
s32 size = 0;
const char* name = getCartName(path);

void* data = fsLoadFileByHash(console->fs, hash, &size);
void* data = fsLoadFileByHash(console->fs, hash, &size);

if(data)
{
console->showGameMenu = true;
if(data)
{
console->showGameMenu = true;

loadRom(console->tic, data, size, true);
onCartLoaded(console, name);
loadRom(console->tic, data, size, true);
onCartLoaded(console, name);

free(data);
}
free(data);
}

commandDone(console);
commandDone(console);
}
else onConsoleLoadCommandConfirmed(console, path);
}

typedef void(*ConfirmCallback)(Console* console, const char* param);
Expand Down

0 comments on commit 6e4b33e

Please sign in to comment.