At first there weren't many enums in Volume.h, but the number has been
growing, and I'm planning to add one more for regions. To not make
Volume.h too large, and to avoid needing to include Volume.h in code
that doesn't use volume objects, I'm moving the enums to a new file.
I'm also turning them into enum classes while I'm at it.
Rather than rely on the developer to do the right thing,
just make the default behavior safely deallocate resources.
If shared semantics are ever needed in the future, the
constructor that takes a unique_ptr for shared_ptr can
be used.
ISOFile and GameFile were using IsWiiDisc() and IsWadFile() to set
an enum value. The volume might as well return an enum directly.
I increased the Qt CACHE_REVISION because m_platform now is saved as u32
instead of int, but increasing the wx CACHE_REVISION is not necessary.
This is good for performance when FileMontior is selected
but the log level only is set to notice or warning.
The ability to do this wasn't available until recently:
1ed41672f5
When CFileSystemGCWii::GetFileName can't find a valid filename it would return nullptr.
nullptr as a std::string throws an assert within the std lib.
So return an empty string and check if it is empty or not
Now if more sound types are found, they just need to simply be added to
the unordered set.
- Also changed ShowSound() to IsSoundFile()
- Fixed IsSoundFile’s definition in FileMonitor.h. This whole time it
has been defined as a void method, when in reality it was a bool
function.
- Changed the FileMonitor’s string parameters to be constant references.