Files
neoLegacy-mac/tools/send_f2.c
coah f9b5e53d30 feat: macOS port tooling — clang-cl cross-build + Wine/DXVK/MoltenVK runtime
- build-macos.sh: cross-compiles the Windows x64 client on Apple Silicon
  (LLVM clang-cl/lld-link + xwin Windows SDK, fxc via Wine with native
  d3dcompiler DLLs)
- run-client.sh: dedicated Wine prefix with DXVK-macOS (D3D11->Vulkan) on
  MoltenVK (Vulkan->Metal)
- tools/: in-Wine input injectors for automated verification
2026-07-07 03:09:00 -05:00

39 lines
837 B
C

#include <windows.h>
#include <stdio.h>
static BOOL CALLBACK enumProc(HWND hwnd, LPARAM lParam)
{
if (!IsWindowVisible(hwnd))
return TRUE;
wchar_t title[256] = {0};
GetWindowTextW(hwnd, title, 255);
if (wcsstr(title, L"Minecraft"))
{
*(HWND *)lParam = hwnd;
return FALSE;
}
return TRUE;
}
int main(void)
{
HWND target = NULL;
EnumWindows(enumProc, (LPARAM)&target);
if (!target)
{
printf("no Minecraft window found\n");
return 1;
}
wchar_t title[256] = {0};
GetWindowTextW(target, title, 255);
wprintf(L"found window: %ls\n", title);
SetForegroundWindow(target);
Sleep(300);
keybd_event(VK_F2, 0, 0, 0);
Sleep(60);
keybd_event(VK_F2, 0, KEYEVENTF_KEYUP, 0);
Sleep(300);
printf("sent F2\n");
return 0;
}