mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 23:10:33 +02:00
It has done nothing since 2017. iCade input came through iCadeReaderView,
a hidden UIKeyInput view that decoded the controller's keystrokes, and
f0ba66fcd6 ("add support for smart keyboard") commented out the code
that created it. Nothing has made one since, so the view controller's
iCadeEventDelegate methods and the ICadeTracker behind them were never
called.
iCade controllers present themselves to iOS as Bluetooth keyboards, so
their keys still arrive as hardware keyboard presses, which can be
mapped like any other keys. Modern controllers go through
GameController.framework anyway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.0 KiB
Objective-C
33 lines
1.0 KiB
Objective-C
#pragma once
|
|
|
|
#include <string_view>
|
|
|
|
#import <GameController/GameController.h>
|
|
#import <CoreMotion/CoreMotion.h>
|
|
|
|
#include "Common/Input/InputState.h"
|
|
|
|
// Code extracted from ViewController.mm, in order to modularize
|
|
// and share it between multiple view controllers.
|
|
|
|
bool InitController(GCController *controller);
|
|
void ShutdownController(GCController *controller);
|
|
|
|
struct TouchTracker {
|
|
public:
|
|
void Began(NSSet *touches, UIView *view);
|
|
void Moved(NSSet *touches, UIView *view);
|
|
void Ended(NSSet *touches, UIView *view);
|
|
void Cancelled(NSSet *touches, UIView *view);
|
|
private:
|
|
void SendTouchEvent(CGPoint point, UIView *view, int code, int pointerId);
|
|
int ToTouchID(UITouch *uiTouch, bool allowAllocate);
|
|
UITouch *touches_[10]{};
|
|
};
|
|
|
|
void ProcessAccelerometerData(CMAccelerometerData *accData);
|
|
InputKeyCode HIDUsageToInputKeyCode(UIKeyboardHIDUsage usage);
|
|
|
|
void KeyboardPressesBegan(NSSet<UIPress *> *presses, UIPressesEvent *event);
|
|
void KeyboardPressesEnded(NSSet<UIPress *> *presses, UIPressesEvent *event);
|
|
void SendKeyboardChars(std::string_view str); |