diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dac4e15 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 StillHammer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 9f6a48d..0c927bf 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ Complex behavior emerges from the interaction of simple, well-defined modules. ## License -To be defined +MIT License - see [LICENSE](LICENSE) file for details ## Contributing diff --git a/tests/visual/test_bgfx_sprites.cpp b/tests/visual/test_bgfx_sprites.cpp index 2d5f7bb..8d75a22 100644 --- a/tests/visual/test_bgfx_sprites.cpp +++ b/tests/visual/test_bgfx_sprites.cpp @@ -62,8 +62,15 @@ int main(int argc, char* argv[]) { return 1; } - void* nativeWindowHandle = (void*)(uintptr_t)wmi.info.x11.window; - void* nativeDisplayHandle = wmi.info.x11.display; + void* nativeWindowHandle; + void* nativeDisplayHandle; +#ifdef _WIN32 + nativeWindowHandle = wmi.info.win.window; + nativeDisplayHandle = nullptr; +#else + nativeWindowHandle = (void*)(uintptr_t)wmi.info.x11.window; + nativeDisplayHandle = wmi.info.x11.display; +#endif std::cout << "Window created: " << width << "x" << height << "\n"; diff --git a/tests/visual/test_bgfx_triangle.cpp b/tests/visual/test_bgfx_triangle.cpp index 2448c4b..2d1ff55 100644 --- a/tests/visual/test_bgfx_triangle.cpp +++ b/tests/visual/test_bgfx_triangle.cpp @@ -174,8 +174,13 @@ int main(int argc, char* argv[]) { // Setup bgfx platform data bgfx::PlatformData pd; +#ifdef _WIN32 + pd.ndt = nullptr; + pd.nwh = wmi.info.win.window; +#else pd.ndt = wmi.info.x11.display; pd.nwh = (void*)(uintptr_t)wmi.info.x11.window; +#endif pd.context = nullptr; pd.backBuffer = nullptr; pd.backBufferDS = nullptr;