Browse Source

win-capture: Disable cached offsets writing

We don't read cached offsets any more, so it makes little sense to write
them on every startup.
Richard Stanway 7 years ago
parent
commit
7a32f12d9c

+ 3 - 0
plugins/win-capture/load-graphics-offsets.c

@@ -194,12 +194,15 @@ bool load_graphics_offsets(bool is32bit, const char *config_path)
 		goto error;
 		goto error;
 	}
 	}
 
 
+	// uncomment this if you enable USE_HOOK_ADDRESS_CACHE
+/*
 	dstr_copy(&config_ini, config_path);
 	dstr_copy(&config_ini, config_path);
 	dstr_cat(&config_ini, is32bit ? "32.ini" : "64.ini");
 	dstr_cat(&config_ini, is32bit ? "32.ini" : "64.ini");
 
 
 	os_quick_write_utf8_file_safe(config_ini.array, str.array, str.len, false,
 	os_quick_write_utf8_file_safe(config_ini.array, str.array, str.len, false,
 			"tmp", NULL);
 			"tmp", NULL);
 	dstr_free(&config_ini);
 	dstr_free(&config_ini);
+*/
 
 
 	success = load_offsets_from_string(is32bit ? &offsets32 : &offsets64,
 	success = load_offsets_from_string(is32bit ? &offsets32 : &offsets64,
 			str.array);
 			str.array);

+ 2 - 0
plugins/win-capture/plugin-main.c

@@ -29,6 +29,8 @@ extern bool load_graphics_offsets(bool is32bit, const char *config_path);
 #define IS32BIT true
 #define IS32BIT true
 #endif
 #endif
 
 
+/* note, need to enable cache writing in load-graphics-offsets.c if you turn
+ * this back on*/
 #define USE_HOOK_ADDRESS_CACHE false
 #define USE_HOOK_ADDRESS_CACHE false
 
 
 static DWORD WINAPI init_hooks(LPVOID param)
 static DWORD WINAPI init_hooks(LPVOID param)