diff --git a/CMakeLists.txt b/CMakeLists.txt index eb7e613..2fe99af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -337,7 +337,11 @@ target_link_libraries(${PROJECT_NAME} ${PLATFORM_LIBRARIES} ${Ruby_LIBRARIES} Boost::boost ${Boost_LIBRARIES} - ${VORBISFILE_LIBRARIES}) + ${VORBISFILE_LIBRARIES} + + winmm + z + ) IF(APPLE) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND cmake -P "${CMAKE_SOURCE_DIR}/patches/mac/CompleteBundle.cmake" VERBATIM) diff --git a/binding-mri/chroma-binding.cpp b/binding-mri/chroma-binding.cpp index ac8d00a..c60bd0f 100644 --- a/binding-mri/chroma-binding.cpp +++ b/binding-mri/chroma-binding.cpp @@ -32,7 +32,7 @@ void _attemptLinkSdk() { _playAnimation = (PluginPlayAnimation) GetProcAddress(hLib, "PluginPlayAnimation"); INIT_SUCCESS &= _playAnimation != NULL; - Debug() << "[_attempLinkSdk]Plugin method @" << (long)_playAnimation; + Debug() << "[_attempLinkSdk]Plugin method @" << reinterpret_cast(_playAnimation); _openAnimation = (PluginOpenAnimation) GetProcAddress(hLib, "PluginOpenAnimation"); INIT_SUCCESS &= _openAnimation != NULL; diff --git a/binding-mri/niko-binding.cpp b/binding-mri/niko-binding.cpp index 5ce5e69..de1649c 100644 --- a/binding-mri/niko-binding.cpp +++ b/binding-mri/niko-binding.cpp @@ -138,7 +138,17 @@ RB_METHOD(nikoStart){ POINT pos; pos.x = NIKO_X; pos.y = NIKO_Y; - ClientToScreen(syswindow.info.win.window, &pos); + + // idk if shState->rtData().window will work, i inserted it here so that project would at least be build + SDL_PropertiesID props = SDL_GetWindowProperties(shState->rtData().window); + + HWND hwnd = (HWND)SDL_GetPointerProperty( + props, + SDL_PROP_WINDOW_WIN32_HWND_POINTER, + NULL + ); + + ClientToScreen(hwnd, &pos); // Start process WCHAR path[MAX_PATH]; WCHAR args[MAX_PATH]; diff --git a/src/main.cpp b/src/main.cpp index 31230ce..5a82ce9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -181,7 +181,7 @@ static void setGamePathInRegistry() { #if defined WIN32 // this logic is currently windows specific - char* dataDir = SDL_GetBasePath(); + const char* dataDir = SDL_GetBasePath(); if (dataDir){ HKEY key; long keyOpenError = RegOpenKey(HKEY_CURRENT_USER, TEXT("Software\\OneShot\\"), &key); @@ -207,7 +207,7 @@ static void setGamePathInRegistry() { } RegCloseKey(key); } - SDL_free(dataDir); + SDL_free((void*)dataDir); } #endif //TODO handle this for Linux/Mac