Fixed compilation with SDL/mingw
This commit is contained in:
@@ -198,7 +198,17 @@ elseif(backend_sdl)
|
||||
${Boost_INCLUDE_DIRS} ${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
|
||||
add_executable(wagic ${MTG_generic_src} ${MTG_sdl_src} src/TestSuiteAI.cpp src/AIPlayerBakaB.cpp)
|
||||
link_directories(${Boost_LIBRARY_DIR} ${SDL2_LIBRARY_DIR})
|
||||
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES} ${BOOST_date_time} ${HGE_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
target_link_libraries(wagic PRIVATE
|
||||
${JGE_LIBRARY}
|
||||
${PNG_LIBRARIES} # Explicitly link libpng
|
||||
${ZIPFS_LIBRARY} # Explicitly link libzipFS
|
||||
${SDL2_LIBRARY}
|
||||
${OPENGL_LIBRARIES}
|
||||
${TINYXML_LIBRARIES}
|
||||
${HGE_LIBRARY}
|
||||
${BOOST_date_time}
|
||||
${ZLIB_LIBRARIES} # Ensure zlib is linked
|
||||
)
|
||||
endif()
|
||||
elseif(backend_psp)
|
||||
if(PSP)
|
||||
|
||||
@@ -804,7 +804,7 @@ bool SdlApp::OnInit()
|
||||
return true;
|
||||
};
|
||||
|
||||
#if (defined ANDROID)
|
||||
#if (defined ANDROID) || (defined WIN32)
|
||||
int SDL_main(int argc, char * argv[])
|
||||
#else
|
||||
int main(int argc, char* argv[])
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "Translate.h"
|
||||
#include "PriceList.h"
|
||||
#include "Subtypes.h"
|
||||
#include <random>
|
||||
|
||||
//WSyncable
|
||||
bool WSyncable::Hook(WSyncable* s)
|
||||
@@ -285,7 +286,10 @@ bool WSrcCards::setOffset(int pos)
|
||||
|
||||
void WSrcCards::Shuffle()
|
||||
{
|
||||
std::random_shuffle(cards.begin(), cards.end());
|
||||
std::random_device rd;
|
||||
std::mt19937 g(rd());
|
||||
|
||||
std::shuffle (cards.begin(), cards.end(), g);
|
||||
validate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user