mirror of https://github.com/snes9xgit/snes9x.git
Qt: Implement Swap Controller 1 & 2
This commit is contained in:
parent
98cac16b46
commit
582128bce7
|
@ -361,6 +361,15 @@ void EmuApplication::handleBinding(std::string name, bool pressed)
|
|||
{
|
||||
loadState(save_slot);
|
||||
}
|
||||
else if (name == "SwapControllers1and2")
|
||||
{
|
||||
int num_bindings = EmuConfig::num_controller_bindings * EmuConfig::allowed_bindings;
|
||||
EmuBinding temp[num_bindings];
|
||||
memcpy(temp, config->binding.controller[0].buttons, sizeof(temp));
|
||||
memcpy(config->binding.controller[0].buttons, config->binding.controller[1].buttons, sizeof(temp));
|
||||
memcpy(config->binding.controller[1].buttons, temp, sizeof(temp));
|
||||
updateBindings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
#include "Snes9xController.hpp"
|
||||
#include "EmuConfig.hpp"
|
||||
#include "SoftwareScalers.hpp"
|
||||
#include <memory>
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
#include "srtc.h"
|
||||
#include "apu/apu.h"
|
||||
#include "apu/bapu/snes/snes.hpp"
|
||||
#include "gfx.h"
|
||||
#include "snapshot.h"
|
||||
#include "controls.h"
|
||||
|
|
Loading…
Reference in New Issue