#include "xbox_ref_bridge.h"
+#include "xbox_region.h"
#include <string.h>
}
-static int xbox_ref_gdr8050l_dump_core(HANDLE hDevice, const char *device, const char *filename, char mode, BOOL ownsHandle, xbox_ref_dump_result *result)
+static int xbox_ref_gdr8050l_dump_core(HANDLE hDevice, const char *device,
+ const char *filename, char mode,
+ BOOL ownsHandle,
+ xbox_ref_cancel_func cancel,
+ void *cancel_data,
+ xbox_ref_dump_result *result)
{
char driveLetter;
XboxGameInfo game;
strncpy(result->media_id, mediaId, sizeof(result->media_id) - 1);
result->media_id[sizeof(result->media_id) - 1] = '\0';
}
+ if (game.Success) {
+ result->have_game_region = 1;
+ result->game_region = game.GameRegion;
+ xbox_region_format(game.GameRegion,
+ result->region,
+ sizeof(result->region));
+ }
}
if (game.Success) {
}
printf("Starting dump with copied DumpXboxGameDisc() mode %c...\n", mode);
- ok = DumpXboxGameDisc(hDevice, finalFilename, mode, totalSectors, isDualLayerBool, FALSE, result);
+ ok = DumpXboxGameDisc(hDevice, finalFilename, mode, totalSectors, isDualLayerBool, FALSE, cancel, cancel_data, result);
cleanup:
if (volumeLocked)
} else if (ok) {
printf("[XBOX-REF] Returning finalized output evidence to FriiDump's shared Redump verifier.\n");
} else {
- printf("[XBOX-REF] No completed output evidence is available for shared Redump verification.\n");
+ printf("[XBOX-REF] No completed full-output evidence is available for shared Redump verification.\n");
}
return ok ? 0 : 1;
}
TRUE);
}
-int xbox_ref_gdr8050l_dump_with_handle(void *native_handle, const char *device, const char *filename, char mode, xbox_ref_dump_result *result)
+int xbox_ref_gdr8050l_dump_with_handle(void *native_handle, const char *device,
+ const char *filename, char mode,
+ xbox_ref_cancel_func cancel,
+ void *cancel_data,
+ xbox_ref_dump_result *result)
{
- return xbox_ref_gdr8050l_dump_core((HANDLE)native_handle, device, filename, mode, FALSE, result);
+ return xbox_ref_gdr8050l_dump_core((HANDLE)native_handle, device, filename,
+ mode, FALSE, cancel, cancel_data, result);
}
int xbox_ref_gdr8050l_dump(const char *device, const char *filename, char mode, xbox_ref_dump_result *result)
return 1;
}
- return xbox_ref_gdr8050l_dump_core(hDevice, device, filename, mode, TRUE, result);
+ return xbox_ref_gdr8050l_dump_core(hDevice, device, filename, mode, TRUE, NULL, NULL, result);
}
#else
int xbox_ref_xgd1_layout_probe_with_handle(void *native_handle,
return 1;
}
-int xbox_ref_gdr8050l_dump_with_handle(void *native_handle, const char *device, const char *filename, char mode, xbox_ref_dump_result *result)
+int xbox_ref_gdr8050l_dump_with_handle(void *native_handle, const char *device,
+ const char *filename, char mode,
+ xbox_ref_cancel_func cancel,
+ void *cancel_data,
+ xbox_ref_dump_result *result)
{
- (void)native_handle; (void)device; (void)filename; (void)mode; xbox_ref_dump_result_init(result); return 1;
+ (void)native_handle; (void)device; (void)filename; (void)mode;
+ (void)cancel; (void)cancel_data;
+ xbox_ref_dump_result_init(result);
+ return 1;
}
int xbox_ref_gdr8050l_dump(const char *device, const char *filename, char mode, xbox_ref_dump_result *result)