forked from TeamTofuShop/segatools
fix msvc compilation
This commit is contained in:
@ -440,8 +440,8 @@ static HRESULT led15093_req_set_timeout(int board, const struct led15093_req_set
|
||||
resp.cmd = LED_15093_CMD_SET_TIMEOUT;
|
||||
resp.report = v->report_code;
|
||||
|
||||
resp.count_upper = (req->count >> 8) & 0xff;
|
||||
resp.count_lower = req->count & 0xff;
|
||||
resp.count_upper = 0;
|
||||
resp.count_lower = req->count;
|
||||
|
||||
return led15093_frame_encode(&led15093_per_board_vars[board].boarduart.readable, &resp, sizeof(resp.hdr) + resp.hdr.nbytes);
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <windows.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "hooklib/procaddr.h"
|
||||
|
||||
@ -83,6 +82,13 @@ static void proc_addr_hook_init(void)
|
||||
_countof(win32_hooks));
|
||||
}
|
||||
|
||||
#define PATH_MAX 1024
|
||||
char *gnu_basename(char *path)
|
||||
{
|
||||
char *base = strrchr(path, '/');
|
||||
return base ? base+1 : path;
|
||||
}
|
||||
|
||||
FARPROC WINAPI my_GetProcAddress(HMODULE hModule, const char *name)
|
||||
{
|
||||
uintptr_t ordinal = (uintptr_t) name;
|
||||
@ -92,7 +98,7 @@ FARPROC WINAPI my_GetProcAddress(HMODULE hModule, const char *name)
|
||||
FARPROC result = next_GetProcAddress(hModule, name);
|
||||
|
||||
GetModuleFileNameA(hModule, mod_path, PATH_MAX);
|
||||
mod_name = basename(mod_path);
|
||||
mod_name = gnu_basename(mod_path);
|
||||
|
||||
for (int i = 0; i < proc_addr_hook_count; i++) {
|
||||
|
||||
|
23
meson.build
23
meson.build
@ -13,7 +13,6 @@ add_project_arguments(
|
||||
'-DWIN32_LEAN_AND_MEAN',
|
||||
'-D_WIN32_WINNT=_WIN32_WINNT_WIN7',
|
||||
'-DMINGW_HAS_SECURE_API=1',
|
||||
'-Wno-unused',
|
||||
language: 'c',
|
||||
)
|
||||
|
||||
@ -56,28 +55,8 @@ subdir('gfxhook')
|
||||
subdir('aimeio')
|
||||
subdir('chuniio')
|
||||
subdir('divaio')
|
||||
subdir('carolio')
|
||||
subdir('idzio')
|
||||
subdir('idacio')
|
||||
subdir('swdcio')
|
||||
subdir('mu3io')
|
||||
subdir('mai2io')
|
||||
subdir('cmio')
|
||||
subdir('mercuryio')
|
||||
subdir('cxbio')
|
||||
subdir('fgoio')
|
||||
|
||||
subdir('chunihook')
|
||||
subdir('divahook')
|
||||
subdir('carolhook')
|
||||
subdir('idzhook')
|
||||
subdir('idachook')
|
||||
subdir('swdchook')
|
||||
subdir('minihook')
|
||||
subdir('chusanhook')
|
||||
subdir('mu3hook')
|
||||
subdir('mai2hook')
|
||||
subdir('cmhook')
|
||||
subdir('mercuryhook')
|
||||
subdir('cxbhook')
|
||||
subdir('fgohook')
|
||||
|
||||
|
Reference in New Issue
Block a user