diff --git a/platforms/openal/CMakeLists.txt b/platforms/openal/CMakeLists.txt index c825911..a457542 100644 --- a/platforms/openal/CMakeLists.txt +++ b/platforms/openal/CMakeLists.txt @@ -13,8 +13,8 @@ target_link_libraries(reminecraftpe-openal PUBLIC reminecraftpe-core) if(EMSCRIPTEN) target_link_libraries(reminecraftpe-openal PUBLIC openal) else() - find_library(OPENAL_LIBRARY NAMES openal REQUIRED) - target_link_libraries(reminecraftpe-openal PUBLIC "${OPENAL_LIBRARY}") + find_package(OpenAL REQUIRED) + target_link_libraries(reminecraftpe-openal PUBLIC OpenAL::OpenAL) endif() # Headers diff --git a/platforms/openal/SoundSystemAL.hpp b/platforms/openal/SoundSystemAL.hpp index 06d32c2..a5ec3ea 100644 --- a/platforms/openal/SoundSystemAL.hpp +++ b/platforms/openal/SoundSystemAL.hpp @@ -10,8 +10,8 @@ #include #include #else -#include -#include +#include +#include #endif #include diff --git a/platforms/sdl/main.cpp b/platforms/sdl/main.cpp index 23cd3d6..d527529 100644 --- a/platforms/sdl/main.cpp +++ b/platforms/sdl/main.cpp @@ -1,4 +1,5 @@ #include +#include #include "thirdparty/SDL2/SDL2.h" @@ -305,6 +306,9 @@ void CheckOptionalTextureAvailability() // Main int main(int argc, char *argv[]) { + // cd build; ./reminecraftpe otherwise + chdir(dirname(argv[0])); + if (SDL_Init(SDL_INIT_VIDEO) < 0) { LOG_E("Unable To Initialize SDL: %s", SDL_GetError()); diff --git a/thirdparty/SDL2/SDL2.h b/thirdparty/SDL2/SDL2.h index 04de4d9..28fde6c 100644 --- a/thirdparty/SDL2/SDL2.h +++ b/thirdparty/SDL2/SDL2.h @@ -2,7 +2,5 @@ #ifdef _WIN32 #pragma comment(lib, "SDL2.lib") +#endif #include -#else -#include -#endif \ No newline at end of file