X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2Fgp2x.c;h=6eb252b89047cb0e99eddf31f9506d7bd6ceeff6;hb=ebc9df9f7e5ca246ba11a70f7c3d1631f092bd08;hp=17b294a978a2df853440f00476e32282e6fb08c7;hpb=a148806dc68520d05c8ace7051081a374422c340;p=libpicofe.git diff --git a/linux/gp2x.c b/linux/gp2x.c index 17b294a..6eb252b 100644 --- a/linux/gp2x.c +++ b/linux/gp2x.c @@ -33,6 +33,9 @@ int crashed_940 = 0; int default_cpu_clock = 123; void *gp2x_memregs = NULL; +/* ifndef is for qemu build without video out */ +#ifndef ARM + /* faking GP2X pad */ enum { GP2X_UP=0x1, GP2X_LEFT=0x4, GP2X_DOWN=0x10, GP2X_RIGHT=0x40, GP2X_START=1<<8, GP2X_SELECT=1<<9, GP2X_L=1<<10, GP2X_R=1<<11, @@ -196,8 +199,7 @@ static void *xlib_threadf(void *targ) XSetWMName(display, win, &windowName); XSelectInput(display, win, ExposureMask | - KeyPressMask | - ButtonPressMask | + KeyPressMask | KeyReleaseMask | StructureNotifyMask); XMapWindow(display, win); @@ -253,6 +255,7 @@ static void xlib_init(void) sem_wait(&xlib_sem); sem_destroy(&xlib_sem); } +#endif // !ARM /* --- */ @@ -273,6 +276,7 @@ static void realloc_screen(void) /* gp2x/emu.c stuff, most to be rm'd */ static void gp2x_video_flip_(void) { +#ifndef ARM unsigned int *image; int pixel_count, i; @@ -312,6 +316,7 @@ static void gp2x_video_flip_(void) realloc_screen(); ximage_realloc(xlib_display, DefaultVisual(xlib_display, 0)); } +#endif } static void gp2x_video_changemode_ll_(int bpp) @@ -389,7 +394,9 @@ void plat_video_menu_end(void) void plat_validate_config(void) { + extern int PicoOpt; // PicoOpt &= ~POPT_EXT_FM; + PicoOpt &= ~(1<<17); // POPT_EN_SVP_DRC } void plat_early_init(void) @@ -404,7 +411,9 @@ void plat_init(void) // snd sndout_oss_init(); +#ifndef ARM xlib_init(); +#endif } void plat_finish(void) @@ -426,6 +435,7 @@ void *gp2x_video_setpalette = gp2x_video_setpalette_; void *gp2x_video_RGB_setscaling = do_nothing; void *gp2x_video_wait_vsync = do_nothing; void *gp2x_set_cpuclk = do_nothing; +void *gp2x_read_battery = do_nothing; void *set_lcd_custom_rate = do_nothing; void *unset_lcd_custom_rate = do_nothing; void *set_lcd_gamma = do_nothing; @@ -457,6 +467,10 @@ void mp3_update(int *buffer, int length, int stereo) { } +void cache_flush_d_inval_i() +{ +} + /* lprintf */ void lprintf(const char *fmt, ...) {