Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Fullscreen & Mouse #435243
01/04/14 15:50
01/04/14 15:50
Joined: Mar 2010
Posts: 120
Switzerland
T
TehV Offline OP
Member
TehV  Offline OP
Member
T

Joined: Mar 2010
Posts: 120
Switzerland
Hi,
I have a program that requires to be run in fullscreen mode on a secondary monitor for a project I am working on. This all works perfectly fine now, except for the following:

-The mouse cursor is not visible on the secondary monitor despite having set mouse_mode to 4 and a valid bitmap to mouse_map. The cursor is visible when I open the program on the primary monitor.
-The mouse cursor is stuck on the monitor that the engine runs on.
-Attempting to switch to another program, the engine is minimized and must regain focus to become visible again.

It is absolutely necessary that the computer running the program continues to be usable (Windows and all its functions should be accessible) while my program is shown on the second screen, and it is of absolute importance that the program is synchronized to the screen frequency (so I must have it in fullscreen mode, right?). I must be able to move the mouse freely across both screens and be able to do things outside of the screen space occupied by the engine without it becoming invisible every time I click something.

My question is: how can I work around these issues?

EDIT: The main problem is that the engine is minimized when it loses focus. Is there a way around this?

Last edited by TehV; 01/04/14 17:20.
Re: Fullscreen & Mouse [Re: TehV] #435246
01/04/14 17:48
01/04/14 17:48
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
what you need is what we call fake-full-screen, this is not an engine related workaround, this is how Windows works with/handles full-screen apps.

A fake full screen window essentially means a normal window without frame/border at 0,0 of the screen and has same width/height as the screen.(optionally forced to be always on top). Check manual for video_* functions.

About sync stuff: it's not really 100% possible to make any engine spit-out frames at the same rate as screen refresh rate, when things are fast you can always limit frames(with fps_max) but when your fps drops below screen refresh rate you can do nothing about it.(except for optimizing your game's performance.)


3333333333
Re: Fullscreen & Mouse [Re: Quad] #435253
01/04/14 20:47
01/04/14 20:47
Joined: Mar 2010
Posts: 120
Switzerland
T
TehV Offline OP
Member
TehV  Offline OP
Member
T

Joined: Mar 2010
Posts: 120
Switzerland
I've got the fake-full-screen set up, but it doesn't quite behave the way I want it to:

When in actual fullscreen, the engine automatically syncs to the screen frequency (this is known as VSync and is of high priority to my program). The fake-full-screen doesn't do this.
In my case, setting fps_max to 60 is insufficient because I'm actually counting single screen frames. My timing would be off if there's just the slightest difference between the screen frequency and the 60 frames per second the engine is set to.
Is there a way I can enable VSync anyways?

In terms of the mouse/losing focus issue, the fake-full-screen does exactly what I needed it to do. In terms of framerate, it doesn't.

Last edited by TehV; 01/05/14 12:27.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1