mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Merge pull request #5385 from RobLoach/patch-17
Remove include of input_config.h
This commit is contained in:
commit
d142a1c849
@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
@ -32,7 +32,7 @@
|
||||
#include "../../dynamic.h"
|
||||
#include "../../core.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../input/input_config.h"
|
||||
#include "../../input/input_driver.h"
|
||||
|
||||
static PyObject* py_read_wram(PyObject *self, PyObject *args)
|
||||
{
|
||||
@ -79,7 +79,7 @@ static PyObject* py_read_vram(PyObject *self, PyObject *args)
|
||||
mem_info.id = RETRO_MEMORY_VIDEO_RAM;
|
||||
|
||||
core_get_memory(&mem_info);
|
||||
|
||||
|
||||
data = (const uint8_t*)mem_info.data;
|
||||
|
||||
(void)self;
|
||||
@ -112,10 +112,10 @@ static PyObject *py_read_input(PyObject *self, PyObject *args)
|
||||
const struct retro_keybind *py_binds[MAX_USERS];
|
||||
int16_t res = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
py_binds[i] = input_config_binds[i];
|
||||
|
||||
|
||||
(void)self;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "II", &user, &key))
|
||||
@ -156,7 +156,7 @@ static PyObject *py_read_analog(PyObject *self, PyObject *args)
|
||||
joypad_info.joy_idx = settings->uints.input_joypad_map[user - 1];
|
||||
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
|
||||
|
||||
res = current_input->input_state(current_input_data,
|
||||
res = current_input->input_state(current_input_data,
|
||||
joypad_info, py_binds,
|
||||
user - 1, RETRO_DEVICE_ANALOG, index, id);
|
||||
return PyFloat_FromDouble((double)res / 0x7fff);
|
||||
@ -313,7 +313,7 @@ py_state_t *py_state_new(const char *script,
|
||||
{
|
||||
/* Have to hack around the fact that the FILE struct
|
||||
* isn't standardized across environments.
|
||||
* PyRun_SimpleFile() breaks on Windows because it's
|
||||
* PyRun_SimpleFile() breaks on Windows because it's
|
||||
* compiled with MSVC. */
|
||||
ssize_t len;
|
||||
char *script_ = NULL;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2013-2014 - Jason Fetters
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
@ -23,7 +23,6 @@
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "../input_config.h"
|
||||
#include "../input_defines.h"
|
||||
#include "../input_driver.h"
|
||||
|
||||
@ -120,7 +119,7 @@ static uint64_t iohidmanager_hid_joypad_get_buttons(void *data, unsigned port)
|
||||
static bool iohidmanager_hid_joypad_button(void *data,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
uint64_t buttons =
|
||||
uint64_t buttons =
|
||||
iohidmanager_hid_joypad_get_buttons(data, port);
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
|
||||
unsigned hat_dir = GET_HAT_DIR(joykey);
|
||||
@ -149,7 +148,7 @@ static bool iohidmanager_hid_joypad_button(void *data,
|
||||
|
||||
/* Check the button. */
|
||||
if ((port < MAX_USERS) && (joykey < 32))
|
||||
return ((buttons & (1 << joykey)) != 0)
|
||||
return ((buttons & (1 << joykey)) != 0)
|
||||
|| ((hid->buttons[port] & (1 << joykey)) != 0);
|
||||
return false;
|
||||
}
|
||||
@ -197,7 +196,7 @@ static int16_t iohidmanager_hid_joypad_axis(void *data,
|
||||
static void iohidmanager_hid_device_send_control(void *data,
|
||||
uint8_t* data_buf, size_t size)
|
||||
{
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
(struct iohidmanager_hid_adapter*)data;
|
||||
|
||||
if (adapter)
|
||||
@ -210,7 +209,7 @@ static void iohidmanager_hid_device_report(void *data,
|
||||
IOHIDReportType type, uint32_t reportID, uint8_t *report,
|
||||
CFIndex reportLength)
|
||||
{
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
(struct iohidmanager_hid_adapter*)data;
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)hid_driver_get_data();
|
||||
|
||||
@ -227,7 +226,7 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result,
|
||||
{
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)
|
||||
hid_driver_get_data();
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
(struct iohidmanager_hid_adapter*)data;
|
||||
IOHIDElementRef element = IOHIDValueGetElement(value);
|
||||
uint32_t type = (uint32_t)IOHIDElementGetType(element);
|
||||
@ -366,7 +365,7 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result,
|
||||
static void iohidmanager_hid_device_remove(void *data,
|
||||
IOReturn result, void* sender)
|
||||
{
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
(struct iohidmanager_hid_adapter*)data;
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)
|
||||
hid_driver_get_data();
|
||||
@ -380,7 +379,7 @@ static void iohidmanager_hid_device_remove(void *data,
|
||||
|
||||
pad_connection_pad_deinit(&hid->slots[adapter->slot], adapter->slot);
|
||||
}
|
||||
|
||||
|
||||
if (adapter)
|
||||
{
|
||||
apple_input_rec_t* tmp = NULL;
|
||||
@ -490,7 +489,7 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result,
|
||||
/* Move the device's run loop to this thread. */
|
||||
IOHIDDeviceScheduleWithRunLoop(device, CFRunLoopGetCurrent(),
|
||||
kCFRunLoopCommonModes);
|
||||
IOHIDDeviceRegisterRemovalCallback(device,
|
||||
IOHIDDeviceRegisterRemovalCallback(device,
|
||||
iohidmanager_hid_device_remove, adapter);
|
||||
|
||||
#ifndef IOS
|
||||
@ -502,7 +501,7 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result,
|
||||
dev_pid = iohidmanager_hid_device_get_product_id (device);
|
||||
|
||||
adapter->slot = pad_connection_pad_init(hid->slots,
|
||||
adapter->name, dev_vid, dev_pid, adapter,
|
||||
adapter->name, dev_vid, dev_pid, adapter,
|
||||
&iohidmanager_hid_device_send_control);
|
||||
|
||||
if (adapter->slot == -1)
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "../connect/joypad_connection.h"
|
||||
#include "../input_defines.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_config.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <gccore.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../input_config.h"
|
||||
#include "../input_defines.h"
|
||||
#include "../input_driver.h"
|
||||
|
||||
@ -44,7 +43,7 @@ typedef struct wiiusb_hid
|
||||
/* helps on knowing if a new device has been inserted */
|
||||
bool device_detected;
|
||||
/* helps on detecting that a device has just been removed */
|
||||
bool removal_cb;
|
||||
bool removal_cb;
|
||||
|
||||
bool manual_removal;
|
||||
} wiiusb_hid_t;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2013-2014 - Jason Fetters
|
||||
*
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
@ -21,7 +21,6 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../input_config.h"
|
||||
#include "../input_keymaps.h"
|
||||
#include "../input_driver.h"
|
||||
|
||||
|
@ -36,7 +36,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <stdint.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include "../input_config.h"
|
||||
|
||||
#ifndef MAX_KEYS
|
||||
#define MAX_KEYS 256
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (C) 2013-2014 - Jason Fetters
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2015 - Jay McCarthy
|
||||
*
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
@ -25,7 +25,7 @@
|
||||
#include <queues/task_queue.h>
|
||||
|
||||
#include "cocoa_common.h"
|
||||
#include "../../../input/input_config.h"
|
||||
#include "../../../input/input_driver.h"
|
||||
#include "../../../input/input_keymaps.h"
|
||||
#include "../../../input/drivers/cocoa_input.h"
|
||||
|
||||
@ -75,15 +75,15 @@ static void RunActionSheet(const char* title, const struct string_list* items,
|
||||
|
||||
actionSheet.title = BOXSTRING(title);
|
||||
actionSheet.delegate = delegate;
|
||||
|
||||
|
||||
for (i = 0; i < items->size; i ++)
|
||||
[actionSheet addButtonWithTitle:BOXSTRING(items->elems[i].data)];
|
||||
|
||||
|
||||
actionSheet.cancelButtonIndex = [actionSheet addButtonWithTitle:BOXSTRING("Cancel")];
|
||||
|
||||
|
||||
objc_setAssociatedObject(actionSheet, associated_delegate_key,
|
||||
delegate, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
|
||||
|
||||
[actionSheet showInView:parent];
|
||||
}
|
||||
|
||||
@ -150,10 +150,10 @@ static void RunActionSheet(const char* title, const struct string_list* items,
|
||||
{
|
||||
char label[PATH_MAX_LENGTH];
|
||||
static NSString* const cell_id = @"boolean_setting";
|
||||
|
||||
|
||||
UITableViewCell* result =
|
||||
(UITableViewCell*)[tableView dequeueReusableCellWithIdentifier:cell_id];
|
||||
|
||||
|
||||
if (!result)
|
||||
{
|
||||
result = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1
|
||||
@ -163,7 +163,7 @@ static void RunActionSheet(const char* title, const struct string_list* items,
|
||||
}
|
||||
|
||||
menu_entry_get_path(self.i, label, sizeof(label));
|
||||
|
||||
|
||||
result.textLabel.text = BOXSTRING(label);
|
||||
[(id)result.accessoryView removeTarget:nil
|
||||
action:NULL
|
||||
@ -358,12 +358,12 @@ static void RunActionSheet(const char* title, const struct string_list* items,
|
||||
{
|
||||
unsigned i;
|
||||
bool hasDot = false;
|
||||
|
||||
|
||||
if (partialString.length)
|
||||
for (i = 0; i < partialString.length; i ++)
|
||||
{
|
||||
unichar ch = [partialString characterAtIndex:i];
|
||||
|
||||
|
||||
if (i == 0 && (!self.minimum || self.minimum.intValue < 0) && ch == '-')
|
||||
continue;
|
||||
else if (self.allowsFloats && !hasDot && ch == '.')
|
||||
@ -371,7 +371,7 @@ static void RunActionSheet(const char* title, const struct string_list* items,
|
||||
else if (!isdigit(ch))
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ replacementString:(NSString *)string
|
||||
UITableViewCell* result;
|
||||
|
||||
result = [super cellForTableView: tableView];
|
||||
|
||||
|
||||
[self attachDefaultingGestureTo:result];
|
||||
|
||||
return result;
|
||||
@ -417,7 +417,7 @@ replacementString:(NSString *)string
|
||||
menu_entry_get_path(self.i, label, sizeof(label));
|
||||
|
||||
desc = BOXSTRING(label);
|
||||
|
||||
|
||||
alertView =
|
||||
[[UIAlertView alloc] initWithTitle:BOXSTRING("Enter new value")
|
||||
message:desc
|
||||
@ -467,10 +467,10 @@ replacementString:(NSString *)string
|
||||
{
|
||||
struct string_list* items;
|
||||
RAMenuItemGeneric __weak* weakSelf;
|
||||
|
||||
|
||||
if (gesture.state != UIGestureRecognizerStateBegan)
|
||||
return;
|
||||
|
||||
|
||||
weakSelf = self;
|
||||
items = (struct string_list*)string_split("OK", "|");
|
||||
RunActionSheet("Really Reset Value?", items, self.parentTable,
|
||||
@ -481,7 +481,7 @@ replacementString:(NSString *)string
|
||||
}
|
||||
[weakSelf.parentTable reloadData];
|
||||
});
|
||||
|
||||
|
||||
string_list_free(items);
|
||||
}
|
||||
|
||||
@ -604,7 +604,7 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
delegate:self
|
||||
cancelButtonTitle:@"OK"
|
||||
otherButtonTitles:nil];
|
||||
|
||||
|
||||
[message show];
|
||||
}
|
||||
|
||||
@ -646,7 +646,7 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UIBarButtonItem *item = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
|
||||
[self reloadData];
|
||||
|
||||
self.osdmessage = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 300, 44)];
|
||||
@ -680,8 +680,8 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
||||
menu_entries_get_title(title, sizeof(title));
|
||||
self.title = BOXSTRING(title);
|
||||
|
||||
end = menu_entries_get_end();
|
||||
|
||||
end = menu_entries_get_end();
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i);
|
||||
|
||||
for (; i < end; i++)
|
||||
@ -695,7 +695,7 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
[self set_leftbutton:BOXSTRING("Back")
|
||||
target:weakSelf
|
||||
action:@selector(menuBack)];
|
||||
|
||||
|
||||
[self set_rightbutton:BOXSTRING("Switch")
|
||||
target:[RetroArch_iOS get]
|
||||
action:@selector(showGameView)];
|
||||
@ -777,7 +777,7 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
#ifdef HAVE_MENU
|
||||
menu_entry_t entry = {{0}};
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
|
||||
|
||||
menu_entry_get(&entry, 0, selection, NULL, false);
|
||||
menu_entry_action(&entry, (unsigned int)selection, MENU_ACTION_CANCEL);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user