From: 諏訪子 Date: Thu, 2 May 2024 09:36:43 +0000 (+0900) Subject: ごめん X-Git-Tag: mivfx-0.5.0~14 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3bb0f66e0bcf45964a3ff550985e850756387c5f;p=mivfx.git ごめん --- 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 };