mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
libretro: pass required arg to VirtualProtect
This commit is contained in:
parent
9cdfc191b6
commit
a0b95da112
1 changed files with 2 additions and 1 deletions
|
@ -451,7 +451,8 @@ int plat_mem_set_exec(void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ret = VirtualProtect(ptr, size, PAGE_EXECUTE_READWRITE, 0);
|
DWORD oldProtect = 0;
|
||||||
|
ret = VirtualProtect(ptr, size, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||||
if (ret == 0 && log_cb)
|
if (ret == 0 && log_cb)
|
||||||
log_cb(RETRO_LOG_ERROR, "VirtualProtect(%p, %d) failed: %d\n", ptr, (int)size,
|
log_cb(RETRO_LOG_ERROR, "VirtualProtect(%p, %d) failed: %d\n", ptr, (int)size,
|
||||||
GetLastError());
|
GetLastError());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue