It is currently July 15th, 2020, 5:27 am

Game mode

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

Re: Game mode

Post by Brian »

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: 21024
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Game mode

Post by jsmorley »

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: 4044
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Game mode

Post by eclectic-tech »

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: 710
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Game mode

Post by CyberTheWorm »

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: 2028
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Game mode

Post by Brian »

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: 4044
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Game mode

Post by eclectic-tech »

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

Re: Game mode

Post by nek »

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
User avatar
Krainz
Posts: 190
Joined: May 27th, 2012, 5:16 am

Re: Game mode

Post by Krainz »

Idea:

Allow Rainmeter users to list programs. Rainmeter activates Game Mode whenever any of those programs are in focus.

And probably allow skin creators to add programs to that list

Example:

I use FileView plugin to launch my games. I'd want to make my skin add those games (that are inside the folder observed by FileView) to the list, so I don't have to manually add a new game to the Game Mode list whenever I purchase a new game.
User avatar
balala
Rainmeter Sage
Posts: 11036
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Game mode

Post by balala »

Krainz wrote:
December 21st, 2019, 6:57 pm
Allow Rainmeter users to list programs. Rainmeter activates Game Mode whenever any of those programs are in focus.
Probably not possible: https://forum.rainmeter.net/viewtopic.php?f=129&t=33882&start=10#p167764
User avatar
sammael
Posts: 25
Joined: September 22nd, 2013, 5:32 pm

Re: Game mode

Post by sammael »

Krainz wrote:
December 21st, 2019, 6:57 pm
Idea:

Allow Rainmeter users to list programs. Rainmeter activates Game Mode whenever any of those programs are in focus.

And probably allow skin creators to add programs to that list

Example:

I use FileView plugin to launch my games. I'd want to make my skin add those games (that are inside the folder observed by FileView) to the list, so I don't have to manually add a new game to the Game Mode list whenever I purchase a new game.
This is something I would welcome too, and in fact was how I thought the "Game Mode" will function once it was announced. As a manual toggle I don't really see it's usefulness as I usually only remember to activate it when I alt tab and notice rainmeter on desktop after playing for 2 hours already, by which point it's already 2 hours late.

At the moment I launch my games via batch files that forcefully kill Rainmeter.exe and then restart it once game exe is closed. You can see how having rainmeter manage this would be much more efficient.