Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiimoteReal: use inheritance instead of #ifdef #1596

Merged
merged 4 commits into from Dec 7, 2014

Conversation

Tilka
Copy link
Member

@Tilka Tilka commented Nov 27, 2014

The OS X implementation doesn't compile yet. Could someone familiar with Objective C please help me find a good way to solve this, @comex maybe? My primitive solution would be making the class variables public and casting the objects from the g_wiimotes list to WiimoteDarwin but I'm sure this can be done more elegantly.

@comex
Copy link
Contributor

comex commented Nov 27, 2014

Probably easiest/nicest to have an unordered_map<IOBluetoothDevice*, WiimoteDarwin*>

@lioncash
Copy link
Member

Shouldn't override be added to the inheriting class functions? This way you can drop the virtual

@comex
Copy link
Contributor

comex commented Nov 27, 2014

Or maybe that would be overkill. Just casting should be fine, really, but the members should have m_.

Other people might say that there should be a getter, but they should die in a fire.

@Tilka
Copy link
Member Author

Tilka commented Nov 27, 2014

Addressed comments.

@@ -26,8 +26,7 @@ class Wiimote : NonCopyable
{
friend class WiimoteEmu::Wiimote;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@degasus
Copy link
Member

degasus commented Nov 27, 2014

LGTM but the osx part. I have no clue what we're doing there :D

@PatrickFerry
Copy link
Contributor

@comex Haters gonna hate. What's so bad about getters?

class WiimoteWindows : public Wiimote
{
public:
WiimoteWindows(std::basic_string<TCHAR> path);

This comment was marked as off-topic.

@Tilka Tilka force-pushed the wiimote branch 3 times, most recently from 9955d97 to 74add95 Compare December 4, 2014 14:16
@Tilka
Copy link
Member Author

Tilka commented Dec 4, 2014

Rebased. Derived destructors need to call Shutdown() now because it calls virtual methods. Is this acceptable?

@Tilka
Copy link
Member Author

Tilka commented Dec 4, 2014

Split into separate commits. This should make reviewing much easier.

@Tilka Tilka changed the title [WIP] Wiimote: use inheritance instead of #ifdef WiimoteReal: use inheritance instead of #ifdef Dec 4, 2014
Sonicadvance1 added a commit that referenced this pull request Dec 7, 2014
WiimoteReal: use inheritance instead of #ifdef
@Sonicadvance1 Sonicadvance1 merged commit dec2f9f into dolphin-emu:master Dec 7, 2014
@Tilka Tilka deleted the wiimote branch December 7, 2014 16:33
@d112570
Copy link

d112570 commented Jan 19, 2015

After this update (4508) wii modes does not work correctly on the MacOsX (10.9.5). If you connect 1 Wiimode it works flawlessly, if you add another Wiimode, Wiimode 1 Freezes, Wiimode 2 Works. If you disconnect Wiimode 2, Wiimode 1 will unfreeze. Can you undo this update? Dolphin 4508 and up now only work with one Wiimode, Dolphin 4503 and below all work with 2 or more Wiimode. On MacOsX Yosemite (10.10.x) Wiimodes no longer work for any version, so don't update to MacOsX 10.10 until this is resolved.

@magumagu
Copy link
Contributor

Please file a bug in the issue tracker (http://code.google.com/p/dolphin-emu/issues/list); comments on already-merged PRs are not a good way to track issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants