Project

General

Profile

Bug #414

Cursor misaligned on external monitor

Added by daprice over 11 years ago. Updated about 8 years ago.

Status:
Closed
Severity:
Normal
Assignee:
-
Category:
Controls and UI
Target version:
-
Start date:
03/16/2013
% Done:

100%

Version:
Platform:
OSX
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

OSX Mountain Lion 10.8.3. Dual-monitor setup with retina Macbook Pro screen as the main display, and a standard 24" display as the secondary.

When I run KSP in windowed mode on the main display it works fine. When I move the window to the external monitor, the game acts like the cursor is several inches off from where it actually is. Here's a video to demonstrate, taken on my external display with a stock copy of KSP with default settings (the circles around the cursor are how my video recording software shows clicks). The video was taken in 0.18.4, but the bug is identical in 0.19.0. Versions of KSP prior to 0.18.4 did not have the bug.

The problem occurs in the menu, other UI, and in the game itself. It happens regardless of whether or not I use OSX's "open in low resolution" checkbox to override the retina display. No other games I've tried have similar issues.

720p_1024x768.jpeg (666 KB) 720p_1024x768.jpeg Monitor resolution: 720p, Game resolution: 1024x768 lawnmowerlatte, 01/23/2014 10:18 PM
1080p_1024x768.jpeg (1.61 MB) 1080p_1024x768.jpeg Monitor resolution: 1080p, Game resolution: 1024x768 lawnmowerlatte, 01/23/2014 10:18 PM
1080p_1280x800.jpeg (1.5 MB) 1080p_1280x800.jpeg Monitor resolution: 1080p, Game resolution: 1280x800 lawnmowerlatte, 01/23/2014 10:18 PM
2158
2159
2160

History

#1 Updated by akohlsmith about 11 years ago

I too have this issue. 10.8.5, 11" 2012 MacBook Air, no retina display here. My mouse doesn't appear to be several inches off; I can't get the main screen options to highlight no matter where I put the mouse. It works great on the laptop display. I'm using a 22" LG monitor connected to the mini displayport connector on the laptop with a regular old mini diplayport-to-hdmi adapter.

This is version 0.22 purchased through Steam. No updates are available to me as of today.

#2 Updated by lawnmowerlatte almost 11 years ago

2158
2159
2160

Same issue here. This occurred with version 0.22 and is currently happening on 0.23 on my Mid-2012 13" MacBook Pro (MacBookPro9,2) using a Samsung 27" TV as the extra monitor (Mini DisplayPort to HDMI).

I have a few extra details of note:
  1. This always happens only on the "second" monitor. If I move the menu bar to the external monitor, that monitor will work as expected and instead the native display will have the problem.
  2. It DOES NOT appear to have any impact how the second monitor is "aligned" with the first. (i.e. native higher or lower than external)
  3. It DOES appear to be impacted by the resolution of the external monitor (see 720p_1024x768. jpg vs 1080p_1024x768.jpg)
  4. It DOES NOT appear to be impacted by the resolution of the game (see 1080p_1024x768.jpg vs. 1080p_1280x800. jpg)
  5. It DOES appear that the closer the external resolution is to the native resolution, the closer the cursor will be. When I tried 1344x756 for the external and 1280x800 on the native, it was much closer than other settings. When I set the external to 720p and my native monitor to 1152x720, the cursor was dead on.

Hopefully these details help narrow down the problem.

#3 Updated by jonnyp about 10 years ago

  • Platform OSX added

I have a rough theory on this one:

Given that mouse co-ordinates originate from bottom left of the screen and window rect's originate from the top left of the screen, If the resolution of the screen changes then these two variables will not match up properly unless the new screen size is taken into account.

Example: (I've simplified the numbers to make the math easier) Open a KSP window of size 500x500 on a screen which is 1000x1000 in resolution. assuming the window is in the middle of the screen and you click on the center of the screen at position (500,500). The game will register this as a button click at position (250,250)(that's 500-250,500-250) within the games window. When you move the game window over so it is centralised on the second screen at resolution 1200x1200, then click on the center of the second screen (600,600) the game will still think it's at the original resolution of 1000x1000 so will think you have clicked at (250,50) (that's 600-350, 400-350).

Hope this makes sense, I believe its OSX only and probably due to OpenGL

#4 Updated by jonnyp about 10 years ago

tl;dr: Assuming you get the mouse position by doing screenHeight - mousePos.y (because mousepos is from bottom left) then when you change monitors the game doesn't realise the screenHeight has changed, so the vertical position is off

#5 Updated by Squelch about 10 years ago

I'm unable to reproduce this on Windows no matter what crazy resolution combinations or even changing them while KSP is running. It does look increasingly like an OpenGL/OSX issue. Is it still a problem in 24.2?

A test on a Linux platform would also help narrow this down further.

#6 Updated by lawnmowerlatte almost 10 years ago

  • Status changed from New to Need More Info

I just tested this with .25.0.642 on the same hardware as my earlier test using 1280x800 and 1080p and cannot reproduce the earlier result. I'd say this can probably be closed.

#7 Updated by TriggerAu over 8 years ago

  • Status changed from Need More Info to Needs Clarification

#8 Updated by Claw over 8 years ago

  • Status changed from Needs Clarification to Closed
  • % Done changed from 0 to 100

lawnmowerlatte wrote:

I just tested this with .25.0.642 on the same hardware as my earlier test using 1280x800 and 1080p and cannot reproduce the earlier result. I'd say this can probably be closed.

Closed, per comment

#9 Updated by reinderien about 8 years ago

lawnmowerlatte wrote:

I just tested this with .25.0.642 on the same hardware as my earlier test using 1280x800 and 1080p and cannot reproduce the earlier result. I'd say this can probably be closed.

Unfortunately I am able to reproduce this problem with 1.1.3 in Linux. Please advise if you want me to run any diagnostics. This is running on an external monitor whose resolution is not the same as the built-in laptop monitor. The built-in monitor is 1920x1080 and the external monitor is 1680x1050.

I solved the problem - there was a quirk where, even though the external monitor's maximum res is 1680x1050, KSP's res was showing as 1920x1080 and it was on the external monitor. Changing the resolution in KSP to the correct one solved the issue.

Also available in: Atom PDF