input_driver: Remove input_driver as it is no longer being used

This commit is contained in:
Joel16 2021-12-17 14:13:58 -05:00
parent 3ed739e59e
commit b726b319b3
9 changed files with 3 additions and 88 deletions

View File

@ -32,10 +32,6 @@ jobs:
with:
path: fs_driver/fs_driver.prx
- uses: actions/upload-artifact@v2
with:
path: input_driver/input_driver.prx
- uses: actions/upload-artifact@v2
with:
path: app/EBOOT.PBP

View File

@ -1,4 +1,4 @@
SUBDIRS = audio_driver display_driver fs_driver input_driver app launcher
SUBDIRS = audio_driver display_driver fs_driver app launcher
all:
@for dir in $(SUBDIRS); do $(MAKE) -C $$dir; done

View File

@ -34,9 +34,6 @@ extern int pspIoRename(const char *oldname, const char *newname);
extern int pspIoRemoveFile(const char *file);
extern int pspIoDevctl(const char *dev, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
// input_driver functions
extern unsigned int pspGetButtons(void);
#if defined (__cplusplus)
}
#endif

View File

@ -42,8 +42,6 @@ namespace Utils {
int ReadControls(void);
int IsButtonPressed(enum PspCtrlButtons buttons);
int IsButtonHeld(enum PspCtrlButtons buttons);
int IsKButtonPressed(enum PspCtrlButtons buttons);
int IsKButtonHeld(enum PspCtrlButtons buttons);
enum PspCtrlButtons GetEnterButton(void);
enum PspCtrlButtons GetCancelButton(void);
float GetAnalogX(void);

View File

@ -23,6 +23,3 @@ int pspIoGetstat(const char *file, SceIoStat *stat);
int pspIoRename(const char *oldname, const char *newname);
int pspIoRemoveFile(const char *file);
int pspIoDevctl(const char *dev, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
// input_driver functions
unsigned int pspGetButtons(void);

View File

@ -25,7 +25,7 @@ namespace Utils {
constexpr unsigned int CTRL_DEADZONE_DELAY = 500000;
constexpr unsigned int CTRL_DELAY = 100000;
static SceCtrlData pad, kernel_pad, prev_pad;
static SceCtrlData pad, prev_pad;
static unsigned int last_button = 0;
static int last_button_tick = 0, deadzone_tick = 0;
static bool usb_module_loaded = false;
@ -39,8 +39,7 @@ namespace Utils {
static std::vector<Module> kernel_modules {
{ "audio_driver.prx", -1, },
{ "display_driver.prx", -1, },
{ "fs_driver.prx", -1, },
{ "input_driver.prx", -1, }
{ "fs_driver.prx", -1, }
};
static std::vector<Module> usb_modules {
@ -385,7 +384,6 @@ namespace Utils {
int ReadControls(void) {
prev_pad = pad;
kernel_pad.Buttons = pspGetButtons();
sceCtrlReadBufferPositive(&pad, 1);
if (pad.Buttons == last_button) {
@ -412,14 +410,6 @@ namespace Utils {
return pad.Buttons & buttons;
}
int IsKButtonPressed(enum PspCtrlButtons buttons) {
return ((kernel_pad.Buttons & buttons) == buttons) && ((prev_pad.Buttons & buttons) != buttons);
}
int IsKButtonHeld(enum PspCtrlButtons buttons) {
return kernel_pad.Buttons & buttons;
}
enum PspCtrlButtons GetEnterButton(void) {
int ret = 0, button = -1;

View File

@ -1,26 +0,0 @@
TARGET = input_driver
OBJS = input_driver.o exports.o
PRX_EXPORTS = exports.exp
# Use the kernel's small inbuilt libc
USE_KERNEL_LIBC = 1
# Use only kernel libraries
USE_KERNEL_LIBS = 1
INCDIR =
CFLAGS = -Os -G0 -Wall -fno-builtin-printf
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS = -nostartfiles
LIBS =
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak
all:
psp-build-exports -s $(PRX_EXPORTS)
mv input_driver.S "../app/drivers/"

View File

@ -1,16 +0,0 @@
# Define the exports for the prx
PSP_BEGIN_EXPORTS
# These four lines are mandatory (although you can add other functions like module_stop)
# syslib is a psynonym for the single mandatory export.
PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC(module_start)
PSP_EXPORT_FUNC(module_stop)
PSP_EXPORT_VAR(module_info)
PSP_EXPORT_END
PSP_EXPORT_START(input_driver, 0, 0x4001)
PSP_EXPORT_FUNC(pspGetButtons)
PSP_EXPORT_END
PSP_END_EXPORTS

View File

@ -1,21 +0,0 @@
#include <pspsdk.h>
#include <pspctrl.h>
PSP_MODULE_INFO("input_driver", PSP_MODULE_KERNEL, 1, 1);
PSP_NO_CREATE_MAIN_THREAD();
unsigned int pspGetButtons(void) {
u32 k1 = pspSdkSetK1(0);
SceCtrlData pad;
sceCtrlPeekBufferPositive(&pad, 1);
pspSdkSetK1(k1);
return pad.Buttons;
}
int module_start(SceSize args, void *argp) {
return 0;
}
int module_stop(void) {
return 0;
}