Finish integrating TX
This commit is contained in:
@ -26,15 +26,11 @@ void unload_ctr_dec() {
|
||||
}
|
||||
|
||||
void request_restart() {
|
||||
HANDLE hRestartFlag = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, "Global\\JadeiteRestartFlag");
|
||||
int *restartFlag = MapViewOfFile(hRestartFlag, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(int));
|
||||
if (!restartFlag) {
|
||||
msg_err_a("Could not map shared memory to set restart flag");
|
||||
}
|
||||
wchar_t restartFlagFile[MAX_PATH];
|
||||
GetTempPathW(MAX_PATH, restartFlagFile);
|
||||
wcscat(restartFlagFile, L"jadeite\\restart_flag");
|
||||
|
||||
*restartFlag = 1;
|
||||
|
||||
UnmapViewOfFile(restartFlag);
|
||||
HANDLE hRestartFlag = CreateFileW(restartFlagFile, FILE_WRITE_ACCESS, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
CloseHandle(hRestartFlag);
|
||||
}
|
||||
|
||||
@ -63,7 +59,7 @@ static void _run_tx(struct game_data *game, wchar_t *txFile) {
|
||||
|
||||
// ...more magic
|
||||
size_t tableSize;
|
||||
void *table = core_perform_tx(&tableSize);
|
||||
void *table = core_perform_tx(game, &tableSize);
|
||||
|
||||
// Save to file
|
||||
utils_create_dir_recursively(txFile);
|
||||
|
||||
Reference in New Issue
Block a user