From 4e281350a017f35dd4c4141a20de5e5d88316e32 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 31 Oct 2012 17:16:56 -0700 Subject: [PATCH] Print the name of the device when opening it in the example apps --- examples/alreverb.c | 6 ++---- examples/common/alhelpers.c | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/alreverb.c b/examples/alreverb.c index 13f4ec84..5001740e 100644 --- a/examples/alreverb.c +++ b/examples/alreverb.c @@ -223,7 +223,6 @@ static ALuint LoadSound(const char *filename) int main(int argc, char **argv) { - ALCdevice *device = NULL; EFXEAXREVERBPROPERTIES reverb = EFX_REVERB_PRESET_GENERIC; ALuint source, buffer, effect, slot; ALenum state; @@ -239,10 +238,9 @@ int main(int argc, char **argv) if(InitAL() != 0) return 1; - device = alcGetContextsDevice(alcGetCurrentContext()); - if(!alcIsExtensionPresent(device, "ALC_EXT_EFX")) + if(!alcIsExtensionPresent(alcGetContextsDevice(alcGetCurrentContext()), "ALC_EXT_EFX")) { - fprintf(stderr, "Error: EFX not supported on device \"%s\"\n", alcGetString(device, ALC_DEVICE_SPECIFIER)); + fprintf(stderr, "Error: EFX not supported\n"); CloseAL(); return 1; } diff --git a/examples/common/alhelpers.c b/examples/common/alhelpers.c index 84d6dad3..4582321c 100644 --- a/examples/common/alhelpers.c +++ b/examples/common/alhelpers.c @@ -62,6 +62,7 @@ int InitAL(void) return 1; } + printf("Opened \"%s\"\n", alcGetString(device, ALC_DEVICE_SPECIFIER)); return 0; } -- 2.11.4.GIT