Hydrogenaudio Forums

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: myQwil on 2018-05-04 19:49:10

Title: foo_sample - use bogo settings
Post by: myQwil on 2018-05-04 19:49:10
I've been looking through the SDK and noticed that in foo_sample's preferences.cpp there are some bogo settings.

Let's say I wanted to have it so that the Test command in mainmenu.cpp prints out:

"This is a sample menu command. Bogo 1 is currently 1337."

What would be the simplest way of accomplishing this?
Title: Re: foo_sample - use bogo settings
Post by: myQwil on 2018-05-06 00:36:57
Ok, I solved it. The simplest way to gain access to those bogo settings is:

- Put the bogo GUIDs in "guid.h"
- Put your extern declarations in "globals.h" and include that in mainmenu.cpp
- In preferences.cpp, change the cfg_uint declarations so that they aren't static

That last step especially was tripping me up. The fact that they were declared as static was resulting in unresolved external symbol errors and causing the build to fail.
SimplePortal 1.0.0 RC1 © 2008-2019