Giter Club home page Giter Club logo

Comments (3)

NeilAgar avatar NeilAgar commented on September 26, 2024

I'm not able to make the C code myself as troubleshooting the environment settings would take me hours, but I believe all that needs to be modified is wii_controller.cpp. The else statement on line 180 could be changed to the following to turn the d-pad into the r-stick without choice:

else {
            m_buttons.A = buttons->A;
            m_buttons.B = buttons->B;

            if ((m_extension == WiiExtensionController_ClassicPro) || (m_extension == WiiExtensionController_MotionPlusClassicControllerPassthrough)) {
                // Allow buttons one and two to be used for L3/R3 when Classic or Classic Pro controller connected
                m_buttons.lstick_press = buttons->one;
                m_buttons.rstick_press = buttons->two;

                m_buttons.dpad_down  = buttons->dpad_down;
                m_buttons.dpad_up    = buttons->dpad_up;
                m_buttons.dpad_right = buttons->dpad_right;
                m_buttons.dpad_left  = buttons->dpad_left;
            } else {
                // Not the best mapping but at least most buttons are mapped to something when nunchuck is connected.
                m_buttons.R  = buttons->one;
                m_buttons.ZR = buttons->two;

                m_right_stick.SetData(
                    dpad_stick_positions[1 + buttons->dpad_right - buttons->dpad_left],
                    dpad_stick_positions[1 + buttons->dpad_down - buttons->dpad_up]
                );
            }

            m_buttons.minus = buttons->minus;
            m_buttons.plus  = buttons->plus;

            m_buttons.home = buttons->home;
        }

This code just changes the dpad buttons to be set depending on the extension that is connected. This else statement is already contained within a section of code that knows that there is an extension connected to the WiiMote. If the extension is not the nunchuck, it sets the d-pad as normal. If it IS the nunchuck, then it sets the r-stick to the d-pad buttons.

I've also attached a file of the changed cpp if that would be preferable. Would it be possible to send a compiled version of the project with this changed file?

Thank you

from missioncontrol.

Banz99 avatar Banz99 commented on September 26, 2024

Hey, I've compiled it for you (based on the changed cpp):
MissionControl-0.9.2-rsticknunchuck-fe31665.zip

Anyway, I was discussing with ndeadly about a more customizable way to handle different mappings based on controller extensions plugged. That might end up mattering just for the wiimote, but we're trying to figure out what the best course of action for this is.

from missioncontrol.

NeilAgar avatar NeilAgar commented on September 26, 2024

Thank you so much!

Yeah, I found that a lot of games required control schemes that the default switch mapper wasn't flexible enough to handle. A built-in homebrew applet or config editable mapper would be much appreciated for situations like this - I'll let you know if this build works.

from missioncontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.