It is currently December 12th, 2019, 8:23 pm

Game mode

Changes made during the Rainmeter 4.4 beta cycle.
User avatar
Brian
Developer
Posts: 1932
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Game mode

Brian » November 12th, 2019, 8:05 pm

In a perfect world, the user would probably like to just "pause" the skin....meaning: pause the update cycle (including measures, but retaining their values), do not react to any user input (including mouse input and dragging of the skin), disallow any bangs from firing, and basically "freeze" any drawing to the screen.

There are a couple of problems though. First, the "drawing" of the skin still needs to happen in some cases (like if a window moves to expose new parts of the skin). Windows will want to re-draw the skin in those cases. Second, multi-threaded "features" of Rainmeter (such as ActionTimer, Webparser, skin transitions and others) can still be doing "work" regardless of what main Rainmeter thread is doing. Pausing those threads is tricky due to timing issues. Third, Windows will still send messages to each skin even if we decide to "not" react to them. This still uses CPU (and in some rare cases, GPU).

While we could just disallow any drawing at all while in "Game mode", this (in my opinion) would lead the user to think the skin has unloaded. If it looks like the skin is unloaded, we might as well unload it.

If it looks like a duck, walks like a duck, and quacks like a duck...it's a duck.



As to the question of firing OnCloseAction, I believe this should happen since you can exit Rainmeter while in "Game mode"...and there would be no practical way to fire those bangs after the skin has unloaded. OnCloseAction's always fire when a skin is completely unloaded. RefreshAll does not fully unload the skin before "restarting" that skin, which is why OnCloseAction doesn't fire in this case.

-Brian
User avatar
jsmorley
Developer
Posts: 19864
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Game mode

jsmorley » November 12th, 2019, 8:25 pm

Brian wrote:
November 12th, 2019, 8:05 pm
As to the question of firing OnCloseAction, I believe this should happen since you can exit Rainmeter while in "Game mode"...and there would be no practical way to fire those bangs after the skin has unloaded. OnCloseAction's always fire when a skin is completely unloaded. RefreshAll does not fully unload the skin before "restarting" that skin, which is why OnCloseAction doesn't fire in this case.
Hmm... Good point. Ok, fair enough.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3643
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Game mode

eclectic-tech » November 12th, 2019, 11:28 pm

I have seen this scenario happen several times while testing Game Mode...

If a skin is loaded to my currently loaded skins (I tested with "ActiveDock" by JSMorley & other skins) and Game mode is activated, when Game mode exists, the last skin I loaded ("Active Dock") is no longer active; all other skins are reactivated.

If I load a skin and do a "Refresh All" before calling Game mode, then all skins are correctly reactivated.

Not sure if it is just me or if others have noticed.

Specs:
Rainmeter 4.4.0.3330 beta (64-bit)
Language: English (1033)
Build time: 2019-11-05 20:07:21
Commit Hash: e76628bc
Windows 10 Pro 1903 64-bit (build 18362) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\{me}\Rainmeter\Skins\
SettingsPath: C:\Users\{me}\AppData\Roaming\Rainmeter\
IniFile: C:\Users\{me}\AppData\Roaming\Rainmeter\Rainmeter.ini

Other than that "blip", I think this will be a useful feature. :great:

EDIT: Updated to latest beta (3330) and tested... it still does not always load the last skin I loaded (unless I "Refresh All" prior to calling Game mode).
User avatar
CyberTheWorm
Posts: 670
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Game mode

CyberTheWorm » November 12th, 2019, 11:51 pm

By the way this is working great

Rainmeter 4.4.0.3330 beta (64-bit)
Language: English (1033)
Build time: 2019-11-07 16:15:41
Commit Hash: 63b05e32
Windows 10 Pro 1903 64-bit (build 19013) - English (1033)
Path: F:\Rainmeter\
SkinPath: F:\Rainmeter\Skins\
SettingsPath: F:\Rainmeter\
IniFile: F:\Rainmeter\Rainmeter.ini
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
Brian
Developer
Posts: 1932
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Game mode

Brian » November 13th, 2019, 7:05 am

eclectic-tech wrote:
November 12th, 2019, 11:28 pm
I have seen this scenario happen several times while testing Game Mode...

If a skin is loaded to my currently loaded skins (I tested with "ActiveDock" by JSMorley & other skins) and Game mode is activated, when Game mode exists, the last skin I loaded ("Active Dock") is no longer active; all other skins are reactivated.

If I load a skin and do a "Refresh All" before calling Game mode, then all skins are correctly reactivated.

Not sure if it is just me or if others have noticed.

Specs:
Rainmeter 4.4.0.3330 beta (64-bit)
Language: English (1033)
Build time: 2019-11-05 20:07:21
Commit Hash: e76628bc
Windows 10 Pro 1903 64-bit (build 18362) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\{me}\Rainmeter\Skins\
SettingsPath: C:\Users\{me}\AppData\Roaming\Rainmeter\
IniFile: C:\Users\{me}\AppData\Roaming\Rainmeter\Rainmeter.ini

Other than that "blip", I think this will be a useful feature. :great:

EDIT: Updated to latest beta (3330) and tested... it still does not always load the last skin I loaded (unless I "Refresh All" prior to calling Game mode).
Huh, there is something going on with this...but there is something different for me. It seems to only happen after I have just installed a rmskin.

For me, here is the sequence of events:
1. Install a .rmskin. Doesn't seem to matter if Rainmeter was running prior to installing a rmskin. Also doesn't seem to matter whether "Load selected skins" checkbox is checked or unchecked.
2. Once the rmskin finishes installing and Rainmeter starts up, load the skin if you had "Load selected skins" UNchecked in the installer.
3. Select "Game mode" from the tray icon's context menu. All skins should unload.
4. Select "Game mode" again to deactivate game mode. All skins BUT the installed skin should appear. Subsequent "Game mode" selections result in the same behavior. Even the context menu shows a "dot" (meaning it is loaded) next to the recently installed skin, even though Manage does not say it is loaded.
5. Exit Rainmeter, and re-start Rainmeter. The installed skin should now appear.
6. Enter "Game mode" and exit "Game mode". Everything should work fine.

So, for me, the issue isn't about the "last loaded skin" not returning from "Game mode", but a recently installed skin not returning from "Game mode" properly. I can load any skin and it properly works with "Game mode".

Edit: Found another "scenario" to when this happens (which is helping to narrow down the issue). Seems loading a layout that does not contain the skin in question...activating it, then doing the "Game mode" cycle results in the same issue.


-Brian

Edit 2: The issue is fixed and will be available for the next beta. Thanks for reporting.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3643
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Game mode

eclectic-tech » November 13th, 2019, 2:40 pm

Glad you found the issue! :thumbup:
nek
Posts: 8
Joined: November 3rd, 2019, 12:00 am

Re: Game mode

nek » December 3rd, 2019, 4:20 am

There is no issue for me with my lazy RSS feeds skins.

Code: Select all

[Rainmeter]
Update=60000
DefaultUpdateDivider=-1
Rainmeter 4.4.0.3338 beta (64-bit)
Language: Japanese (1041)
Build time: 2019-11-19 7:55:40
Commit Hash: ab72019a
Windows 10 Pro 1909 64-bit (build 18363) - Japanese (1041)
Path: Z:\Apps\Rainmeter\
SkinPath: Z:\Apps\Rainmeter\Skins\
SettingsPath: Z:\Apps\Rainmeter\
IniFile: Z:\Apps\Rainmeter\Rainmeter.ini

I posted translations of "Game mode" for all languages.
https://forum.rainmeter.net/viewtopic.php?f=100&p=168678#p168678

Added December 3rd, 2019 | 2019-12-03
"Use hardware acceleration (Requires restart)" for all languages.
https://forum.rainmeter.net/viewtopic.php?f=100&p=168698#p168698