X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fgp2x%2Femu.c;h=c696d887fb66e3723ab2c8d37509e6667744b4bc;hb=39edaa15c4649b4712bbd3dd83c211b3f9d7078c;hp=8e726e353b9d0dd6b3c608dd3ec024976e8651b8;hpb=7b3f44c6b677a60b63b092f825a2b6c58166b70c;p=picodrive.git diff --git a/platform/gp2x/emu.c b/platform/gp2x/emu.c index 8e726e3..c696d88 100644 --- a/platform/gp2x/emu.c +++ b/platform/gp2x/emu.c @@ -16,12 +16,13 @@ #include "emu.h" #include "gp2x.h" -#include "usbjoy.h" #include "menu.h" +#include "../linux/usbjoy.h" #include "../common/arm_utils.h" #include "../common/fonts.h" #include "../common/emu.h" #include "../common/config.h" +#include "../linux/sndout_oss.h" #include "cpuctrl.h" #include @@ -487,7 +488,7 @@ static void update_volume(int has_changed, int is_up) if (vol > 0) vol--; } wait_frames = 0; - gp2x_sound_volume(vol, vol); + sndout_oss_setvol(vol, vol); currentConfig.volume = vol; } sprintf(noticeMsg, "VOL: %02i", vol); @@ -614,9 +615,9 @@ static void updateKeys(void) // add joy inputs if (num_of_joys > 0) { - gp2x_usbjoy_update(); + usbjoy_update(); for (joy = 0; joy < num_of_joys; joy++) { - int btns = gp2x_usbjoy_check2(joy); + int btns = usbjoy_check2(joy); for (i = 0; i < 32; i++) { if (btns & (1 << i)) { int acts = currentConfig.JoyBinds[joy][i]; @@ -662,7 +663,7 @@ static void updateSound(int len) /* avoid writing audio when lagging behind to prevent audio lag */ if (PicoSkipFrame != 2) - gp2x_sound_write(PsndOut, len<<1); + sndout_oss_write(PsndOut, len<<1); } void emu_startSound(void) @@ -683,8 +684,8 @@ void emu_startSound(void) snd_excess_add = ((PsndRate - PsndLen*target_fps)<<16) / target_fps; printf("starting audio: %i len: %i (ex: %04x) stereo: %i, pal: %i\n", PsndRate, PsndLen, snd_excess_add, (PicoOpt&8)>>3, Pico.m.pal); - gp2x_start_sound(PsndRate, 16, (PicoOpt&8)>>3); - gp2x_sound_volume(currentConfig.volume, currentConfig.volume); + sndout_oss_start(PsndRate, 16, (PicoOpt&8)>>3); + sndout_oss_setvol(currentConfig.volume, currentConfig.volume); PicoWriteSound = updateSound; update_volume(0, 0); memset(sndBuffer, 0, sizeof(sndBuffer));