Project

General

Profile

Actions

Emulator Issues #2261

closed

Connecting multiple wiimote

Added by mlkbouba almost 15 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
Yes
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

by default a single connecting wiimote with dolphin

// Activate only first Wiimote by default
m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, 0, true));

I want to do is read that dolphin Wiimote.ini file
and gives the info file WII_IPC_HLE_Device_usb.cpp
and active
if all source = 1 or 2

sorry for the translation


Related issues 1 (0 open1 closed)

Has duplicate Emulator - Emulator Issues #2333: Always only wiimote 1 connected on startDuplicate

Actions
Actions #1

Updated by mlkbouba over 14 years ago

an function waiting to add
Enable numbre the Wiimote default
through the wiimote plugin if the source and 1 and 2
more needs to press the Alt + F6

Index: Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp

--- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp (revision 5252)
+++ Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp (working copy)
@@ -22,10 +22,11 @@
#include "../Debugger/Debugger_SymbolMap.h"
#include "../Host.h"
#include "../PluginManager.h"
+#include "IniFile.h"
#include "../HW/WII_IPC.h"
#include "WII_IPC_HLE.h"
#include "WII_IPC_HLE_Device_usb.h"

// The device class
CWII_IPC_HLE_Device_usb_oh1_57e_305::CWII_IPC_HLE_Device_usb_oh1_57e_305(u32
_DeviceID, const std::string& _rDeviceName)
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
@@ -45,11 +46,36 @@
, m_FreqDividerMote(0)
, m_FreqDividerSync(0)
{

  • // Activate only first Wiimote by default
  • IniFile ini;

  • ini.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "Wiimote.ini").c_str());

  • for (int i = 0; i < 4; i++)

  • {

  •   char SectionName[32];
    
  •   sprintf(SectionName, "Wiimote%i", i + 1);
    
  •   int m_source[4];
    
  •   ini.Get(SectionName, "Source", &m_source[i], (i == 0) ? 1 : 0);
    
  •   	switch(m_source[i])
    
  •   	{
    
  •   	case 2:
    
  •   		//ERROR_LOG(WII_IPC_HLE, "Source 2: %i", m_source[i]);
    
  •   		m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, i, true));
    
  •   		break;
    
  •   	case 1:
    
  •   		//ERROR_LOG(WII_IPC_HLE, "Source 1: %i", m_source[i]);
    
  •   		m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, i, true));
    
  •   		break;
    
  •   	case 0:
    
  •   		//ERROR_LOG(WII_IPC_HLE, "Source 0: %i", m_source[i]);
    
  •   		m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, i, false));
    
  •   		break;
    
  •   	}
    
  • }

  • /*
    m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, 0, true));
    m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, 1));
    m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, 2));
    m_WiiMotes.push_back(CWII_IPC_HLE_WiiMote(this, 3));

  • */

    // The BCM2045's btaddr:
    m_ControllerBD.b[0] = 0x11;

Actions #2

Updated by Billiard26 over 14 years ago

  • Status changed from New to Questionable
  • Relates to usability set to Yes

I'm not going to commit this patch. It looks like just a big hack. IniFile loading
doesn't belong in there. But, I will try to fix the issue properly after talking with
the devs a bit. :)

Actions #3

Updated by Billiard26 over 14 years ago

Issue 2333 has been merged into this issue.

Actions #4

Updated by Anonymous about 14 years ago

Doesn't this just save the selection of which wiimotes are connected?
the patch looks a bit ugly, but the functionality seems ok-ish.

Actions #5

Updated by Billiard26 almost 14 years ago

  • Status changed from Questionable to Fixed

This issue was closed by revision r6679.

Actions

Also available in: Atom PDF