screen-resolution

How to get monitor/display resolution

ぐ巨炮叔叔 提交于 2019-12-07 13:31:03
问题 As you know, monitors and displays are manufactured with some resolution. I need to get monitor/display resolution. I don't mean resolution of game window/fullscreen, I mean physical resolution of monitor/display. I need it to work both on Android and Windows. EDIT : I just found what i'm looking for is called NATIVE RESOLUTION 回答1: Looks like i found solution. @Draco18s pointed to Screen class but what i'm looking for is called Display. Display class allows me to get native size of monitor

Why is the scale representing screen size wrong in iOS for my iPad Mini?

安稳与你 提交于 2019-12-07 12:20:57
问题 I have a 1st generation iPad Mini (Model A1432) with a screen resolution of 1024x768 (documentation). I have the following code in my app: CGRect screenBounds = [[UIScreen mainScreen] bounds]; CGFloat screenScale = [[UIScreen mainScreen] scale]; CGSize screenSize = CGSizeMake(screenBounds.size.width * screenScale, screenBounds.size.height * screenScale); screenSize.height and screenSize.width report: 2048x1536, which is wrong. The screenScale value is 2, but it is my understanding that it

How to change screen resolution programmatically [duplicate]

扶醉桌前 提交于 2019-12-07 06:59:51
问题 This question already has answers here : Programmatically change screen resolution? (4 answers) Closed 6 years ago . When my application is loaded system screen resolution needed to change to 1024 * 768. When its closed, it change to the original screen solution. How to achive this?. Any feasible solution is there? Basically I'm working with vb.net anyway I welcome a solution from C#. 回答1: Changing the resolution is more difficult. This CodeProject describes how to do it in C# http://www

Get screen resolution of device

核能气质少年 提交于 2019-12-07 05:11:06
问题 I used following method to get the screen size: public static Point getScreenSize(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); int w = wm.getDefaultDisplay().getWidth(); int h = wm.getDefaultDisplay().getHeight(); return new Point(w, h); } On my samsung galaxy s6, this method returns 1080x1920... Although my device has a resolution of 1440x2560. Why? Is there a better method to get the screen resolution that works on newer phones

Rails 3: How to store screen resolution?

安稳与你 提交于 2019-12-06 15:58:09
I want to store user's screen resolution in database when user login. How to detect and store it to database when user login? Read it with JavaScript (browsers don't send screen resolution information by default, so it isn't available to Ruby or anything else server side unless you make it so), then generate a hidden input , set the name and value based on the data you've gathered, then add it to the form containing the username and password inputs. Oh, and you might find the window size more useful than the screen resolution. Not everybody maximizes their windows. 来源: https://stackoverflow

How to support phones up to 4.0, excluding tablets?

落爺英雄遲暮 提交于 2019-12-06 13:36:49
There is an easy way to provide compatibility for phones up to 4.0, but excluding tablets? For example, can I: <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14" /> And then set: <supports-screens android:anyDensity="true" android:xlargeScreens="false" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" /> This config filter the tablets from market? Many thanks for the help! First of all, let me be very clear in pointing out that this is not recommended . Google wants developers to create apps that work on pretty much

Dealing with different resolutions for pixel based android game

拟墨画扇 提交于 2019-12-06 11:46:09
问题 I am developing a 2D platformer game for the android platform, so I don't really care about the screen DPI, but much more about the actual resolution in pixels. From what I've gathered on the net, there are a couple of different resolutions (and aspect ratios) present. According to my search, the two resolutions that are currently widespread are 480x320 (1.5) and 800x480 (1.666), is that right? I'd like to target these two resolutions to reach most customers. Now, I can deal with the

How to connect in full screen mode to Linux CentOS 7 virtual machine?

旧时模样 提交于 2019-12-06 06:49:52
问题 I'm connecting to CentOS 7 VM from Hyper-V from Windows 8.1. The full screen mode is not working. I need to fix that. Other VMs including CentOS 6 and Windows Server have no problems. These are some observations I made when I connect to that VM from Hyper-V Manager. CentOS 7, while booting, displays this warning "fast TSC calibration failed". I read that this is not a problem but I'm not sure. Everything else is working in the VM except not being able to work in the full screen mode of my

Screen resolution changes for the remote machine after safely closing the RDP session with “SupressWhenMinimzed”

亡梦爱人 提交于 2019-12-06 05:30:30
First of all sorry for the (maybe not so specific) title as it consists of multiple topics. The issue atm i'm having is related to my test automation setup. It consists of a linux machine handling the BE + FE and starting of the test themselves. And a Windows Server 2008 (Terminal) to which i connect through RDP session and it's the place the actual tests are run. For automation purposes i use Ranorex. First of all how i have the Win machine set up: As Ranorex is a GUI test automation tool it needs to have the components visible for the AUT (application under test) and for this reason you need

How to show the same part of game on every aspect ratio on Android devices with Unity?

半腔热情 提交于 2019-12-06 03:04:33
问题 I'm coming from Libgdx engine to Unity and I'm a beginner programmer. I try to make a game in Unity for Android and iOS devices, but I have a problem with the aspect ratio/resolution scaling. In Libgdx if you have develop something you give a "default" resolution, and everything will be scaled to the device's screen, not matter if it has bigger or smaller resolution, and nothing will be cut off from the screen. On the other side, in Unity if I make a game it will crop the screen to the chosen