Skip to content

Mac-Andreas/omp-windowedmode

Repository files navigation

omp-windowedmode

A DLL build of ThirteenAG's III.VC.SA.WindowedMode, adapted to run the open.mp / SA-MP client windowed inside Wine/CrossOver on macOS — loaded directly by the launcher's injector (no ASI loader), built with MSVC under Wine.

Why

GTA SA's true fullscreen path does an exclusive Direct3D device mode-set. Under CrossOver/D3DMetal on macOS that path is unstable. Running the game windowed (or borderless, which covers the whole screen but keeps the device windowed) avoids that mode-set and is reliable. ThirteenAG's WindowedMode already does exactly this for GTA III/VC/SA on Windows; this repo packages the SA path as a plain .dll for the macOS+Wine setup.

What changed vs upstream

  • source/dllmain.cpp — calls WindowedMode::InitGtaSA() directly (with a 1.0-US image sanity check) instead of injector::address_manager version detection, so the DLL has no dependency on the version-string machinery and is loaded by the launcher's injector rather than an ASI loader.
  • data/windowedmode.ini — defaults to borderless (mode=2) at a low initial resolution: a cheap, safe first device-create that then covers the screen, instead of true fullscreen (mode=3). Alt+Enter still toggles modes.

Everything else is upstream, unchanged. Upstream is MIT-licensed (see LICENSE); the bundled external/injector, external/IniReader, safetyhook, and Zydis keep their own licenses.

Build (on macOS, via Wine MSVC)

./build.sh           # -> build/windowedmode.dll  (PE32 x86)

Needs CrossOver + an MSVC toolchain fetched with msvc-wine at $MSVC_DIR (default /tmp/msvc). Uses /std:c++latest (safetyhook needs std::expected).

Install / load

Place windowedmode.dll + windowedmode.ini next to gta-sa.exe and inject the DLL into the game (e.g. with open.mp-injector) before the client DLLs, so its hooks are in place when the D3D device is created.

Credits

Original plugin: ThirteenAGhttps://github.com/ThirteenAG/III.VC.SA.WindowedMode (MIT), originally created by maxorator as part of Maxo's Vehicle Loader. This repo only repackages the SA path for macOS/Wine and tweaks the default config.

About

WindowedMode plugin (ThirteenAG, MIT) as a DLL for open.mp/SA-MP under Wine on macOS — windowed/borderless to avoid D3DMetal fullscreen crashes

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages