Core: Code cleanup

This commit is contained in:
Vicki Pfau 2023-04-13 01:54:06 -07:00
parent fca0505f38
commit f40222f0ee
2 changed files with 2 additions and 3 deletions

View File

@ -279,8 +279,7 @@ void mCoreConfigDirectory(char* out, size_t outLength) {
void mCoreConfigPortablePath(char* out, size_t outLength) {
#ifdef _WIN32
wchar_t wpath[MAX_PATH];
HMODULE hModule = GetModuleHandleW(NULL);
GetModuleFileNameW(hModule, wpath, MAX_PATH);
GetModuleFileNameW(NULL, wpath, MAX_PATH);
PathRemoveFileSpecW(wpath);
if (PATH_SEP[0] != '\\') {
WCHAR* pathSep;

View File

@ -453,7 +453,7 @@ bool mCoreSaveStateNamed(struct mCore* core, struct VFile* vf, int flags) {
UNUSED(flags);
#endif
vf->truncate(vf, stateSize);
struct GBASerializedState* state = vf->map(vf, stateSize, MAP_WRITE);
void* state = vf->map(vf, stateSize, MAP_WRITE);
if (!state) {
mStateExtdataDeinit(&extdata);
if (cheatVf) {