summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wii_frame.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-25 03:38:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-25 03:54:09 +0200
commit25b7bf6a9750f92bd75850740002d32dcf08470e (patch)
tree314e994452a3b56af7b9a9d7465e9f8c92cad791 /tracker-wii/wii_frame.cpp
parent0a1a0e9df00f37a210b67a11cf8f99550cafeeaf (diff)
tracker/wii: fix for mingw-w64
The module loses auto-pairing functionality, but it's at least useful to see GCC warnings. I don't intend to use GCC for actually running the module. Fix some warnings emitted by GCC, such as - memset(3) of non-POD struct - depending on "new T[0]" to return a null pointer - dependence on MSVC-specific pragmas for external libraries - lack of header guards - unintended usage of trigraph syntax Disable some GCC warnings for the "wiiyourself" library. It's not possible to patch it up, the code quality is that awful. Disable the builtin debug functionality since it depends on non-standard __VA_OPT__ (due in C++20). It's not possible to disable the warning emitted on the __VA_ARGS__ usage in GCC.
Diffstat (limited to 'tracker-wii/wii_frame.cpp')
-rw-r--r--tracker-wii/wii_frame.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/tracker-wii/wii_frame.cpp b/tracker-wii/wii_frame.cpp
index df7b9ca4..432b1f18 100644
--- a/tracker-wii/wii_frame.cpp
+++ b/tracker-wii/wii_frame.cpp
@@ -49,14 +49,18 @@ WIIPreview::WIIPreview(int w, int h)
QImage WIIPreview::get_bitmap()
{
- switch (status) {
- case wii_cam_wait_for_dongle:
- return QImage(":/Resources/usb.png");
- case wii_cam_wait_for_sync:
- return QImage(":/Resources/sync.png");
- case wii_cam_wait_for_connect:
- return QImage(":/Resources/on.png");
- }
+ switch (status) {
+ case wii_cam_wait_for_dongle:
+ return QImage(":/Resources/usb.png");
+ case wii_cam_wait_for_sync:
+ return QImage(":/Resources/sync.png");
+ case wii_cam_wait_for_connect:
+ return QImage(":/Resources/on.png");
+ case wii_cam_data_change:
+ case wii_cam_data_no_change:
+ break;
+ }
+
int stride = frame_out.step.p[0];
if (stride < 64 || stride < frame_out.cols * 4)