summaryrefslogtreecommitdiff
path: root/apps/plugins/pacbox/pacbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pacbox/pacbox.c')
-rw-r--r--apps/plugins/pacbox/pacbox.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c
index e38dc0caf8..097e207ee6 100644
--- a/apps/plugins/pacbox/pacbox.c
+++ b/apps/plugins/pacbox/pacbox.c
@@ -115,7 +115,7 @@ static bool loadROMS( void )
115} 115}
116 116
117/* A buffer to render Pacman's 244x288 screen into */ 117/* A buffer to render Pacman's 244x288 screen into */
118static unsigned char video_buffer[ScreenWidth*ScreenHeight] __attribute__ ((aligned (4))); 118static unsigned char video_buffer[ScreenWidth*ScreenHeight] __attribute__ ((aligned (16)));
119 119
120static long start_time; 120static long start_time;
121static long video_frames = 0; 121static long video_frames = 0;
@@ -283,7 +283,11 @@ static int gameProc( void )
283 /* Check the button status */ 283 /* Check the button status */
284 status = rb->button_status(); 284 status = rb->button_status();
285 285
286 if ((status & PACMAN_MENU) == PACMAN_MENU) { 286 if ((status & PACMAN_MENU) == PACMAN_MENU
287#ifdef PACMAN_RC_MENU
288 || status == PACMAN_RC_MENU
289#endif
290 ) {
287 end_time = *rb->current_tick; 291 end_time = *rb->current_tick;
288 x = pacbox_menu(); 292 x = pacbox_menu();
289 rb->lcd_clear_display(); 293 rb->lcd_clear_display();
@@ -295,6 +299,15 @@ static int gameProc( void )
295 start_time += *rb->current_tick-end_time; 299 start_time += *rb->current_tick-end_time;
296 } 300 }
297 301
302#ifdef PACMAN_HAS_REMOTE
303 setDeviceMode( Joy1_Left, (status & PACMAN_LEFT || status == PACMAN_RC_LEFT) ? DeviceOn : DeviceOff);
304 setDeviceMode( Joy1_Right, (status & PACMAN_RIGHT || status == PACMAN_RC_RIGHT) ? DeviceOn : DeviceOff);
305 setDeviceMode( Joy1_Up, (status & PACMAN_UP || status == PACMAN_RC_UP) ? DeviceOn : DeviceOff);
306 setDeviceMode( Joy1_Down, (status & PACMAN_DOWN || status == PACMAN_RC_DOWN) ? DeviceOn : DeviceOff);
307 setDeviceMode( CoinSlot_1, (status & PACMAN_COIN || status == PACMAN_RC_COIN) ? DeviceOn : DeviceOff);
308 setDeviceMode( Key_OnePlayer, (status & PACMAN_1UP || status == PACMAN_RC_1UP) ? DeviceOn : DeviceOff);
309 setDeviceMode( Key_TwoPlayers, (status & PACMAN_2UP || status == PACMAN_RC_2UP) ? DeviceOn : DeviceOff);
310#else
298 setDeviceMode( Joy1_Left, (status & PACMAN_LEFT) ? DeviceOn : DeviceOff); 311 setDeviceMode( Joy1_Left, (status & PACMAN_LEFT) ? DeviceOn : DeviceOff);
299 setDeviceMode( Joy1_Right, (status & PACMAN_RIGHT) ? DeviceOn : DeviceOff); 312 setDeviceMode( Joy1_Right, (status & PACMAN_RIGHT) ? DeviceOn : DeviceOff);
300 setDeviceMode( Joy1_Up, (status & PACMAN_UP) ? DeviceOn : DeviceOff); 313 setDeviceMode( Joy1_Up, (status & PACMAN_UP) ? DeviceOn : DeviceOff);
@@ -304,6 +317,7 @@ static int gameProc( void )
304#ifdef PACMAN_2UP 317#ifdef PACMAN_2UP
305 setDeviceMode( Key_TwoPlayers, (status & PACMAN_2UP) ? DeviceOn : DeviceOff); 318 setDeviceMode( Key_TwoPlayers, (status & PACMAN_2UP) ? DeviceOn : DeviceOff);
306#endif 319#endif
320#endif
307 321
308 /* We only update the screen every third frame - Pacman's native 322 /* We only update the screen every third frame - Pacman's native
309 framerate is 60fps, so we are attempting to display 20fps */ 323 framerate is 60fps, so we are attempting to display 20fps */