From 3bb0f66e0bcf45964a3ff550985e850756387c5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Thu, 2 May 2024 18:36:43 +0900 Subject: [PATCH] =?utf8?q?=E3=81=94=E3=82=81=E3=82=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 6042fd4..db2e31b 100644 --- a/main.c +++ b/main.c @@ -61,7 +61,7 @@ void windowevent(SDL_Event e) { float newAspectRatio = (float)newWidth / newHeight; int scaledWidth, scaledHeight; if (newAspectRatio != aspectRatio) { - // 画像よりウィンドウの方が広い場合 + // 画像よりウィンドウの方が広い場合 scaledHeight = newHeight; scaledWidth = (int)(scaledHeight * aspectRatio); } else { @@ -78,7 +78,7 @@ void windowevent(SDL_Event e) { // 大きすぎの場合もふざけんな if (scaledWidth >= (screenWidth-20)) scaledWidth = screenWidth-20; - if (scaledHeight >= (screenHeight-20)) scaledWidth = screenHeight-20; + if (scaledHeight >= (screenHeight-20)) scaledHeight = screenHeight-20; // テキスチャーのれんダーリングサイズの設定 SDL_Rect renderQuad = { imgWidth, imgHeight, scaledWidth, scaledHeight }; -- 2.43.0