MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001064VCMIGUI - Otherpublic2012-08-31 22:582014-05-30 17:41
ReporterZamolxis 
Assigned ToTow 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.89 
Target VersionFixed in Version0.9 
Summary0001064: Audio-video settings don't take effect anymore while the client is open
DescriptionProbably not all, but certain audio-video settings don't take effect anymore (since 0.88) while the client is open, but only after I restart the application. Some examples:

- changing the music / effects volume (not only don't they change instantly, but if you close System Options and open it again, you see the previous selection)

- F4 for full screen enable / disable

- new resolutions from System Options

All these only take effect after I close and reopen the application (e.g.: next time starts in full screen if I used F4 in the previous session, apparently with no effect at the time).
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002970)
Ivan (developer)
2012-08-31 23:28

Resolution takes effect only after restart. But everything else including fullscreen should work immediately. And it does at least for me.

Not sure what's wrong here. Saving is a result of some change in settings - no changes in settings means that game won't save config structure.

Check if "new creature window" switch works without restarting. It uses a bit different code so it may behave differently.
(0002971)
Zamolxis (viewer)
2012-09-01 00:04

Honestly, I found it suspicious myself that nobody would report this for so long. I re-booted the PC just in case, but no change.

To go back to your note:
- new creature window changes immediately between old and new
- also other changes take effect immediately, like the hex grid, etc
- about resolution, I knew it didn't take place immediately, but I thought that going through the Main Menu was enough, not go as far a restart. At least it worked from console so far, because - btw - now typing "resolution" in console does nothing (since 0.89 only)
- F4 and sound changes however really take no effect while the client is open
- I went back to previous releases, and I found it in 0.88 as well, but not before that

I thought for a moment it could be the extended graphics package which overwrites 1 json file, but that wouldn't explain why it occurs in 0.88 already. Could still be something related to my computer, but I can't figure out yet what else could it be.
(0002972)
Ivan (developer)
2012-09-01 06:32

"resolution" console command is disabled - with high-res menu changing resolution in runtime became a bit more complex. It is possible that someone will update code to allow this (or even make window resizeable) but not me or at least not now.

In 0.88 settings were moved from config.bin + settings.txt to settings.json with defaults in defaultSettings.json. Config system had no changes at all since 0.88 release - everything worked as it should.

Try deleting config/setting.json and config/settings.txt (if present). Don't see how this can affect anything though...
(0002976)
Tow (developer)
2012-09-06 00:48

I do also see the problem.
I looked into the code and I don't see any path leading from system options setting music volume into CMusicHandler::setVolume.
(0002977)
Ivan (developer)
2012-09-06 08:20
edited on: 2012-09-06 08:20

Look on CMusicHandler::listener member
It should call CMusicHandler::onVolumeChange() when configuration node changes. Change detection done via JsonNode comparison in Settings::~Settings()

Stacktrace on my side (calls from boost omitted, everything works)

0 CMusicHandler::setVolume
1 CMusicHandler::onVolumeChange
7 SettingsListener::nodeInvalidated
8 SettingsStorage::invalidateNode
9 Settings::~Settings
10 CSystemOptionsWindow::setMusicVolume
17 CHighlightableButtonsGroup::selectionChanged

(0002978)
Tow (developer)
2012-09-06 10:12

Right, missed ~Settings destructor path. Tricky! But for me when it gets into SettingsStorage::invalidateNode, the listeners set is empty. I'll debug it more later today.
(0002979)
Tow (developer)
2012-09-06 10:27

Or... I guess I know.

CMusicHandler constructor has initializer list entry for listerner:
    listener(settings.listen["general"]["music"])

But the settings.listen["general"]["music"] creates temporary, that creates by conversion SettingsListener temporary. When temporary gets created, it registers in the listeners set, when it gets destructed it removes itself.
But the actual CMusicHandler::listener member was created by copy constructor from that temporary and is not registered.

[I'm curious how it worked on GCC. Possibly because of default-generated move constructor?]

Should be fixed in r2873.
(0002981)
Ivan (developer)
2012-09-06 11:16
edited on: 2012-09-06 11:16

It is more like some kind of in-place construction:
http://pastebin.com/UpQnmSbh [^]

Copy constructor is unused, compiled in C++03 mode so move constructor is not an option.

No difference between clang\gcc or c++03\c++11

(0002983)
Tow (developer)
2012-09-07 23:19

I see, thanks for explanation. :)
(0002999)
Zamolxis (viewer)
2012-09-09 07:54

Confirmed as fixed in 0.89b, but I'll check again in 0.9 before closing.

- Issue History
Date Modified Username Field Change
2012-08-31 22:58 Zamolxis New Issue
2012-08-31 23:00 Zamolxis Description Updated View Revisions
2012-08-31 23:28 Ivan Note Added: 0002970
2012-09-01 00:04 Zamolxis Note Added: 0002971
2012-09-01 06:32 Ivan Note Added: 0002972
2012-09-06 00:48 Tow Note Added: 0002976
2012-09-06 08:20 Ivan Note Added: 0002977
2012-09-06 08:20 Ivan Note Edited: 0002977 View Revisions
2012-09-06 10:12 Tow Note Added: 0002978
2012-09-06 10:27 Tow Note Added: 0002979
2012-09-06 10:36 Tow Status new => resolved
2012-09-06 10:36 Tow Fixed in Version => 0.9
2012-09-06 10:36 Tow Resolution open => fixed
2012-09-06 10:36 Tow Assigned To => Tow
2012-09-06 11:16 Ivan Note Added: 0002981
2012-09-06 11:16 Ivan Note Edited: 0002981 View Revisions
2012-09-07 23:19 Tow Note Added: 0002983
2012-09-09 07:54 Zamolxis Note Added: 0002999
2014-05-30 17:41 beegee Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean