Sure enough the output is this (1080 x 1920): Connected my Developer enabled Samsung S7 phone and pressed F5.Opened up the Play store and grabbed the first package name of the first game I saw (in “new and updated apps”, yeah, right as if these represent new apps in any way and are not cherry picked for promotion, they’re all so new in fact they each have thousands of reviews already): The bold sections below are from the debug output and show where the native resolution is changed from 1440 x 2960 to 1080 x 2220 (for no reason other than the Package Name, apparently). My guess is that the Android phone is remembering something about an app even after it’s uninstalled/cache cleared/data deleted, and so simply giving a certain package name is causing this weird behaviour.Ĭan anybody guide me towards solving this strange issue please? Public AndroidGameWindow(AndroidGameActivity activity, Game game) This becomes important because Monogame is setting up the game window, view and graphics device based on the wrongSize version. If I change the name value even by one letter then wrongSize suddenly agrees with correctSize, as if by magic. In this example, wrongSize isn’t always wrong, only if I give my app package name a certain name value. Point correctSize = new Point(mode.PhysicalWidth, mode.PhysicalHeight) It seems there is at least one other way to get this info, like this:ĭisplay.Mode mode = () On Android I’m getting a different screen size depending on the package name I give my app.įor example in Activity1.OnCreate (the effective entry point to my game) I mimic what monogame does to get the current screen size:Ī wrongSize = new () Hello all, first post here I hope someone can help me with!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |