Skip to content

Commit

Permalink
gpulib: new debug compile option for raw fb display
Browse files Browse the repository at this point in the history
  • Loading branch information
notaz committed Sep 4, 2023
1 parent 11d2357 commit cb245e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/gpulib/gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,7 @@ void GPUupdateLace(void)
flush_cmd_buffer();
renderer_flush_queues();

#ifndef RAW_FB_DISPLAY
if (gpu.status & PSX_GPU_STATUS_BLANKING) {
if (!gpu.state.blanked) {
vout_blank();
Expand All @@ -767,6 +768,7 @@ void GPUupdateLace(void)

if (!gpu.state.fb_dirty)
return;
#endif

if (gpu.frameskip.set) {
if (!gpu.frameskip.frame_ready) {
Expand Down
2 changes: 2 additions & 0 deletions plugins/gpulib/gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

#include <stdint.h>

//#define RAW_FB_DISPLAY

#define gpu_log(fmt, ...) \
printf("%d:%03d: " fmt, *gpu.state.frame_count, *gpu.state.hcnt, ##__VA_ARGS__)

Expand Down
6 changes: 6 additions & 0 deletions plugins/gpulib/vout_pl.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ static void check_mode_change(int force)
int w_out = w;
int h_out = h;

#ifdef RAW_FB_DISPLAY
w = w_out = 1024, h = h_out = 512;
#endif
gpu.state.enhancement_active =
gpu.get_enhancement_bufer != NULL && gpu.state.enhancement_enable
&& w <= 512 && h <= 256 && !(gpu.status & PSX_GPU_STATUS_RGB24);
Expand Down Expand Up @@ -67,6 +70,9 @@ void vout_update(void)
int vram_h = 512;
int src_x2 = 0;

#ifdef RAW_FB_DISPLAY
w = 1024, h = 512, x = src_x = y = src_y = 0;
#endif
if (x < 0) { w += x; src_x2 = -x; x = 0; }
if (y < 0) { h += y; src_y -= y; y = 0; }

Expand Down

0 comments on commit cb245e5

Please sign in to comment.