notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6136306
)
try to ensure fbdev buffer is valid
author
notaz
<notasas@gmail.com>
Tue, 4 Jan 2011 17:40:25 +0000
(19:40 +0200)
committer
notaz
<notasas@gmail.com>
Tue, 4 Jan 2011 17:40:25 +0000
(19:40 +0200)
frontend/plugin_lib.c
patch
|
blob
|
blame
|
history
frontend/plugin_lib.h
patch
|
blob
|
blame
|
history
plugins/gpu-gles/Makefile
patch
|
blob
|
blame
|
history
plugins/gpu_unai/Makefile
patch
|
blob
|
blame
|
history
plugins/gpu_unai/gpu.cpp
patch
|
blob
|
blame
|
history
diff --git
a/frontend/plugin_lib.c
b/frontend/plugin_lib.c
index
4e65e2e
..
a458f0e
100644
(file)
--- a/
frontend/plugin_lib.c
+++ b/
frontend/plugin_lib.c
@@
-62,7
+62,7
@@
static void print_cpu_usage(void)
pl_text_out16(pl_fbdev_w - 28, pl_fbdev_h - 10, "%3d", tick_per_sec);
}
pl_text_out16(pl_fbdev_w - 28, pl_fbdev_h - 10, "%3d", tick_per_sec);
}
-
int
pl_fbdev_set_mode(int w, int h, int bpp)
+
void *
pl_fbdev_set_mode(int w, int h, int bpp)
{
void *ret;
{
void *ret;
@@
-82,16
+82,19
@@
int pl_fbdev_set_mode(int w, int h, int bpp)
menu_notify_mode_change(w, h, bpp);
menu_notify_mode_change(w, h, bpp);
- return
(ret != NULL) ? 0 : -1
;
+ return
pl_fbdev_buf
;
}
void *pl_fbdev_flip(void)
{
flip_cnt++;
}
void *pl_fbdev_flip(void)
{
flip_cnt++;
- if (g_opts & OPT_SHOWFPS)
- print_fps();
- if (g_opts & OPT_SHOWCPU)
- print_cpu_usage();
+
+ if (pl_fbdev_buf != NULL) {
+ if (g_opts & OPT_SHOWFPS)
+ print_fps();
+ if (g_opts & OPT_SHOWCPU)
+ print_cpu_usage();
+ }
// let's flip now
pl_fbdev_buf = vout_fbdev_flip(layer_fb);
// let's flip now
pl_fbdev_buf = vout_fbdev_flip(layer_fb);
diff --git
a/frontend/plugin_lib.h
b/frontend/plugin_lib.h
index
f5c4985
..
53389d2
100644
(file)
--- a/
frontend/plugin_lib.h
+++ b/
frontend/plugin_lib.h
@@
-22,7
+22,7
@@
enum {
extern void *pl_fbdev_buf;
int pl_fbdev_open(void);
extern void *pl_fbdev_buf;
int pl_fbdev_open(void);
-
int
pl_fbdev_set_mode(int w, int h, int bpp);
+
void *
pl_fbdev_set_mode(int w, int h, int bpp);
void *pl_fbdev_flip(void);
void pl_fbdev_close(void);
void *pl_fbdev_flip(void);
void pl_fbdev_close(void);
@@
-31,7
+31,7
@@
void pl_text_out16(int x, int y, const char *texto, ...);
struct rearmed_cbs {
void (*pl_get_layer_pos)(int *x, int *y, int *w, int *h);
int (*pl_fbdev_open)(void);
struct rearmed_cbs {
void (*pl_get_layer_pos)(int *x, int *y, int *w, int *h);
int (*pl_fbdev_open)(void);
-
int
(*pl_fbdev_set_mode)(int w, int h, int bpp);
+
void *
(*pl_fbdev_set_mode)(int w, int h, int bpp);
void *(*pl_fbdev_flip)(void);
void (*pl_fbdev_close)(void);
int *fskip_option;
void *(*pl_fbdev_flip)(void);
void (*pl_fbdev_close)(void);
int *fskip_option;
diff --git
a/plugins/gpu-gles/Makefile
b/plugins/gpu-gles/Makefile
index
fdefb08
..
1110151
100644
(file)
--- a/
plugins/gpu-gles/Makefile
+++ b/
plugins/gpu-gles/Makefile
@@
-8,8
+8,10
@@
CROSS_COMPILE ?= arm-none-linux-gnueabi-
#CC = $(PREFIX)/bin/$(CROSS_COMPILE)gcc
\r
CC = $(CROSS_COMPILE)gcc
\r
\r
#CC = $(PREFIX)/bin/$(CROSS_COMPILE)gcc
\r
CC = $(CROSS_COMPILE)gcc
\r
\r
-CFLAGS += -fPIC # -Wall
\r
+CFLAGS += -fPIC -ggdb # -Wall
\r
+ifndef DEBUG
\r
CFLAGS += -O3 -ffast-math -fomit-frame-pointer
\r
CFLAGS += -O3 -ffast-math -fomit-frame-pointer
\r
+endif
\r
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8
\r
# note: the below causes strange bugs/crashes
\r
#CFLAGS += -mfloat-abi=softfp
\r
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8
\r
# note: the below causes strange bugs/crashes
\r
#CFLAGS += -mfloat-abi=softfp
\r
diff --git
a/plugins/gpu_unai/Makefile
b/plugins/gpu_unai/Makefile
index
92f7ade
..
636c31b
100644
(file)
--- a/
plugins/gpu_unai/Makefile
+++ b/
plugins/gpu_unai/Makefile
@@
-1,7
+1,9
@@
CC = $(CROSS_COMPILE)gcc
CC = $(CROSS_COMPILE)gcc
-CFLAGS += -fPIC -Wall -DREARMED
+CFLAGS += -ggdb -fPIC -Wall -DREARMED
+ifndef DEBUG
CFLAGS += -O2 -ffast-math -fomit-frame-pointer
CFLAGS += -O2 -ffast-math -fomit-frame-pointer
+endif
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
# -fschedule-insns (from -O2+) causes bugs, probably bad asm() statements
CFLAGS += -fno-schedule-insns -fno-schedule-insns2
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
# -fschedule-insns (from -O2+) causes bugs, probably bad asm() statements
CFLAGS += -fno-schedule-insns -fno-schedule-insns2
diff --git
a/plugins/gpu_unai/gpu.cpp
b/plugins/gpu_unai/gpu.cpp
index
fa19b63
..
3e69aaa
100644
(file)
--- a/
plugins/gpu_unai/gpu.cpp
+++ b/
plugins/gpu_unai/gpu.cpp
@@
-864,8
+864,8
@@
static void blit(void)
static s16 old_res_horz, old_res_vert, old_rgb24;
s16 isRGB24 = (GPU_GP1 & 0x00200000) ? 1 : 0;
s16 h0, x0, y0, w0, h1;
static s16 old_res_horz, old_res_vert, old_rgb24;
s16 isRGB24 = (GPU_GP1 & 0x00200000) ? 1 : 0;
s16 h0, x0, y0, w0, h1;
- u8 *dest = (u8 *)screen_buf;
u16 *srcs;
u16 *srcs;
+ u8 *dest;
x0 = DisplayArea[0] & ~3; // alignment needed by blitter
y0 = DisplayArea[1];
x0 = DisplayArea[0] & ~3; // alignment needed by blitter
y0 = DisplayArea[1];
@@
-877,13
+877,17
@@
static void blit(void)
h1 = DisplayArea[5] - DisplayArea[4]; // display needed
if (h0 == 480) h1 = Min2(h1*2,480);
h1 = DisplayArea[5] - DisplayArea[4]; // display needed
if (h0 == 480) h1 = Min2(h1*2,480);
+ if (h1 <= 0)
+ return;
+
if (w0 != old_res_horz || h1 != old_res_vert || isRGB24 != old_rgb24)
{
old_res_horz = w0;
old_res_vert = h1;
old_rgb24 = (s16)isRGB24;
if (w0 != old_res_horz || h1 != old_res_vert || isRGB24 != old_rgb24)
{
old_res_horz = w0;
old_res_vert = h1;
old_rgb24 = (s16)isRGB24;
- cbs->pl_fbdev_set_mode(w0, h1, isRGB24 ? 24 : 16);
+
screen_buf =
cbs->pl_fbdev_set_mode(w0, h1, isRGB24 ? 24 : 16);
}
}
+ dest = (u8 *)screen_buf;
if (isRGB24)
{
if (isRGB24)
{