Browse code

Port: Add override keyword.

Clarissa Walker authored on 2024/09/16 22:14:51
Showing 1 changed files
... ...
@@ -30,15 +30,15 @@ protected:
30 30
 	std::bitset<8> mutes;
31 31
 
32 32
 	XSFConfig_SNSF();
33
-	void LoadSpecificConfig();
34
-	void SaveSpecificConfig();
35
-	void GenerateSpecificDialogs();
36
-	INT_PTR CALLBACK ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
37
-	void ResetSpecificConfigDefaults(HWND hwndDlg);
38
-	void SaveSpecificConfigDialog(HWND hwndDlg);
39
-	void CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad);
33
+	void LoadSpecificConfig() override;
34
+	void SaveSpecificConfig() override;
35
+	void GenerateSpecificDialogs() override;
36
+	INT_PTR CALLBACK ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) override;
37
+	void ResetSpecificConfigDefaults(HWND hwndDlg) override;
38
+	void SaveSpecificConfigDialog(HWND hwndDlg) override;
39
+	void CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad) override;
40 40
 public:
41 41
 	unsigned resampler;
42 42
 
43
-	void About(HWND parent);
43
+	void About(HWND parent) override;
44 44
 };
Browse code

Various changes:

* Use enum class instead of enum (except for the enums for the resource IDs, not really necessary there).
* For NCSF specifically, included a function to convert an enum class to its underlying integral type (as this is needed for use with the std::bitset class).
* Cleanup headers so all the ones needed in a file are explicitly included even if they may possibly be included in another header.
* Used forward declarations in a few spots.
* Explicitly namespaced all (u)int*_t uses (this might seem like overkill, but it helps me see when the standard types are being used with a simple search for std::).
* Made sure it all builds with MinGW-w64 as well (both gcc and clang).
* Removed some std::move from DialogBuilder.cpp based on clang's warnings for that.
* Replaced use of std::copy_n on strings in DialogBuilder.cpp with my CopyToString functions that use wcscpy.
* Replaced CHAR_MIN/CHAR_MAX in eqstr.h and ltstr.h with std::numeric_limits<char>::min/max().

Naram Qashat authored on 2021/03/21 03:16:45
Showing 1 changed files
... ...
@@ -12,9 +12,12 @@
12 12
 #pragma once
13 13
 
14 14
 #include <bitset>
15
-#include "XSFPlayer.h"
15
+#include <string>
16
+#include "windowsh_wrapper.h"
16 17
 #include "XSFConfig.h"
17 18
 
19
+class XSFPlayer;
20
+
18 21
 class XSFConfig_SNSF : public XSFConfig
19 22
 {
20 23
 protected:
Browse code

Remove last modification date from files.

(I never remember to update these and besides, GitHub history can show when they were last modified.)

Naram Qashat authored on 2021/03/19 10:58:12
Showing 1 changed files
... ...
@@ -1,7 +1,6 @@
1 1
 /*
2 2
  * xSF - SNSF configuration
3 3
  * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
- * Last modification on 2014-09-24
5 4
  *
6 5
  * Partially based on the vio*sf framework
7 6
  *
Browse code

Lots of changes in regards to strings, as follows:

* Removed my custom String class, as well as removed the really old
Unicode ConvertUTF, the UTF Converter, and the UTF Encode/Decode
functions.
* Replaced the above with using standard C++ std::wstring_convert and
std::codecvt_utf8.
* Added headers adapted from llvm's libc++ project for allowing the
above C++ classes to exist with GCC and Clang when libc++ isn't being
used.
* Used std::string over std::wstring whenever possible.
* Added header adapted from llvm's libc++ project to create special
versions of the ifstream and ofstream classes that would utilize _wfopen
on non-MSVC Windows compilers, so those compilers could access files on
Windows that use characters outside the current codepage.
* Removed the -static-libgcc and -static-libstdc++ flags from the
Makefile for non-MSVC builds. The generated DLLs will require extra DLLs
from either Cygwin or MinGW (whichever is used to compile), I've only
tested with MinGW and for some reason they crash Winamp on exit, I have
no idea why.

Naram Qashat authored on 2014/09/24 13:58:55
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * xSF - SNSF configuration
3 3
  * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
- * Last modification on 2014-09-08
4
+ * Last modification on 2014-09-24
5 5
  *
6 6
  * Partially based on the vio*sf framework
7 7
  *
... ...
@@ -21,7 +21,7 @@ class XSFConfig_SNSF : public XSFConfig
21 21
 protected:
22 22
 	static bool /*initSixteenBitSound, */initReverseStereo;
23 23
 	static unsigned initResampler;
24
-	static std::wstring initMutes;
24
+	static std::string initMutes;
25 25
 
26 26
 	friend class XSFConfig;
27 27
 	bool /*sixteenBitSound, */reverseStereo;
Browse code

Use #pragma once instead of include guards.

Naram Qashat authored on 2014/09/08 14:47:36
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * xSF - SNSF configuration
3 3
  * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
- * Last modification on 2013-03-21
4
+ * Last modification on 2014-09-08
5 5
  *
6 6
  * Partially based on the vio*sf framework
7 7
  *
... ...
@@ -10,8 +10,7 @@
10 10
  * snes9x.
11 11
  */
12 12
 
13
-#ifndef XSFCONFIG_SNSF_H
14
-#define XSFCONFIG_SNSF_H
13
+#pragma once
15 14
 
16 15
 #include <bitset>
17 16
 #include "XSFPlayer.h"
... ...
@@ -41,5 +40,3 @@ public:
41 40
 
42 41
 	void About(HWND parent);
43 42
 };
44
-
45
-#endif
Browse code

Import actual code.

Naram Qashat authored on 2013/03/26 02:41:19
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,45 @@
1
+/*
2
+ * xSF - SNSF configuration
3
+ * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
+ * Last modification on 2013-03-21
5
+ *
6
+ * Partially based on the vio*sf framework
7
+ *
8
+ * NOTE: 16-bit sound is always enabled, the player is currently limited to
9
+ * creating a 16-bit PCM for Winamp and can not handle 8-bit sound from
10
+ * snes9x.
11
+ */
12
+
13
+#ifndef XSFCONFIG_SNSF_H
14
+#define XSFCONFIG_SNSF_H
15
+
16
+#include <bitset>
17
+#include "XSFPlayer.h"
18
+#include "XSFConfig.h"
19
+
20
+class XSFConfig_SNSF : public XSFConfig
21
+{
22
+protected:
23
+	static bool /*initSixteenBitSound, */initReverseStereo;
24
+	static unsigned initResampler;
25
+	static std::wstring initMutes;
26
+
27
+	friend class XSFConfig;
28
+	bool /*sixteenBitSound, */reverseStereo;
29
+	std::bitset<8> mutes;
30
+
31
+	XSFConfig_SNSF();
32
+	void LoadSpecificConfig();
33
+	void SaveSpecificConfig();
34
+	void GenerateSpecificDialogs();
35
+	INT_PTR CALLBACK ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
36
+	void ResetSpecificConfigDefaults(HWND hwndDlg);
37
+	void SaveSpecificConfigDialog(HWND hwndDlg);
38
+	void CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad);
39
+public:
40
+	unsigned resampler;
41
+
42
+	void About(HWND parent);
43
+};
44
+
45
+#endif