mirror of
https://github.com/OpenEmu/PCSX2-Core.git
synced 2025-11-01 11:07:36 +00:00
Minor clean-up.
This commit is contained in:
+27
-27
@@ -25,38 +25,38 @@
|
||||
#ifndef keymap_h
|
||||
#define keymap_h
|
||||
|
||||
#include "PAD/Host/Global.h"
|
||||
#include "SIO/Pad/PadDualshock2.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gamePadValues ps2key;
|
||||
PadDualshock2::Inputs ps2key;
|
||||
}keymap;
|
||||
|
||||
keymap ps2keymap[25]={
|
||||
{PAD_UP}, // OEPS2ButtonUp,
|
||||
{PAD_DOWN}, // OEPS2ButtonDown,
|
||||
{PAD_LEFT}, // OEPS2ButtonLeft,
|
||||
{PAD_RIGHT}, // OEPS2ButtonRight,
|
||||
{PAD_TRIANGLE}, // OEPS2ButtonTriangle,
|
||||
{PAD_CIRCLE}, // OEPS2ButtonCircle,
|
||||
{PAD_CROSS}, // OEPS2ButtonCross,
|
||||
{PAD_SQUARE}, // OEPS2ButtonSquare,
|
||||
{PAD_L1}, // OEPS2ButtonL1,
|
||||
{PAD_L2}, // OEPS2ButtonL2,
|
||||
{PAD_L3}, // OEPS2ButtonL3,
|
||||
{PAD_R1}, // OEPS2ButtonR1,
|
||||
{PAD_R2}, // OEPS2ButtonR2,
|
||||
{PAD_R3}, // OEPS2ButtonR3,
|
||||
{PAD_START}, // OEPS2ButtonStart,
|
||||
{PAD_SELECT}, // OEPS2ButtonSelect,
|
||||
{}, // OEPS2ButtonAnalogMode,
|
||||
{PAD_L_UP}, // OEPS2LeftAnalogUp,
|
||||
{PAD_L_DOWN}, // OEPS2LeftAnalogDown,
|
||||
{PAD_L_LEFT}, // OEPS2LeftAnalogLeft,
|
||||
{PAD_L_RIGHT}, // OEPS2LeftAnalogRight,
|
||||
{PAD_R_UP}, // OEPS2RightAnalogUp,
|
||||
{PAD_R_DOWN}, // OEPS2RightAnalogDown,
|
||||
{PAD_R_LEFT}, // OEPS2RightAnalogLeft,
|
||||
{PAD_R_RIGHT}, // OEPS2RightAnalogRight
|
||||
{PadDualshock2::PAD_UP}, // OEPS2ButtonUp,
|
||||
{PadDualshock2::PAD_DOWN}, // OEPS2ButtonDown,
|
||||
{PadDualshock2::PAD_LEFT}, // OEPS2ButtonLeft,
|
||||
{PadDualshock2::PAD_RIGHT}, // OEPS2ButtonRight,
|
||||
{PadDualshock2::PAD_TRIANGLE}, // OEPS2ButtonTriangle,
|
||||
{PadDualshock2::PAD_CIRCLE}, // OEPS2ButtonCircle,
|
||||
{PadDualshock2::PAD_CROSS}, // OEPS2ButtonCross,
|
||||
{PadDualshock2::PAD_SQUARE}, // OEPS2ButtonSquare,
|
||||
{PadDualshock2::PAD_L1}, // OEPS2ButtonL1,
|
||||
{PadDualshock2::PAD_L2}, // OEPS2ButtonL2,
|
||||
{PadDualshock2::PAD_L3}, // OEPS2ButtonL3,
|
||||
{PadDualshock2::PAD_R1}, // OEPS2ButtonR1,
|
||||
{PadDualshock2::PAD_R2}, // OEPS2ButtonR2,
|
||||
{PadDualshock2::PAD_R3}, // OEPS2ButtonR3,
|
||||
{PadDualshock2::PAD_START}, // OEPS2ButtonStart,
|
||||
{PadDualshock2::PAD_SELECT}, // OEPS2ButtonSelect,
|
||||
{PadDualshock2::PAD_ANALOG}, // OEPS2ButtonAnalogMode,
|
||||
{PadDualshock2::PAD_L_UP}, // OEPS2LeftAnalogUp,
|
||||
{PadDualshock2::PAD_L_DOWN}, // OEPS2LeftAnalogDown,
|
||||
{PadDualshock2::PAD_L_LEFT}, // OEPS2LeftAnalogLeft,
|
||||
{PadDualshock2::PAD_L_RIGHT}, // OEPS2LeftAnalogRight,
|
||||
{PadDualshock2::PAD_R_UP}, // OEPS2RightAnalogUp,
|
||||
{PadDualshock2::PAD_R_DOWN}, // OEPS2RightAnalogDown,
|
||||
{PadDualshock2::PAD_R_LEFT}, // OEPS2RightAnalogLeft,
|
||||
{PadDualshock2::PAD_R_RIGHT}, // OEPS2RightAnalogRight
|
||||
};
|
||||
#endif /* keymap_h */
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#import "PCSX2GameCore.h"
|
||||
#import <OpenEmuBase/OETimingUtils.h>
|
||||
#import <OpenEmuBase/OERingBuffer.h>
|
||||
#include "Video/OEHostDisplay.h"
|
||||
#include "Audio/OESndOut.h"
|
||||
#include "Input/keymap.h"
|
||||
|
||||
#define BOOL PCSX2BOOL
|
||||
#include "PrecompiledHeader.h"
|
||||
@@ -296,11 +296,6 @@ static NSURL *binCueFix(NSURL *path)
|
||||
params.fullscreen = false;
|
||||
|
||||
if(!hasInitialized){
|
||||
// if (self.gameCoreRendering == OEGameCoreRenderingOpenGL3Video)
|
||||
// g_host_display = HostDisplay::CreateForAPI(RenderAPI::OpenGL);
|
||||
// else if (self.gameCoreRendering == OEGameCoreRenderingMetal2Video)
|
||||
// g_host_display = HostDisplay::CreateForAPI(RenderAPI::Metal);
|
||||
|
||||
VMManager::Internal::CPUThreadInitialize();
|
||||
|
||||
VMManager::ApplySettings();
|
||||
@@ -358,7 +353,6 @@ static NSURL *binCueFix(NSURL *path)
|
||||
{
|
||||
ExitRequested = true;
|
||||
VMManager::SetState(VMState::Stopping);
|
||||
// VMManager::Shutdown(true);
|
||||
[super stopEmulation];
|
||||
}
|
||||
|
||||
@@ -451,40 +445,6 @@ static PadDualshock2* getPadToDualShock(const NSUInteger player)
|
||||
return pad2;
|
||||
}
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PadDualshock2::Inputs ps2key;
|
||||
}keymap;
|
||||
|
||||
static const keymap ps2keymap[25]={
|
||||
{PadDualshock2::PAD_UP}, // OEPS2ButtonUp,
|
||||
{PadDualshock2::PAD_DOWN}, // OEPS2ButtonDown,
|
||||
{PadDualshock2::PAD_LEFT}, // OEPS2ButtonLeft,
|
||||
{PadDualshock2::PAD_RIGHT}, // OEPS2ButtonRight,
|
||||
{PadDualshock2::PAD_TRIANGLE}, // OEPS2ButtonTriangle,
|
||||
{PadDualshock2::PAD_CIRCLE}, // OEPS2ButtonCircle,
|
||||
{PadDualshock2::PAD_CROSS}, // OEPS2ButtonCross,
|
||||
{PadDualshock2::PAD_SQUARE}, // OEPS2ButtonSquare,
|
||||
{PadDualshock2::PAD_L1}, // OEPS2ButtonL1,
|
||||
{PadDualshock2::PAD_L2}, // OEPS2ButtonL2,
|
||||
{PadDualshock2::PAD_L3}, // OEPS2ButtonL3,
|
||||
{PadDualshock2::PAD_R1}, // OEPS2ButtonR1,
|
||||
{PadDualshock2::PAD_R2}, // OEPS2ButtonR2,
|
||||
{PadDualshock2::PAD_R3}, // OEPS2ButtonR3,
|
||||
{PadDualshock2::PAD_START}, // OEPS2ButtonStart,
|
||||
{PadDualshock2::PAD_SELECT}, // OEPS2ButtonSelect,
|
||||
{PadDualshock2::PAD_ANALOG}, // OEPS2ButtonAnalogMode,
|
||||
{PadDualshock2::PAD_L_UP}, // OEPS2LeftAnalogUp,
|
||||
{PadDualshock2::PAD_L_DOWN}, // OEPS2LeftAnalogDown,
|
||||
{PadDualshock2::PAD_L_LEFT}, // OEPS2LeftAnalogLeft,
|
||||
{PadDualshock2::PAD_L_RIGHT}, // OEPS2LeftAnalogRight,
|
||||
{PadDualshock2::PAD_R_UP}, // OEPS2RightAnalogUp,
|
||||
{PadDualshock2::PAD_R_DOWN}, // OEPS2RightAnalogDown,
|
||||
{PadDualshock2::PAD_R_LEFT}, // OEPS2RightAnalogLeft,
|
||||
{PadDualshock2::PAD_R_RIGHT}, // OEPS2RightAnalogRight
|
||||
};
|
||||
|
||||
- (oneway void)didMovePS2JoystickDirection:(OEPS2Button)button withValue:(CGFloat)value forPlayer:(NSUInteger)player
|
||||
{
|
||||
auto pad = getPadToDualShock(player);
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright (c) 2022, OpenEmu Team
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the OpenEmu Team nor the
|
||||
// names of its contributors may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY OpenEmu Team ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL OpenEmu Team BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef OEHostDisplay_h
|
||||
#define OEHostDisplay_h
|
||||
|
||||
namespace Host {
|
||||
int PresentFrameBuffer();
|
||||
} // namespace Host
|
||||
|
||||
|
||||
|
||||
#endif /* OEHostDisplay_h */
|
||||
@@ -3027,7 +3027,6 @@
|
||||
DD03FFBF27B70F0C0006ABDC /* GSDeviceMTL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GSDeviceMTL.h; sourceTree = "<group>"; };
|
||||
DD03FFC127B70F0C0006ABDC /* convert.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = convert.metal; sourceTree = "<group>"; };
|
||||
DD1134E827CBCE8900C2E60B /* SaveState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SaveState.cpp; sourceTree = "<group>"; };
|
||||
DD5D197D27D708A900ED83D9 /* OEHostDisplay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OEHostDisplay.h; sourceTree = "<group>"; };
|
||||
DD75EE5E29898A3A0056B3BA /* GSMTLDeviceInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GSMTLDeviceInfo.mm; sourceTree = "<group>"; };
|
||||
DDE1B431298C68320028DF05 /* usb-printer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "usb-printer.h"; sourceTree = "<group>"; };
|
||||
DDE1B432298C68320028DF05 /* usb-printer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "usb-printer.cpp"; sourceTree = "<group>"; };
|
||||
@@ -6673,7 +6672,6 @@
|
||||
55325A082A01025600D4CFFA /* GSDeviceOGL.cpp */,
|
||||
55484D3C28855E740066EDEB /* GSDumpReplayer.cpp */,
|
||||
DD75EE5E29898A3A0056B3BA /* GSMTLDeviceInfo.mm */,
|
||||
DD5D197D27D708A900ED83D9 /* OEHostDisplay.h */,
|
||||
);
|
||||
path = Video;
|
||||
sourceTree = "<group>";
|
||||
|
||||
Reference in New Issue
Block a user