Simplified some code.

This commit is contained in:
heavygabriel 2021-01-12 17:04:27 -05:00
parent 819ec41320
commit 6d3b2fe902
3 changed files with 4 additions and 7 deletions

View File

@ -163,10 +163,8 @@ SDL2_RWops_t* RWNativeStart2(x86emu_t* emu, SDL2_RWops_t* ops)
void RWNativeEnd2(SDL2_RWops_t* ops)
{
if(!ops)
return;
if(ops->type != BOX86RW)
if(!ops || ops->type != BOX86RW)
return; // do nothing
ops->hidden.my.custom_free(ops);

View File

@ -93,7 +93,6 @@ uint32_t RunFunctionWithEmu(x86emu_t *emu, int QuitOnLongJump, uintptr_t fnc, in
emu->quit = old_quit;
emu->quitonlongjmp = oldlong;
uint32_t ret = R_EAX;
return ret;
return R_EAX;
}

View File

@ -596,9 +596,9 @@ bool test_mmx_cpuid() {
int has_mmx = !!(edx & (1 << 23));
if (has_mmx) {
return 0;
} else {
}
return 1;
}
}
int main() {