\r
#include "emu.h"\r
#include "gp2x.h"\r
-#include "usbjoy.h"\r
#include "menu.h"\r
+#include "../linux/usbjoy.h"\r
#include "../common/arm_utils.h"\r
#include "../common/fonts.h"\r
#include "../common/emu.h"\r
#include "../common/config.h"\r
+#include "../common/input.h"\r
+#include "../linux/sndout_oss.h"\r
#include "cpuctrl.h"\r
\r
#include <pico/pico_int.h>\r
SRam.changed = 0;\r
}\r
\r
- if (!(currentConfig.EmuOpt & 0x20)) {\r
- config_writelrom(PicoConfigFile);\r
-#ifndef NO_SYNC\r
- sync();\r
-#endif\r
- }\r
+ if (!(currentConfig.EmuOpt & EOPT_NO_AUTOSVCFG))\r
+ emu_writelrom();\r
\r
free(PicoDraw2FB);\r
\r
if (vol > 0) vol--;\r
}\r
wait_frames = 0;\r
- gp2x_sound_volume(vol, vol);\r
+ sndout_oss_setvol(vol, vol);\r
currentConfig.volume = vol;\r
}\r
sprintf(noticeMsg, "VOL: %02i", vol);\r
keys &= CONFIGURABLE_KEYS;\r
keys2 = keys;\r
\r
+#if 1\r
+ /* FIXME: combos, player2 */\r
+ allActions[0] = in_update();\r
+#else\r
for (i = 0; i < 32; i++)\r
{\r
if (keys2 & (1 << i))\r
}\r
}\r
}\r
+#endif\r
\r
// add joy inputs\r
if (num_of_joys > 0)\r
{\r
- gp2x_usbjoy_update();\r
+ usbjoy_update();\r
for (joy = 0; joy < num_of_joys; joy++) {\r
- int btns = gp2x_usbjoy_check2(joy);\r
+ int btns = usbjoy_check2(joy);\r
for (i = 0; i < 32; i++) {\r
if (btns & (1 << i)) {\r
int acts = currentConfig.JoyBinds[joy][i];\r
\r
/* avoid writing audio when lagging behind to prevent audio lag */\r
if (PicoSkipFrame != 2)\r
- gp2x_sound_write(PsndOut, len<<1);\r
+ sndout_oss_write(PsndOut, len<<1);\r
}\r
\r
void emu_startSound(void)\r
snd_excess_add = ((PsndRate - PsndLen*target_fps)<<16) / target_fps;\r
printf("starting audio: %i len: %i (ex: %04x) stereo: %i, pal: %i\n",\r
PsndRate, PsndLen, snd_excess_add, (PicoOpt&8)>>3, Pico.m.pal);\r
- gp2x_start_sound(PsndRate, 16, (PicoOpt&8)>>3);\r
- gp2x_sound_volume(currentConfig.volume, currentConfig.volume);\r
+ sndout_oss_start(PsndRate, 16, (PicoOpt&8)>>3);\r
+ sndout_oss_setvol(currentConfig.volume, currentConfig.volume);\r
PicoWriteSound = updateSound;\r
update_volume(0, 0);\r
memset(sndBuffer, 0, sizeof(sndBuffer));\r