notaz.gp2x.de
/
libpicofe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move emu loop to common; redo timing; add pollux timer
[libpicofe.git]
/
linux
/
gp2x.c
diff --git
a/linux/gp2x.c
b/linux/gp2x.c
index
daf18fe
..
c00671a
100644
(file)
--- a/
linux/gp2x.c
+++ b/
linux/gp2x.c
@@
-25,11
+25,13
@@
static int current_bpp = 8;
static int current_pal[256];
static const char *verstring = "PicoDrive " VERSION;
static int scr_changed = 0, scr_w = SCREEN_WIDTH, scr_h = SCREEN_HEIGHT;
static int current_pal[256];
static const char *verstring = "PicoDrive " VERSION;
static int scr_changed = 0, scr_w = SCREEN_WIDTH, scr_h = SCREEN_HEIGHT;
+void *gp2x_screens[4];
// dummies
int mix_32_to_16l_level;
int crashed_940 = 0;
int default_cpu_clock = 123;
// dummies
int mix_32_to_16l_level;
int crashed_940 = 0;
int default_cpu_clock = 123;
+void *gp2x_memregs = NULL;
/* gtk */
struct gtk_global_struct
/* gtk */
struct gtk_global_struct
@@
-205,11
+207,15
@@
void finalize_image(guchar *pixels, gpointer data)
static void realloc_screen(void)
{
void *old = g_screen_ptr;
static void realloc_screen(void)
{
void *old = g_screen_ptr;
+ int i;
g_screen_width = scr_w;
g_screen_height = scr_h;
g_screen_ptr = calloc(g_screen_width * g_screen_height * 2, 1);
free(old);
scr_changed = 0;
g_screen_width = scr_w;
g_screen_height = scr_h;
g_screen_ptr = calloc(g_screen_width * g_screen_height * 2, 1);
free(old);
scr_changed = 0;
+
+ for (i = 0; i < 4; i++)
+ gp2x_screens[i] = g_screen_ptr;
}
/* gp2x/emu.c stuff, most to be rm'd */
}
/* gp2x/emu.c stuff, most to be rm'd */
@@
-317,8
+323,12
@@
void plat_video_menu_enter(int is_rom_loaded)
}
else
{
}
else
{
+ char buff[256];
+
// should really only happen once, on startup..
// should really only happen once, on startup..
- readpng(g_screen_ptr, "skin/background.png", READPNG_BG);
+ emu_make_path(buff, "skin/background.png", sizeof(buff));
+ if (readpng(g_screen_ptr, buff, READPNG_BG) < 0)
+ memset(g_screen_ptr, 0, 320*240*2);
}
memcpy(menu_bg_buffer, g_screen_ptr, 320*240*2);
}
memcpy(menu_bg_buffer, g_screen_ptr, 320*240*2);