Added Sys.alert to linux

This commit is contained in:
Elias Naur 2002-12-22 20:19:50 +00:00
parent 75faf07a54
commit 18e8950eb3
1 changed files with 16 additions and 0 deletions

View File

@ -180,3 +180,19 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setProcessPriority
#endif
}
}
/*
* Class: org_lwjgl_Sys
* Method: alert
* Signature: (Ljava/lang/String;Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_Sys_alert(JNIEnv * env, jclass clazz, jstring title, jstring message)
{
jboolean copy = JNI_FALSE;
const char * eMessageText = env->GetStringUTFChars(message, &copy);
const char * cTitleBarText = env->GetStringUTFChars(title, &copy);
printf("*** Alert ***\n%s\n%s\n", cTitleBarText, eMessageText);
env->ReleaseStringUTFChars(message, eMessageText);
env->ReleaseStringUTFChars(title, cTitleBarText);
}