mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-03 04:18:04 +03:00
Use non-square pixels for Gakuen Senki
Stretch 512 horizontal pixels to 582 pixels. This is the same pixel aspect ratio used by WebMSX. Also set SDL_HINT_RENDER_SCALE_QUALITY to "linear", to improve the scaling quality.
This commit is contained in:
+6
-5
@@ -40,16 +40,17 @@ AGS::AGS(NACT* parent, const Config& config) : nact(parent), dirty(false)
|
||||
{
|
||||
// 画面サイズ
|
||||
if (nact->crc32_a == CRC32_GAKUEN || nact->crc32_a == CRC32_GAKUEN_ENG) {
|
||||
window_width = 582;
|
||||
screen_width = 512;
|
||||
screen_height = 424;
|
||||
window_height = screen_height = 424;
|
||||
} else {
|
||||
screen_width = 640;
|
||||
screen_height = 400;
|
||||
window_width = screen_width = 640;
|
||||
window_height = screen_height = 400;
|
||||
}
|
||||
scroll = screen_height;
|
||||
|
||||
SDL_SetWindowSize(g_window, screen_width, screen_height);
|
||||
SDL_RenderSetLogicalSize(g_renderer, screen_width, screen_height);
|
||||
SDL_SetWindowSize(g_window, window_width, window_height);
|
||||
SDL_RenderSetLogicalSize(g_renderer, window_width, window_height);
|
||||
sdlTexture = SDL_CreateTexture(g_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, screen_width, screen_height); // TOOD: pixelformat?
|
||||
|
||||
// DIBSection 8bpp * 3 (表, 裏, メニュー)
|
||||
|
||||
Reference in New Issue
Block a user