implemented GetDriverCaps

This commit is contained in:
Brian Matzon 2004-07-17 23:34:22 +00:00
parent 60c7ddb7fe
commit aaf1cf73bd
2 changed files with 7 additions and 4 deletions

View File

@ -623,7 +623,10 @@ public class FSound {
* @param caps IntBuffer to have the caps bits stored
* @return On success, TRUE is returned. On failure, FALSE is returned
*/
public static native boolean FSOUND_GetDriverCaps(int driverid, IntBuffer caps);
public static boolean FSOUND_GetDriverCaps(int driverid, IntBuffer caps) {
return nFSOUND_GetDriverCaps(driverid, caps, caps.position());
}
private static native boolean nFSOUND_GetDriverCaps(int driverid, IntBuffer caps, int offset);
/**
* Returns the name of the selected driver. Drivers are enumerated when selecting a driver with

View File

@ -193,9 +193,9 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FSound_FSOUND_1GetDriver(JNIEnv * en
* Method: FSOUND_GetDriverCaps
* Signature: (ILjava/nio/IntBuffer;)Z
*/
JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_FSOUND_1GetDriverCaps(JNIEnv * env, jclass clazz, jint, jobject) {
throwFMODException(env, "missing implementation");
return false;
JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1GetDriverCaps(JNIEnv * env, jclass clazz, jint id, jobject buffer, jint offset) {
unsigned int* caps = offset + (unsigned int *) env->GetDirectBufferAddress(buffer);
return fmod_instance->FSOUND_GetDriverCaps(id, caps);
}
/*