mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
SDL UI, fix for CD LED display
This commit is contained in:
parent
c815b1bc59
commit
7a7265eea0
2 changed files with 6 additions and 3 deletions
|
@ -270,7 +270,7 @@ void plat_init(void)
|
||||||
if (shadow_size < 320 * 480 * 2)
|
if (shadow_size < 320 * 480 * 2)
|
||||||
shadow_size = 320 * 480 * 2;
|
shadow_size = 320 * 480 * 2;
|
||||||
|
|
||||||
shadow_fb = malloc(shadow_size);
|
shadow_fb = calloc(1, shadow_size);
|
||||||
g_menubg_ptr = calloc(1, shadow_size);
|
g_menubg_ptr = calloc(1, shadow_size);
|
||||||
if (shadow_fb == NULL || g_menubg_ptr == NULL) {
|
if (shadow_fb == NULL || g_menubg_ptr == NULL) {
|
||||||
fprintf(stderr, "OOM\n");
|
fprintf(stderr, "OOM\n");
|
||||||
|
|
|
@ -39,10 +39,11 @@ static void draw_cd_leds(void)
|
||||||
int led_reg, pitch, scr_offs, led_offs;
|
int led_reg, pitch, scr_offs, led_offs;
|
||||||
led_reg = Pico_mcd->s68k_regs[0];
|
led_reg = Pico_mcd->s68k_regs[0];
|
||||||
|
|
||||||
pitch = 320;
|
pitch = g_screen_ppitch;
|
||||||
led_offs = 4;
|
led_offs = 4;
|
||||||
scr_offs = pitch * 2 + 4;
|
scr_offs = pitch * 2 + 4;
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (currentConfig.renderer != RT_16BIT) {
|
if (currentConfig.renderer != RT_16BIT) {
|
||||||
#define p(x) px[(x) >> 2]
|
#define p(x) px[(x) >> 2]
|
||||||
// 8-bit modes
|
// 8-bit modes
|
||||||
|
@ -52,7 +53,9 @@ static void draw_cd_leds(void)
|
||||||
p(pitch*0) = p(pitch*1) = p(pitch*2) = col_g;
|
p(pitch*0) = p(pitch*1) = p(pitch*2) = col_g;
|
||||||
p(pitch*0 + led_offs) = p(pitch*1 + led_offs) = p(pitch*2 + led_offs) = col_r;
|
p(pitch*0 + led_offs) = p(pitch*1 + led_offs) = p(pitch*2 + led_offs) = col_r;
|
||||||
#undef p
|
#undef p
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
#define p(x) px[(x)*2 >> 2] = px[((x)*2 >> 2) + 1]
|
#define p(x) px[(x)*2 >> 2] = px[((x)*2 >> 2) + 1]
|
||||||
// 16-bit modes
|
// 16-bit modes
|
||||||
unsigned int *px = (unsigned int *)((short *)g_screen_ptr + scr_offs);
|
unsigned int *px = (unsigned int *)((short *)g_screen_ptr + scr_offs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue