| 
									
										
										
										
											2009-03-28 08:57:34 +00:00
										 |  |  | // Copyright (C) 2003-2009 Dolphin Project.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // This program is free software: you can redistribute it and/or modify
 | 
					
						
							|  |  |  | // it under the terms of the GNU General Public License as published by
 | 
					
						
							|  |  |  | // the Free Software Foundation, version 2.0.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // This program is distributed in the hope that it will be useful,
 | 
					
						
							|  |  |  | // but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					
						
							|  |  |  | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					
						
							|  |  |  | // GNU General Public License 2.0 for more details.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // A copy of the GPL 2.0 should have been included with the program.
 | 
					
						
							|  |  |  | // If not, see http://www.gnu.org/licenses/
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Official SVN repository and contact information can be found at
 | 
					
						
							|  |  |  | // http://code.google.com/p/dolphin-emu/
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-15 06:48:15 +00:00
										 |  |  | #include "PluginWiimote.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Common { | 
					
						
							| 
									
										
										
										
											2009-02-21 12:07:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | PluginWiimote::PluginWiimote(const char *_Filename) | 
					
						
							|  |  |  | 	: CPlugin(_Filename), validWiimote(false) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2009-01-15 06:48:15 +00:00
										 |  |  | 	Wiimote_ControlChannel = reinterpret_cast<TWiimote_Output>    | 
					
						
							| 
									
										
										
										
											2009-02-21 12:07:03 +00:00
										 |  |  | 		(LoadSymbol("Wiimote_ControlChannel")); | 
					
						
							| 
									
										
										
										
											2009-01-15 06:48:15 +00:00
										 |  |  | 	Wiimote_InterruptChannel = reinterpret_cast<TWiimote_Input> | 
					
						
							| 
									
										
										
										
											2009-02-21 12:07:03 +00:00
										 |  |  | 		(LoadSymbol("Wiimote_InterruptChannel")); | 
					
						
							| 
									
										
										
										
											2009-01-15 06:48:15 +00:00
										 |  |  | 	Wiimote_Update = reinterpret_cast<TWiimote_Update> | 
					
						
							| 
									
										
										
										
											2009-02-21 12:07:03 +00:00
										 |  |  | 		(LoadSymbol("Wiimote_Update")); | 
					
						
							| 
									
										
										
										
											2009-01-15 06:48:15 +00:00
										 |  |  | 	Wiimote_GetAttachedControllers = reinterpret_cast<TWiimote_GetAttachedControllers> | 
					
						
							| 
									
										
										
										
											2009-02-21 12:07:03 +00:00
										 |  |  | 		(LoadSymbol("Wiimote_GetAttachedControllers")); | 
					
						
							| 
									
										
										
										
											2009-01-15 06:48:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	if ((Wiimote_ControlChannel != 0) && | 
					
						
							| 
									
										
										
										
											2009-02-21 12:07:03 +00:00
										 |  |  | 		(Wiimote_InterruptChannel != 0) && | 
					
						
							|  |  |  | 		(Wiimote_Update != 0) && | 
					
						
							|  |  |  | 		(Wiimote_GetAttachedControllers != 0)) | 
					
						
							|  |  |  | 		validWiimote = true; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-28 08:57:34 +00:00
										 |  |  | PluginWiimote::~PluginWiimote() { } | 
					
						
							| 
									
										
										
										
											2009-01-15 06:48:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-28 08:57:34 +00:00
										 |  |  | } // Namespace
 |