View Issue Details

IDProjectCategoryView StatusLast Update
0004430The Dark ModCodingpublic11.12.2018 05:12
Reporterduzenko Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status assignedResolutionopen 
Product VersionSVN 
Target VersionTDM 2.08Fixed in Version 
Summary0004430: Allow TDM to run on non-primary monitors
DescriptionCurrently TDM will always run on a primary Windows monitor.
Owners of multi-monitor systems get used to be able to choose what program runs on what monitor.
TagsNo tags attached.

Relationships

related to 0004402 resolvedduzenko Dpi Awareness 

Activities

duzenko

duzenko

01.12.2016 12:45

developer   ~0008577

Done (partially) for r_useFbo 1.
Instructions:
 - TDM starts fullscreen on primary monitor
 - alt-enter and ` to open console
 - drag window to another monitor
 - alt-enter and ` to close console

As for r_useFbo 0 I am confused by this code

  x = y = w = h = 0;
...
  SetWindowPos(win32.hWnd, parms.fullScreen ? HWND_TOPMOST : HWND_NOTOPMOST, x, y, w, h, parms.fullScreen ? SWP_NOSIZE | SWP_NOMOVE : SWP_SHOWWINDOW);

Anyone who has a clue feel free to fix.
nbohr1more

nbohr1more

19.09.2017 21:53

developer   ~0009307

The line you have trouble with can be decoded by:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx

That said, this is the most widely referred to solution:


https://www.gamedev.net/forums/topic/455737-c-winapi-how-to-start-a-program-in-secondary-display-device/?PageSpeed=noscript

The only method I found was to create the window and then move it to a location on the secondary screen before showing it.

To do this you need to enumerate the display devices and get their 'virtual coordinates' so that you know where to move the window to.

For example on my setup the virtual coordinates for my primary monitor would be (0,0) with a width of 1920 and height of 1200. My secondard monitor however, as it is to the left of my primary has the virtual coordinates of (-1920,0) and the same width and height.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd162610(v=vs.85).aspx
nbohr1more

nbohr1more

11.12.2018 05:11

developer   ~0010870

Too close to 2.07 beta. Moving to 2.08

Issue History

Date Modified Username Field Change
30.11.2016 20:36 duzenko New Issue
30.11.2016 20:36 duzenko Status new => assigned
30.11.2016 20:36 duzenko Assigned To => duzenko
01.12.2016 12:45 duzenko Note Added: 0008577
01.12.2016 12:49 duzenko Relationship added related to 0004402
19.09.2017 21:53 nbohr1more Note Added: 0009307
06.10.2017 02:33 nbohr1more Target Version TDM 2.06 => TDM 2.07
11.12.2018 05:11 nbohr1more Note Added: 0010870
11.12.2018 05:12 nbohr1more Target Version TDM 2.07 => TDM 2.08