Open IncludedBerry11 opened 3 weeks ago
That doesn't seem right. Have you ever tried full screen? Press F11 after entering the game
I don't know very much about this but try alternate surface rendering off
here are some more info, latestlog.txt
Did you open it?
i don't have that option, maybe its for android versions above 8.1?
it shows 1464x720 in fcl's debug menu but in pojav's debug menu, it shows 1520x720
i don't have that option, maybe its for android versions above 8.1?
You need indeed android 8.1 or higer
I recommend not use (ignore notch) option. For saving battery
can you check and find out what's the problem? it works fine with FCL
i have tried changing overrideWidth to 1464 and the problem still persists
it is the same on all pojav launchers
maybe its only the controls including mouse
Did you open it?
can you convert this fcl code to your pojav's code? this must be the solution
FCL Code :
public static int getScreenHeight(Context context) {
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Point point = new Point();
wm.getDefaultDisplay().getRealSize(point);
return point.y;
}
public static int getScreenWidth(Activity context) {
SharedPreferences sharedPreferences;
sharedPreferences = context.getSharedPreferences("theme", MODE_PRIVATE);
boolean fullscreen = sharedPreferences.getBoolean("fullscreen", false);
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Point point = new Point();
wm.getDefaultDisplay().getRealSize(point);
if (fullscreen || SDK_INT < Build.VERSION_CODES.P) {
return point.x;
} else {
try {
Rect notchRect;
if (SDK_INT >= Build.VERSION_CODES.S) {
notchRect = Objects.requireNonNull(wm.getCurrentWindowMetrics().getWindowInsets().getDisplayCutout()).getBoundingRects().get(0);
} else {
notchRect = Objects.requireNonNull(context.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout()).getBoundingRects().get(0);
}
return point.x - Math.min(notchRect.width(), notchRect.height());
} catch (Exception e) {
return point.x;
}
}
}
Pojav's Code:
public static DisplayMetrics getDisplayMetrics(Activity activity) {
DisplayMetrics displayMetrics = new DisplayMetrics();
if(activity.isInMultiWindowMode() || activity.isInPictureInPictureMode()){
//For devices with free form/split screen, we need window size, not screen size.
displayMetrics = activity.getResources().getDisplayMetrics();
}else{
if (SDK_INT >= Build.VERSION_CODES.R) {
activity.getDisplay().getRealMetrics(displayMetrics);
} else { // Removed the clause for devices with unofficial notch support, since it also ruins all devices with virtual nav bars before P
activity.getWindowManager().getDefaultDisplay().getRealMetrics(displayMetrics);
}
if(!PREF_IGNORE_NOTCH){
//Remove notch width when it isn't ignored.
if(activity.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT)
displayMetrics.heightPixels -= PREF_NOTCH_SIZE;
else
displayMetrics.widthPixels -= PREF_NOTCH_SIZE;
}
}
currentDisplayMetrics = displayMetrics;
return displayMetrics;
}
It must be the notch or bounding box and maybe because of ignore notch(which is unaccessible for android 8.1 and below and enabled by default), i have forked and changed MovTery's PojavZenithHorizons's getDisplayMetrics code to minus 66 pixels from displayMetrics.getWidthPixels and it works perfectly fine. please make it so that the ignore notch option is available for all supported android versions if the problem persists on some other devices
i minus'd 66 pixels because it returns 1464 instead of 1530 which is the correct widthPixels which i have seen in FCL
nevermind, the bounding rects are implemented unofficially
Describe the bug
Devices with a notch (i guess) isn't properly scaled, the mouse is offset(not where it seems) and the screen seems off aswell, it works perfectly with FoldCraft Launcher tho, my device model is vivo 1811
The log file and images/videos
no
Steps To Reproduce
Expected Behavior
I expect the resolution to fit the screen properly and not be offset as done in FoldCraft Launcher
Platform
Anything else?
even the controls seem to be offset