Jump to content


Photo

Minimizing TDM


  • Please log in to reply
8 replies to this topic

#1 Agent Jones

Agent Jones

    Member

  • Member
  • PipPip
  • 46 posts

Posted 14 February 2016 - 02:33 PM

Hi. I've always found it annoying not to be able to alt-tab out of TDM or use Task Manager while in full screen. So I added this line to win_wndproc.cpp, line 293 (after win32.movingWindow = false)

ShowWindow(hWnd, SW_MINIMIZE);
 

It should do the same thing as @eqagunn 's Simple Minimizer script.

 

There's a problem when minimizing the game during map loading: sometimes the game will crash back to menu with ERROR: CropRenderSize: bad sizes. The minimizer script has the very same issue.


  • AluminumHaste, Anderson, Abusimplea and 1 other like this

#2 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3669 posts

Posted 15 February 2016 - 01:16 PM

Thanks for the tip. I'll try this out.

 

CropRenderSize is buggy on modern aspect ratios. It was made for 4:3. I have it tracked for 2.05. Probably not the same problem, but I'll be messing in that code anyway.

 

EDIT: tracked


Edited by SteveL, 15 February 2016 - 01:18 PM.


#3 Deadlove

Deadlove

    Advanced Member

  • Member
  • PipPipPip
  • 978 posts

Posted 16 March 2016 - 07:03 AM

If you run in through Steam like talked about in other thread, you can safely minimize using Steam program to do it. I also dislike not being able to alt + tab running from straight exe.

Plastik Musik - Andrew Nathan Kite, Owner

plastikmusik33@gmail.com

http://www.facebook.com/plastikmusik /

http://www.youtube.com/plastikmusik

http://www.plastikmusik.bandcamp.com

 

 


#4 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5168 posts

Posted 17 March 2016 - 08:01 AM

I used to just have Dextop always running, which allows you to run a second desktop and a key combination would switch between them. That avoided the kinds of buggy things that happen with alt-tabbing all the time, especially with older games, like the resolution resetting, etc.
Posted Image

#5 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 52 posts

Posted 13 April 2016 - 01:55 PM

I am still using CTRL+ALT+DEL bringing up the task manager and force minimizing from there. Me too would appreciate TDM behaving properly on ALT+TAB.



#6 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3669 posts

Posted 14 April 2016 - 12:16 PM

I've tried out Agent Jones' fix and it works pretty well. It can be unresponsive while the game is loading a map -- it can take a few seconds -- but that's because it relies on internal game code to minimize the game window when it detects that the window is no longer active. Still a massive improvement on having to use the task manager.

 

I've not been able to reproduce the CropRenderSize error though. I've tried loading several maps while switching in and out, and I've tried leaving TDM in the background to complete the load. No errors yet. I'd like to plug that gap before committing it. Has anyone found a reliable way to make the game crash using the script in the OP?



#7 Agent Jones

Agent Jones

    Member

  • Member
  • PipPip
  • 46 posts

Posted 15 April 2016 - 12:26 PM

The error can be reproduced by running TDM 2.03 in windowed mode and minimizing the game before the map is fully loaded and the player's view set up. When the game is minimized a WM_WINDOWPOSCHANGED message is sent and glConfig.vidWidth and vidHeight are set to 0, which seems to be the cause of the error.



#8 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3669 posts

Posted 17 April 2016 - 02:28 AM

Thanks. I did try that of course but for whatever reason I didn't get the error. I was running in a debug compile with a break point set at the point where the zero width and height cause the error to be spat out. When I get home later I'll search for that message and try to work it out.

#9 AluminumHaste

AluminumHaste

    Darkmod Contributor

  • Development Role
  • PipPipPipPipPip
  • 5646 posts

Posted 27 April 2016 - 09:42 AM

Is Borderless fullscreen windowed possible in OpenGL? That would fix a lot of these problems. Dark Souls 1 in particular works much better for me in Borderless fullscreen windowed via DSFIX.


  • Anderson likes this

I always assumed I'd taste like boot leather.

 




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users