Skip to content

Commit d1afd9b

Browse files
committed
Render the game at full resolution
1 parent b69ca51 commit d1afd9b

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/ru/nsu/ccfit/zuev/osu/Config.java

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,10 @@ public static void measureDisplaySize() {
273273
Activity activity = (Activity) context;
274274
activity.getWindowManager().getDefaultDisplay().getRealMetrics(displayMetrics);
275275

276-
int width = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
277-
int height = Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels);
276+
RES_WIDTH = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
277+
RES_HEIGHT = Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels);
278278

279-
// Tries to emulate the original behavior, the game was designed for 1280x720
280-
// resolution, so we try to approximate the scale factor.
281-
float ratio = 1280f / width;
282-
283-
RES_WIDTH = (int) (width * ratio);
284-
RES_HEIGHT = (int) (height * ratio);
285-
286-
Log.v("Config", "Display size: " + width + "x" + height + "\nViewport size: " + RES_WIDTH + "x" + RES_HEIGHT);
279+
Log.v("Config", "Display size: " + RES_WIDTH + "x" + RES_HEIGHT);
287280
}
288281

289282
public static boolean isEnableStoryboard() {
@@ -390,18 +383,10 @@ public static int getRES_WIDTH() {
390383
return RES_WIDTH;
391384
}
392385

393-
public static void setRES_WIDTH(final int rES_WIDTH) {
394-
RES_WIDTH = rES_WIDTH;
395-
}
396-
397386
public static int getRES_HEIGHT() {
398387
return RES_HEIGHT;
399388
}
400389

401-
public static void setRES_HEIGHT(final int rES_HEIGHT) {
402-
RES_HEIGHT = rES_HEIGHT;
403-
}
404-
405390
public static boolean isDELETE_OSZ() {
406391
return DELETE_OSZ;
407392
}

0 commit comments

Comments
 (0)