diff --git a/plugins/common/src/native/util.c b/plugins/common/src/native/util.c index 745a265..089ba17 100644 --- a/plugins/common/src/native/util.c +++ b/plugins/common/src/native/util.c @@ -46,7 +46,7 @@ static jstring sprintfJavaString(JNIEnv *env, const char *format, va_list ap) { #define BUFFER_SIZE 4000 char buffer[BUFFER_SIZE]; jstring str; -#ifdef _WIN32 +#ifdef _MSC_VER vsnprintf_s(buffer, BUFFER_SIZE, _TRUNCATE, format, ap); #else vsnprintf(buffer, BUFFER_SIZE, format, ap); diff --git a/plugins/common/src/native/util.h b/plugins/common/src/native/util.h index 58a62f4..657a93d 100644 --- a/plugins/common/src/native/util.h +++ b/plugins/common/src/native/util.h @@ -40,6 +40,11 @@ #include #include #include +#ifdef _MSC_VER +#include +#else +#include +#endif extern void printfJava(JNIEnv *env, const char *format, ...); extern void throwRuntimeException(JNIEnv * env, const char *format, ...); diff --git a/plugins/windows/src/native/build.xml.mingw b/plugins/windows/src/native/build.xml.mingw new file mode 100644 index 0000000..af034be --- /dev/null +++ b/plugins/windows/src/native/build.xml.mingw @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/windows/src/native/net_java_games_input_DummyWindow.c b/plugins/windows/src/native/net_java_games_input_DummyWindow.c index 539e45c..1aa1832 100644 --- a/plugins/windows/src/native/net_java_games_input_DummyWindow.c +++ b/plugins/windows/src/native/net_java_games_input_DummyWindow.c @@ -59,7 +59,7 @@ JNIEXPORT jlong JNICALL Java_net_java_games_input_DummyWindow_createWindow(JNIEn throwIOException(env, "Failed to create window (%d)\n", GetLastError()); return 0; } - return (jlong)hwndDummy; + return (jlong)(intptr_t)hwndDummy; } JNIEXPORT void JNICALL Java_net_java_games_input_DummyWindow_nDestroy(JNIEnv *env, jclass unused, jlong hwnd_address) {