Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ff50b65
Buildfix
LibretroAdmin Apr 30, 2026
f2bb729
SDL2: tidy up sdl2_render_msg
LibretroAdmin Apr 30, 2026
7cff339
SDL2: warn at init when winraw input driver is selected
LibretroAdmin Apr 30, 2026
ca7a18f
Fetch translations from Crowdin
invalid-email-address May 1, 2026
dfa9620
gfx/drivers/metal: fold metal_common.h into metal.m
LibretroAdmin May 1, 2026
3dd6940
BUildfix
LibretroAdmin May 1, 2026
02f6844
Remove some unused variables
LibretroAdmin May 1, 2026
40ad5bc
menu/drivers: deduplicate menu_state_get_ptr() calls
LibretroAdmin May 1, 2026
4a24762
retroarch/menu/input: deduplicate more menu_state_get_ptr() calls
LibretroAdmin May 1, 2026
7aa7c3b
menu/rgui: replace per-driver dispatch chain with lookup table
LibretroAdmin May 1, 2026
d654940
gfx/gl1: rename gl1_t::video_{width,height,pitch,bits} to frame_*
LibretroAdmin May 1, 2026
61ce292
gfx: rename {fpga,gdi}_t::video_{width,height,pitch,bits} to frame_*
LibretroAdmin May 1, 2026
e675181
Same stuff as before in prior commits - clear deliniation between
LibretroAdmin May 1, 2026
ad986a6
Same thing with caca driver
LibretroAdmin May 1, 2026
cecd19f
video_driver: rename {get,set}_size -> {get,set}_output_size
LibretroAdmin May 1, 2026
89d79d9
Buildfixes
LibretroAdmin May 1, 2026
3179216
more warning fixes
LibretroAdmin May 1, 2026
e02161e
gfx/vga: rename vga_t::vga_video_{...} to frame_*, publish VGA size t…
LibretroAdmin May 1, 2026
9403719
scaler/pixconv: fix conv_rgb565_abgr8888 SSE2 byte order
LibretroAdmin May 1, 2026
7e44a5e
dxgi_common: use pixconv conv_rgb565_abgr8888 for B5G6R5 -> R8G8B8A8
LibretroAdmin May 1, 2026
8e9131b
dxgi_common: use pixconv conv_rgb565_argb8888 for B5G6R5 -> B8G8R8A8
LibretroAdmin May 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gfx/common/d3d9_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void d3d9_make_d3dpp(d3d9_video_t *d3d,
unsigned width = 0;
unsigned height = 0;
d3d9_get_video_size(d3d, &width, &height);
video_driver_set_size(width, height);
video_driver_set_output_size(width, height);
d3d->vp.full_width = width;
d3d->vp.full_height = height;
d3dpp->BackBufferWidth = width;
Expand Down
69 changes: 15 additions & 54 deletions gfx/common/dxgi_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <compat/strl.h>
#include <retro_environment.h>
#include <gfx/scaler/pixconv.h>

#ifdef HAVE_CONFIG_H
#include "../../config.h"
Expand Down Expand Up @@ -1142,33 +1143,13 @@ void dxgi_copy(
{
case DXGI_FORMAT_R8G8B8A8_UNORM:
{
{
const UINT16* src_ptr = (const UINT16*)src_data;
UINT32* dst_ptr = (UINT32*)dst_data;
int sp = src_pitch;
int dp = dst_pitch;
if (sp)
sp -= width * sizeof(*src_ptr);
if (dp)
dp -= width * sizeof(*dst_ptr);
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
unsigned r = 0, g = 0, b = 0;
UINT16 src_val = *src_ptr++;
r = (src_val >> 11) & 31;
r = (r << 3) | (r >> 2);
g = (src_val >> 5) & 63;
g = (g << 2) | (g >> 4);
b = (src_val >> 0) & 31;
b = (b << 3) | (b >> 2);
*dst_ptr++ = (r << 0) | (g << 8) | (b << 16) | (255 << 24);
}
src_ptr = (UINT16*)((UINT8*)src_ptr + sp);
dst_ptr = (UINT32*)((UINT8*)dst_ptr + dp);
}
}
/* RGB565 -> R8G8B8A8 (byte order [r g b a]) is exactly
* conv_rgb565_abgr8888 in pixconv (uint32 LE
* (a << 24) | (b << 16) | (g << 8) | r). */
int sp = src_pitch ? src_pitch : (int)(width * sizeof(UINT16));
int dp = dst_pitch ? dst_pitch : (int)(width * sizeof(UINT32));
conv_rgb565_abgr8888(dst_data, src_data,
width, height, dp, sp);
break;
}
case DXGI_FORMAT_B8G8R8X8_UNORM:
Expand Down Expand Up @@ -1329,33 +1310,13 @@ void dxgi_copy(
}
case DXGI_FORMAT_B8G8R8A8_UNORM:
{
{
const UINT16* src_ptr = (const UINT16*)src_data;
UINT32* dst_ptr = (UINT32*)dst_data;
int sp = src_pitch;
int dp = dst_pitch;
if (sp)
sp -= width * sizeof(*src_ptr);
if (dp)
dp -= width * sizeof(*dst_ptr);
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
unsigned r = 0, g = 0, b = 0;
UINT16 src_val = *src_ptr++;
r = (src_val >> 11) & 31;
r = (r << 3) | (r >> 2);
g = (src_val >> 5) & 63;
g = (g << 2) | (g >> 4);
b = (src_val >> 0) & 31;
b = (b << 3) | (b >> 2);
*dst_ptr++ = (r << 16) | (g << 8) | (b << 0) | (255 << 24);
}
src_ptr = (UINT16*)((UINT8*)src_ptr + sp);
dst_ptr = (UINT32*)((UINT8*)dst_ptr + dp);
}
}
/* RGB565 -> B8G8R8A8 (byte order [b g r a]) is exactly
* conv_rgb565_argb8888 in pixconv (uint32 LE
* (a << 24) | (r << 16) | (g << 8) | b). */
int sp = src_pitch ? src_pitch : (int)(width * sizeof(UINT16));
int dp = dst_pitch ? dst_pitch : (int)(width * sizeof(UINT32));
conv_rgb565_argb8888(dst_data, src_data,
width, height, dp, sp);
break;
}
case DXGI_FORMAT_EX_A4R4G4B4_UNORM:
Expand Down
17 changes: 8 additions & 9 deletions gfx/common/gdi_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,18 @@ typedef struct gdi
unsigned scratch_rgui_w;
unsigned scratch_rgui_h;

unsigned video_width;
unsigned video_height;
unsigned frame_width;
unsigned frame_height;
unsigned screen_width;
unsigned screen_height;
/* Surface (window) size last published via video_driver_set_size,
* tracked here so gdi_alive can read it without locking. Distinct
* from video_width / video_height which is the core's frame size. */
/* Surface (window) size last published via video_driver_set_output_size,
* tracked here so gdi_alive can read it without locking. */
unsigned full_width;
unsigned full_height;
/* Actual size of gdi->bmp (the DDB). Separate from video_width
/* Actual size of gdi->bmp (the DDB). Separate from frame_width
* because when RGUI is active we draw the menu (a different size
* than the core) into bmp; without a dedicated tracker, the
* comparison against video_width would trigger a destructive
* comparison against frame_width would trigger a destructive
* DeleteObject + CreateCompatibleBitmap on every frame, racing
* with WM_PAINT and producing visible flicker. */
unsigned bmp_width;
Expand All @@ -128,8 +127,8 @@ typedef struct gdi
unsigned menu_width;
unsigned menu_height;
unsigned menu_pitch;
unsigned video_pitch;
unsigned video_bits;
unsigned frame_pitch;
unsigned frame_bits;
unsigned menu_bits;
int win_major;
int win_minor;
Expand Down
Loading
Loading