1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Untangle GUI and input includes

This commit is contained in:
Megamouse 2020-02-22 20:42:49 +01:00
parent 7b49249f5f
commit f7666f44da
126 changed files with 702 additions and 666 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#pragma once
#include <pugixml.hpp>
#include <memory>
struct rXmlNode
{

View File

@ -341,8 +341,9 @@ target_link_libraries(rpcs3_emu
# Io
target_sources(rpcs3_emu PRIVATE
Io/pad_config.cpp
Io/KeyboardHandler.cpp
Io/pad_config.cpp
Io/pad_config_types.cpp
Io/PadHandler.cpp
Io/usb_device.cpp
Io/Skylander.cpp

View File

@ -6,6 +6,7 @@
#include "Emu/Io/MouseHandler.h"
#include "Emu/RSX/GSRender.h"
#include "Utilities/Timer.h"
#include "Input/pad_thread.h"
LOG_CHANNEL(cellGem);

View File

@ -4,6 +4,8 @@
#include "Emu/Cell/lv2/sys_sync.h"
#include "Emu/RSX/Overlays/overlays.h"
#include "Input/pad_thread.h"
#include "cellSysutil.h"
#include "cellMsgDialog.h"

View File

@ -3,6 +3,7 @@
#include "Emu/Cell/PPUModule.h"
#include "Emu/Cell/lv2/sys_process.h"
#include "Emu/Io/pad_types.h"
#include "Input/pad_thread.h"
#include "cellPad.h"

View File

@ -1,5 +1,6 @@
#pragma once
#include "stdafx.h"
#include <Emu/Memory/vm_ptr.h>
// Return codes

View File

@ -1,5 +1,6 @@
#pragma once
#include "stdafx.h"
#include "Emu/Memory/vm_ptr.h"
#include <atomic>

View File

@ -1,285 +1,10 @@
#pragma once
#include <cmath>
#include "pad_types.h"
#include "pad_config.h"
#include "pad_config_types.h"
#include "Utilities/types.h"
#include "Emu/GameInfo.h"
// TODO: HLE info (constants, structs, etc.) should not be available here
enum SystemInfo
{
CELL_PAD_INFO_INTERCEPTED = 0x00000001
};
enum PortStatus
{
CELL_PAD_STATUS_DISCONNECTED = 0x00000000,
CELL_PAD_STATUS_CONNECTED = 0x00000001,
CELL_PAD_STATUS_ASSIGN_CHANGES = 0x00000002,
CELL_PAD_STATUS_CUSTOM_CONTROLLER = 0x00000004,
};
enum PortSettings
{
CELL_PAD_SETTING_LDD = 0x00000001, // Speculative
CELL_PAD_SETTING_PRESS_ON = 0x00000002,
CELL_PAD_SETTING_SENSOR_ON = 0x00000004,
CELL_PAD_SETTING_PRESS_OFF = 0x00000000,
CELL_PAD_SETTING_SENSOR_OFF = 0x00000000,
};
enum Digital1Flags
{
CELL_PAD_CTRL_LEFT = 0x00000080,
CELL_PAD_CTRL_DOWN = 0x00000040,
CELL_PAD_CTRL_RIGHT = 0x00000020,
CELL_PAD_CTRL_UP = 0x00000010,
CELL_PAD_CTRL_START = 0x00000008,
CELL_PAD_CTRL_R3 = 0x00000004,
CELL_PAD_CTRL_L3 = 0x00000002,
CELL_PAD_CTRL_SELECT = 0x00000001,
};
enum Digital2Flags
{
CELL_PAD_CTRL_SQUARE = 0x00000080,
CELL_PAD_CTRL_CROSS = 0x00000040,
CELL_PAD_CTRL_CIRCLE = 0x00000020,
CELL_PAD_CTRL_TRIANGLE = 0x00000010,
CELL_PAD_CTRL_R1 = 0x00000008,
CELL_PAD_CTRL_L1 = 0x00000004,
CELL_PAD_CTRL_R2 = 0x00000002,
CELL_PAD_CTRL_L2 = 0x00000001,
};
enum DeviceCapability
{
CELL_PAD_CAPABILITY_PS3_CONFORMITY = 0x00000001, // PS3 Conformity Controller
CELL_PAD_CAPABILITY_PRESS_MODE = 0x00000002, // Press mode supported
CELL_PAD_CAPABILITY_SENSOR_MODE = 0x00000004, // Sensor mode supported
CELL_PAD_CAPABILITY_HP_ANALOG_STICK = 0x00000008, // High Precision analog stick
CELL_PAD_CAPABILITY_ACTUATOR = 0x00000010, // Motor supported
};
enum DeviceType
{
CELL_PAD_DEV_TYPE_STANDARD = 0,
CELL_PAD_DEV_TYPE_BD_REMOCON = 4,
CELL_PAD_DEV_TYPE_LDD = 5,
};
enum ButtonDataOffset
{
CELL_PAD_BTN_OFFSET_DIGITAL1 = 2,
CELL_PAD_BTN_OFFSET_DIGITAL2 = 3,
CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X = 4,
CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y = 5,
CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X = 6,
CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y = 7,
CELL_PAD_BTN_OFFSET_PRESS_RIGHT = 8,
CELL_PAD_BTN_OFFSET_PRESS_LEFT = 9,
CELL_PAD_BTN_OFFSET_PRESS_UP = 10,
CELL_PAD_BTN_OFFSET_PRESS_DOWN = 11,
CELL_PAD_BTN_OFFSET_PRESS_TRIANGLE = 12,
CELL_PAD_BTN_OFFSET_PRESS_CIRCLE = 13,
CELL_PAD_BTN_OFFSET_PRESS_CROSS = 14,
CELL_PAD_BTN_OFFSET_PRESS_SQUARE = 15,
CELL_PAD_BTN_OFFSET_PRESS_L1 = 16,
CELL_PAD_BTN_OFFSET_PRESS_R1 = 17,
CELL_PAD_BTN_OFFSET_PRESS_L2 = 18,
CELL_PAD_BTN_OFFSET_PRESS_R2 = 19,
CELL_PAD_BTN_OFFSET_SENSOR_X = 20,
CELL_PAD_BTN_OFFSET_SENSOR_Y = 21,
CELL_PAD_BTN_OFFSET_SENSOR_Z = 22,
CELL_PAD_BTN_OFFSET_SENSOR_G = 23,
};
enum
{
CELL_PAD_ACTUATOR_MAX = 2,
CELL_PAD_MAX_PORT_NUM = 7,
CELL_PAD_MAX_CAPABILITY_INFO = 32,
CELL_PAD_MAX_CODES = 64,
CELL_MAX_PADS = 127,
};
struct Button
{
u32 m_offset;
u32 m_keyCode;
u32 m_outKeyCode;
u16 m_value = 0;
bool m_pressed = false;
u16 m_actual_value = 0; // only used in keyboard_pad_handler
bool m_analog = false; // only used in keyboard_pad_handler
bool m_trigger = false; // only used in keyboard_pad_handler
Button(u32 offset, u32 keyCode, u32 outKeyCode)
: m_offset(offset)
, m_keyCode(keyCode)
, m_outKeyCode(outKeyCode)
{
if (offset == CELL_PAD_BTN_OFFSET_DIGITAL1)
{
if (outKeyCode == CELL_PAD_CTRL_LEFT || outKeyCode == CELL_PAD_CTRL_RIGHT ||
outKeyCode == CELL_PAD_CTRL_UP || outKeyCode == CELL_PAD_CTRL_DOWN)
{
m_analog = true;
}
}
else if (offset == CELL_PAD_BTN_OFFSET_DIGITAL2)
{
if (outKeyCode == CELL_PAD_CTRL_CROSS || outKeyCode == CELL_PAD_CTRL_CIRCLE ||
outKeyCode == CELL_PAD_CTRL_SQUARE || outKeyCode == CELL_PAD_CTRL_TRIANGLE ||
outKeyCode == CELL_PAD_CTRL_L1 || outKeyCode == CELL_PAD_CTRL_R1)
{
m_analog = true;
}
else if (outKeyCode == CELL_PAD_CTRL_L2 || outKeyCode == CELL_PAD_CTRL_R2)
{
m_trigger = true;
}
}
}
};
struct AnalogStick
{
u32 m_offset;
u32 m_keyCodeMin;
u32 m_keyCodeMax;
u16 m_value = 128;
AnalogStick(u32 offset, u32 keyCodeMin, u32 keyCodeMax)
: m_offset(offset)
, m_keyCodeMin(keyCodeMin)
, m_keyCodeMax(keyCodeMax)
{
}
};
struct AnalogSensor
{
u32 m_offset;
u16 m_value;
AnalogSensor(u32 offset, u16 value)
: m_offset(offset)
, m_value(value)
{}
};
struct VibrateMotor
{
bool m_isLargeMotor;
u16 m_value;
VibrateMotor(bool largeMotor, u16 value)
: m_isLargeMotor(largeMotor)
, m_value(value)
{}
};
struct Pad
{
bool m_buffer_cleared;
u32 m_port_status;
u32 m_device_capability;
u32 m_device_type;
u32 m_class_type;
// Cable State: 0 - 1 plugged in ?
u8 m_cable_state;
// DS4: 0 - 9 while unplugged, 0 - 10 while plugged in, 11 charge complete
// XInput: 0 = Empty, 1 = Low, 2 = Medium, 3 = Full
u8 m_battery_level;
std::vector<Button> m_buttons;
std::vector<AnalogStick> m_sticks;
std::vector<AnalogSensor> m_sensors;
std::vector<VibrateMotor> m_vibrateMotors;
// These hold bits for their respective buttons
u16 m_digital_1;
u16 m_digital_2;
// All sensors go from 0-255
u16 m_analog_left_x;
u16 m_analog_left_y;
u16 m_analog_right_x;
u16 m_analog_right_y;
u16 m_press_right;
u16 m_press_left;
u16 m_press_up;
u16 m_press_down;
u16 m_press_triangle;
u16 m_press_circle;
u16 m_press_cross;
u16 m_press_square;
u16 m_press_L1;
u16 m_press_L2;
u16 m_press_R1;
u16 m_press_R2;
// Except for these...0-1023
// ~399 on sensor y is a level non moving controller
u16 m_sensor_x;
u16 m_sensor_y;
u16 m_sensor_z;
u16 m_sensor_g;
bool ldd = false;
u8 ldd_data[132] = {};
void Init(u32 port_status, u32 device_capability, u32 device_type, u32 class_type)
{
m_port_status = port_status;
m_device_capability = device_capability;
m_device_type = device_type;
m_class_type = class_type;
}
Pad(u32 port_status, u32 device_capability, u32 device_type)
: m_buffer_cleared(true)
, m_port_status(port_status)
, m_device_capability(device_capability)
, m_device_type(device_type)
, m_class_type(0)
, m_cable_state(0)
, m_battery_level(0)
, m_digital_1(0)
, m_digital_2(0)
, m_analog_left_x(128)
, m_analog_left_y(128)
, m_analog_right_x(128)
, m_analog_right_y(128)
, m_press_right(0)
, m_press_left(0)
, m_press_up(0)
, m_press_down(0)
, m_press_triangle(0)
, m_press_circle(0)
, m_press_cross(0)
, m_press_square(0)
, m_press_L1(0)
, m_press_L2(0)
, m_press_R1(0)
, m_press_R2(0)
, m_sensor_x(512)
, m_sensor_y(399)
, m_sensor_z(512)
, m_sensor_g(512)
{
}
};
struct PadDevice
{

View File

@ -2,30 +2,6 @@
#include "pad_config.h"
#include "Emu/System.h"
template <>
void fmt_class_string<pad_handler>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](pad_handler value)
{
switch (value)
{
case pad_handler::null: return "Null";
case pad_handler::keyboard: return "Keyboard";
case pad_handler::ds3: return "DualShock 3";
case pad_handler::ds4: return "DualShock 4";
#ifdef _WIN32
case pad_handler::xinput: return "XInput";
case pad_handler::mm: return "MMJoystick";
#endif
#ifdef HAVE_LIBEVDEV
case pad_handler::evdev: return "Evdev";
#endif
}
return unknown;
});
}
bool cfg_input::load(const std::string& title_id)
{
cfg_name = Emulator::GetCustomInputConfigPath(title_id);

View File

@ -1,23 +1,10 @@
#pragma once
#include "pad_config_types.h"
#include "Utilities/Config.h"
#include "Utilities/File.h"
enum class pad_handler
{
null,
keyboard,
ds3,
ds4,
#ifdef _WIN32
xinput,
mm,
#endif
#ifdef HAVE_LIBEVDEV
evdev,
#endif
};
struct cfg_player final : cfg::node
{
pad_handler def_handler = pad_handler::null;

View File

@ -0,0 +1,26 @@
#include "stdafx.h"
#include "pad_config_types.h"
template <>
void fmt_class_string<pad_handler>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](pad_handler value)
{
switch (value)
{
case pad_handler::null: return "Null";
case pad_handler::keyboard: return "Keyboard";
case pad_handler::ds3: return "DualShock 3";
case pad_handler::ds4: return "DualShock 4";
#ifdef _WIN32
case pad_handler::xinput: return "XInput";
case pad_handler::mm: return "MMJoystick";
#endif
#ifdef HAVE_LIBEVDEV
case pad_handler::evdev: return "Evdev";
#endif
}
return unknown;
});
}

View File

@ -0,0 +1,25 @@
#pragma once
#include "Utilities/types.h"
enum class pad_handler
{
null,
keyboard,
ds3,
ds4,
#ifdef _WIN32
xinput,
mm,
#endif
#ifdef HAVE_LIBEVDEV
evdev,
#endif
};
struct PadInfo
{
u32 now_connect;
u32 system_info;
bool ignore_input;
};

273
rpcs3/Emu/Io/pad_types.h Normal file
View File

@ -0,0 +1,273 @@
#pragma once
enum SystemInfo
{
CELL_PAD_INFO_INTERCEPTED = 0x00000001
};
enum PortStatus
{
CELL_PAD_STATUS_DISCONNECTED = 0x00000000,
CELL_PAD_STATUS_CONNECTED = 0x00000001,
CELL_PAD_STATUS_ASSIGN_CHANGES = 0x00000002,
CELL_PAD_STATUS_CUSTOM_CONTROLLER = 0x00000004,
};
enum PortSettings
{
CELL_PAD_SETTING_LDD = 0x00000001, // Speculative
CELL_PAD_SETTING_PRESS_ON = 0x00000002,
CELL_PAD_SETTING_SENSOR_ON = 0x00000004,
CELL_PAD_SETTING_PRESS_OFF = 0x00000000,
CELL_PAD_SETTING_SENSOR_OFF = 0x00000000,
};
enum Digital1Flags
{
CELL_PAD_CTRL_LEFT = 0x00000080,
CELL_PAD_CTRL_DOWN = 0x00000040,
CELL_PAD_CTRL_RIGHT = 0x00000020,
CELL_PAD_CTRL_UP = 0x00000010,
CELL_PAD_CTRL_START = 0x00000008,
CELL_PAD_CTRL_R3 = 0x00000004,
CELL_PAD_CTRL_L3 = 0x00000002,
CELL_PAD_CTRL_SELECT = 0x00000001,
};
enum Digital2Flags
{
CELL_PAD_CTRL_SQUARE = 0x00000080,
CELL_PAD_CTRL_CROSS = 0x00000040,
CELL_PAD_CTRL_CIRCLE = 0x00000020,
CELL_PAD_CTRL_TRIANGLE = 0x00000010,
CELL_PAD_CTRL_R1 = 0x00000008,
CELL_PAD_CTRL_L1 = 0x00000004,
CELL_PAD_CTRL_R2 = 0x00000002,
CELL_PAD_CTRL_L2 = 0x00000001,
};
enum DeviceCapability
{
CELL_PAD_CAPABILITY_PS3_CONFORMITY = 0x00000001, // PS3 Conformity Controller
CELL_PAD_CAPABILITY_PRESS_MODE = 0x00000002, // Press mode supported
CELL_PAD_CAPABILITY_SENSOR_MODE = 0x00000004, // Sensor mode supported
CELL_PAD_CAPABILITY_HP_ANALOG_STICK = 0x00000008, // High Precision analog stick
CELL_PAD_CAPABILITY_ACTUATOR = 0x00000010, // Motor supported
};
enum DeviceType
{
CELL_PAD_DEV_TYPE_STANDARD = 0,
CELL_PAD_DEV_TYPE_BD_REMOCON = 4,
CELL_PAD_DEV_TYPE_LDD = 5,
};
enum ButtonDataOffset
{
CELL_PAD_BTN_OFFSET_DIGITAL1 = 2,
CELL_PAD_BTN_OFFSET_DIGITAL2 = 3,
CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X = 4,
CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y = 5,
CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X = 6,
CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y = 7,
CELL_PAD_BTN_OFFSET_PRESS_RIGHT = 8,
CELL_PAD_BTN_OFFSET_PRESS_LEFT = 9,
CELL_PAD_BTN_OFFSET_PRESS_UP = 10,
CELL_PAD_BTN_OFFSET_PRESS_DOWN = 11,
CELL_PAD_BTN_OFFSET_PRESS_TRIANGLE = 12,
CELL_PAD_BTN_OFFSET_PRESS_CIRCLE = 13,
CELL_PAD_BTN_OFFSET_PRESS_CROSS = 14,
CELL_PAD_BTN_OFFSET_PRESS_SQUARE = 15,
CELL_PAD_BTN_OFFSET_PRESS_L1 = 16,
CELL_PAD_BTN_OFFSET_PRESS_R1 = 17,
CELL_PAD_BTN_OFFSET_PRESS_L2 = 18,
CELL_PAD_BTN_OFFSET_PRESS_R2 = 19,
CELL_PAD_BTN_OFFSET_SENSOR_X = 20,
CELL_PAD_BTN_OFFSET_SENSOR_Y = 21,
CELL_PAD_BTN_OFFSET_SENSOR_Z = 22,
CELL_PAD_BTN_OFFSET_SENSOR_G = 23,
};
enum
{
CELL_PAD_ACTUATOR_MAX = 2,
CELL_PAD_MAX_PORT_NUM = 7,
CELL_PAD_MAX_CAPABILITY_INFO = 32,
CELL_PAD_MAX_CODES = 64,
CELL_MAX_PADS = 127,
};
struct Button
{
u32 m_offset;
u32 m_keyCode;
u32 m_outKeyCode;
u16 m_value = 0;
bool m_pressed = false;
u16 m_actual_value = 0; // only used in keyboard_pad_handler
bool m_analog = false; // only used in keyboard_pad_handler
bool m_trigger = false; // only used in keyboard_pad_handler
Button(u32 offset, u32 keyCode, u32 outKeyCode)
: m_offset(offset)
, m_keyCode(keyCode)
, m_outKeyCode(outKeyCode)
{
if (offset == CELL_PAD_BTN_OFFSET_DIGITAL1)
{
if (outKeyCode == CELL_PAD_CTRL_LEFT || outKeyCode == CELL_PAD_CTRL_RIGHT || outKeyCode == CELL_PAD_CTRL_UP || outKeyCode == CELL_PAD_CTRL_DOWN)
{
m_analog = true;
}
}
else if (offset == CELL_PAD_BTN_OFFSET_DIGITAL2)
{
if (outKeyCode == CELL_PAD_CTRL_CROSS || outKeyCode == CELL_PAD_CTRL_CIRCLE || outKeyCode == CELL_PAD_CTRL_SQUARE || outKeyCode == CELL_PAD_CTRL_TRIANGLE || outKeyCode == CELL_PAD_CTRL_L1 ||
outKeyCode == CELL_PAD_CTRL_R1)
{
m_analog = true;
}
else if (outKeyCode == CELL_PAD_CTRL_L2 || outKeyCode == CELL_PAD_CTRL_R2)
{
m_trigger = true;
}
}
}
};
struct AnalogStick
{
u32 m_offset;
u32 m_keyCodeMin;
u32 m_keyCodeMax;
u16 m_value = 128;
AnalogStick(u32 offset, u32 keyCodeMin, u32 keyCodeMax)
: m_offset(offset)
, m_keyCodeMin(keyCodeMin)
, m_keyCodeMax(keyCodeMax)
{
}
};
struct AnalogSensor
{
u32 m_offset;
u16 m_value;
AnalogSensor(u32 offset, u16 value)
: m_offset(offset)
, m_value(value)
{}
};
struct VibrateMotor
{
bool m_isLargeMotor;
u16 m_value;
VibrateMotor(bool largeMotor, u16 value)
: m_isLargeMotor(largeMotor)
, m_value(value)
{}
};
struct Pad
{
bool m_buffer_cleared;
u32 m_port_status;
u32 m_device_capability;
u32 m_device_type;
u32 m_class_type;
// Cable State: 0 - 1 plugged in ?
u8 m_cable_state;
// DS4: 0 - 9 while unplugged, 0 - 10 while plugged in, 11 charge complete
// XInput: 0 = Empty, 1 = Low, 2 = Medium, 3 = Full
u8 m_battery_level;
std::vector<Button> m_buttons;
std::vector<AnalogStick> m_sticks;
std::vector<AnalogSensor> m_sensors;
std::vector<VibrateMotor> m_vibrateMotors;
// These hold bits for their respective buttons
u16 m_digital_1;
u16 m_digital_2;
// All sensors go from 0-255
u16 m_analog_left_x;
u16 m_analog_left_y;
u16 m_analog_right_x;
u16 m_analog_right_y;
u16 m_press_right;
u16 m_press_left;
u16 m_press_up;
u16 m_press_down;
u16 m_press_triangle;
u16 m_press_circle;
u16 m_press_cross;
u16 m_press_square;
u16 m_press_L1;
u16 m_press_L2;
u16 m_press_R1;
u16 m_press_R2;
// Except for these...0-1023
// ~399 on sensor y is a level non moving controller
u16 m_sensor_x;
u16 m_sensor_y;
u16 m_sensor_z;
u16 m_sensor_g;
bool ldd = false;
u8 ldd_data[132] = {};
void Init(u32 port_status, u32 device_capability, u32 device_type, u32 class_type)
{
m_port_status = port_status;
m_device_capability = device_capability;
m_device_type = device_type;
m_class_type = class_type;
}
Pad(u32 port_status, u32 device_capability, u32 device_type)
: m_buffer_cleared(true)
, m_port_status(port_status)
, m_device_capability(device_capability)
, m_device_type(device_type)
, m_class_type(0)
, m_cable_state(0)
, m_battery_level(0)
, m_digital_1(0)
, m_digital_2(0)
, m_analog_left_x(128)
, m_analog_left_y(128)
, m_analog_right_x(128)
, m_analog_right_y(128)
, m_press_right(0)
, m_press_left(0)
, m_press_up(0)
, m_press_down(0)
, m_press_triangle(0)
, m_press_circle(0)
, m_press_cross(0)
, m_press_square(0)
, m_press_L1(0)
, m_press_L2(0)
, m_press_R1(0)
, m_press_R2(0)
, m_sensor_x(512)
, m_sensor_y(399)
, m_sensor_z(512)
, m_sensor_g(512)
{
}
};

View File

@ -1,7 +1,5 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"
#include "Emu/Cell/lv2/sys_time.h"
#include "Emu/Cell/lv2/sys_usbd.h"
#include "Emu/Io/usb_device.h"

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#ifdef _MSC_VER
#pragma warning(push, 0)
@ -15,7 +15,6 @@
#pragma GCC diagnostic pop
#endif
#include "Emu/Memory/vm.h"
#include "Emu/Cell/lv2/sys_usbd.h"
struct UsbTransfer;

View File

@ -1,6 +1,7 @@
#pragma once
#include "overlays.h"
#include "Utilities/CPUStats.h"
#include "Emu/system_config_types.h"
namespace rsx

View File

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "overlays.h"
#include "Utilities/date_time.h"
namespace rsx
{

View File

@ -1,6 +1,7 @@
#include "stdafx.h"
#include "overlays.h"
#include "../GSRender.h"
#include "../GSRender.h"
#include "Input/pad_thread.h"
LOG_CHANNEL(overlays);

View File

@ -2,22 +2,19 @@
#include "overlay_animation.h"
#include "overlay_controls.h"
#include "../../../Utilities/date_time.h"
#include "../../../Utilities/Thread.h"
#include "../../Io/PadHandler.h"
#include "Emu/Memory/vm.h"
#include "Emu/IdManager.h"
#include "Input/pad_thread.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/Modules/cellSaveData.h"
#include "Emu/Cell/Modules/cellMsgDialog.h"
#include "Emu/Cell/Modules/cellOskDialog.h"
#include "Emu/Cell/Modules/sceNpTrophy.h"
#include "Utilities/CPUStats.h"
#include "Utilities/Timer.h"
#include <list>
#include <thread>
// Utils
extern u64 get_system_time();

View File

@ -12,6 +12,7 @@
#include "Emu/Cell/lv2/sys_event.h"
#include "Emu/Cell/Modules/cellGcmSys.h"
#include "Overlays/overlay_perf_metrics.h"
#include "Utilities/date_time.h"
#include "Utilities/span.h"
#include "Utilities/StrUtil.h"

View File

@ -1,7 +1,6 @@
#include "basic_keyboard_handler.h"
#include <QApplication>
#include <QKeyEvent>
#include "Emu/system_config.h"

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "stdafx.h"
#include "Emu/Io/MouseHandler.h"

View File

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "ds3_pad_handler.h"
#include "Emu/Io/pad_config.h"
LOG_CHANNEL(ds3_log, "DS3");

View File

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "ds4_pad_handler.h"
#include "Emu/Io/pad_config.h"
LOG_CHANNEL(ds4_log, "DS4");

View File

@ -3,9 +3,8 @@
#ifdef HAVE_LIBEVDEV
#include "rpcs3qt/pad_settings_dialog.h"
#include "Emu/Io/pad_config.h"
#include "evdev_joystick_handler.h"
#include "Utilities/Thread.h"
#include "Utilities/Log.h"
#include <functional>

View File

@ -1,8 +1,7 @@
#pragma once
#ifdef HAVE_LIBEVDEV
#include "Utilities/types.h"
#include "Utilities/Config.h"
#include "stdafx.h"
#include "Utilities/File.h"
#include "Emu/Io/PadHandler.h"
#include <libevdev/libevdev.h>

View File

@ -1,7 +1,7 @@
#include "keyboard_pad_handler.h"
#include "Emu/Io/pad_config.h"
#include <QApplication>
#include <QThread>
LOG_CHANNEL(input_log, "Input");

View File

@ -1,6 +1,6 @@
#pragma once
#include "Utilities/Config.h"
#include "stdafx.h"
#include "Emu/Io/PadHandler.h"
#include <QWindow>

View File

@ -1,5 +1,6 @@
#ifdef _WIN32
#include "mm_joystick_handler.h"
#include "Emu/Io/pad_config.h"
LOG_CHANNEL(input_log, "Input");

View File

@ -1,9 +1,9 @@
#pragma once
#include "stdafx.h"
#include "Emu/Io/PadHandler.h"
#include <Windows.h>
#include <mmsystem.h>
#include "Utilities/Config.h"
class mm_joystick_handler final : public PadHandlerBase
{

View File

@ -10,6 +10,8 @@
#endif
#include "keyboard_pad_handler.h"
#include "Emu/Io/Null/NullPadHandler.h"
#include "Emu/Io/PadHandler.h"
#include "Emu/Io/pad_config.h"
LOG_CHANNEL(input_log, "Input");

View File

@ -4,15 +4,11 @@
#include <thread>
#include <mutex>
#include "../Utilities/types.h"
#include "Emu/Io/PadHandler.h"
#include "stdafx.h"
#include "Emu/Io/pad_types.h"
#include "Emu/Io/pad_config_types.h"
struct PadInfo
{
u32 now_connect;
u32 system_info;
bool ignore_input;
};
class PadHandlerBase;
class pad_thread
{

View File

@ -2,6 +2,7 @@
#ifdef _WIN32
#include "stdafx.h"
#include "xinput_pad_handler.h"
#include "Emu/Io/pad_config.h"
namespace XINPUT_INFO
{

View File

@ -1,6 +1,5 @@
#pragma once
#include "Utilities/Config.h"
#include "Emu/Io/PadHandler.h"
#define NOMINMAX
#include <Windows.h>

View File

@ -1,7 +1,5 @@
#include "display_sleep_control.h"
#include "Utilities/Log.h"
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@ -16,7 +14,7 @@ static IOPMAssertionID s_pm_assertion = kIOPMNullAssertionID;
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusMessage>
#include <QDBusReply>
#include "Utilities/types.h"
static u32 s_dbus_cookie = 0;
#endif

View File

@ -72,6 +72,7 @@
<ClCompile Include="Emu\Audio\AudioBackend.cpp" />
<ClCompile Include="Emu\Io\KeyboardHandler.cpp" />
<ClCompile Include="Emu\Io\pad_config.cpp" />
<ClCompile Include="Emu\Io\pad_config_types.cpp" />
<ClCompile Include="Emu\RSX\Overlays\Shaders\shader_loading_dialog.cpp" />
<ClCompile Include="Emu\RSX\Overlays\Shaders\shader_loading_dialog_native.cpp" />
<ClCompile Include="Emu\system_config_types.cpp" />
@ -415,8 +416,10 @@
<ClInclude Include="Emu\Cell\Modules\cellRemotePlay.h" />
<ClInclude Include="Emu\Cell\Modules\cellSsl.h" />
<ClInclude Include="Emu\Cell\Modules\cellStorage.h" />
<ClInclude Include="Emu\Io\pad_types.h" />
<ClInclude Include="Emu\Io\Keyboard.h" />
<ClInclude Include="Emu\Io\pad_config.h" />
<ClInclude Include="Emu\Io\pad_config_types.h" />
<ClInclude Include="Emu\RSX\Common\texture_cache_helpers.h" />
<ClInclude Include="Emu\RSX\Overlays\overlay_fonts.h" />
<ClInclude Include="Emu\RSX\Overlays\overlay_perf_metrics.h" />
@ -692,4 +695,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -883,7 +883,7 @@
</ClCompile>
<ClCompile Include="Emu\title.cpp">
<Filter>Emu</Filter>
</ClCompile>
</ClCompile>
<ClCompile Include="Emu\system_config.cpp">
<Filter>Emu</Filter>
</ClCompile>
@ -895,9 +895,12 @@
</ClCompile>
<ClCompile Include="Emu\system_config_types.cpp">
<Filter>Emu</Filter>
</ClCompile>
</ClCompile>
<ClCompile Include="Emu\RSX\Overlays\overlay_fonts.cpp">
<Filter>Emu\GPU\RSX\Overlays</Filter>
<Filter>Emu\GPU\RSX\Overlays</Filter>
</ClCompile>
<ClCompile Include="Emu\Io\pad_config_types.cpp">
<Filter>Emu\Io</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -1692,7 +1695,7 @@
</ClInclude>
<ClInclude Include="Emu\title.h">
<Filter>Emu</Filter>
</ClInclude>
</ClInclude>
<ClInclude Include="Emu\system_config.h">
<Filter>Emu</Filter>
</ClInclude>
@ -1701,9 +1704,15 @@
</ClInclude>
<ClInclude Include="Emu\system_config_types.h">
<Filter>Emu</Filter>
</ClInclude>
</ClInclude>
<ClInclude Include="Emu\RSX\Overlays\overlay_fonts.h">
<Filter>Emu\GPU\RSX\Overlays</Filter>
<Filter>Emu\GPU\RSX\Overlays</Filter>
</ClInclude>
<ClInclude Include="Emu\Io\pad_config_types.h">
<Filter>Emu\Io</Filter>
</ClInclude>
<ClInclude Include="Emu\Io\pad_types.h">
<Filter>Emu\Io</Filter>
</ClInclude>
</ItemGroup>
</Project>
</Project>

View File

@ -1,9 +1,12 @@
// Qt5.10+ frontend implementation for rpcs3. Known to work on Windows, Linux, Mac
// by Sacha Refshauge, Megamouse and flash-fire
#include <iostream>
#include <QApplication>
#include <QCommandLineParser>
#include <QFileInfo>
#include <QLayout>
#include <QTimer>
#include <QObject>
#include <QMessageBox>
@ -31,6 +34,7 @@ DYNAMIC_IMPORT("ntdll.dll", NtSetTimerResolution, NTSTATUS(ULONG DesiredResoluti
#endif
#include "rpcs3_version.h"
#include "Emu/System.h"
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
@ -222,7 +226,7 @@ int main(int argc, char** argv)
const bool use_cli_style = find_arg(arg_style, argc, argv) || find_arg(arg_stylesheet, argc, argv);
QScopedPointer<QCoreApplication> app(createApplication(argc, argv));
app->setApplicationVersion(qstr(rpcs3::get_version().to_string()));
app->setApplicationVersion(QString::fromStdString(rpcs3::get_version().to_string()));
app->setApplicationName("RPCS3");
// Command line args

View File

@ -1,6 +1,6 @@
#pragma once
#include "stdafx.h"
#include <string>
#include <QWindow>
struct EmuCallbacks;

View File

@ -1,4 +1,5 @@
#ifdef WITH_DISCORD_RPC
#ifdef WITH_DISCORD_RPC
#include "stdafx.h"
#include "_discord_utils.h"
#include "discord_rpc.h"
#include "discord_register.h"

View File

@ -1,6 +1,6 @@
#pragma once
#pragma once
#include "stdafx.h"
#include <string>
namespace discord
{

View File

@ -1,4 +1,4 @@
#include "about_dialog.h"
#include "about_dialog.h"
#include "ui_about_dialog.h"
#include "rpcs3_version.h"

View File

@ -2,6 +2,12 @@
#include "table_item_delegate.h"
#include "Emu/System.h"
#include <QFontDatabase>
#include <QMenu>
#include <QMouseEvent>
#include <QVBoxLayout>
#include <QPushButton>
LOG_CHANNEL(autopause_log, "AutoPause");
constexpr auto qstr = QString::fromStdString;

View File

@ -3,18 +3,9 @@
#include "stdafx.h"
#include <QDialog>
#include <QVBoxLayout>
#include <QFormLayout>
#include <QPushButton>
#include <QAbstractButton>
#include <QLabel>
#include <QString>
#include <QTableWidget>
#include <QHeaderView>
#include <QMouseEvent>
#include <QMenu>
#include <QLineEdit>
#include <QFontDatabase>
class auto_pause_settings_dialog : public QDialog
{

View File

@ -1,6 +1,5 @@
#pragma once
#pragma once
#include "stdafx.h"
#include "Emu/Cell/PPUThread.h"
#include <set>
enum class breakpoint_types

View File

@ -1,6 +1,9 @@
#include "breakpoint_list.h"
#include "breakpoint_handler.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/Cell/PPUThread.h"
#include <QMenu>

View File

@ -1,12 +1,13 @@
#pragma once
#pragma once
#include "stdafx.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "breakpoint_handler.h"
#include <QListWidget>
class CPUDisAsm;
class cpu_thread;
class breakpoint_handler;
class breakpoint_list : public QListWidget
{
Q_OBJECT

View File

@ -1,16 +1,13 @@
#include "stdafx.h"
#include "cg_disasm_window.h"
#include "gui_settings.h"
#include "syntax_highlighter.h"
#include <QSplitter>
#include <QMenu>
#include <QMenuBar>
#include <QMessageBox>
#include <QFileDialog>
#include <QDialog>
#include <QVBoxLayout>
#include <QDockWidget>
#include <QCoreApplication>
#include <QHBoxLayout>
#include <QFontDatabase>
#include <QMimeData>

View File

@ -1,11 +1,13 @@
#pragma once
#pragma once
#include <QTextEdit>
#include <QDropEvent>
#include "stdafx.h"
#include "gui_settings.h"
#include "syntax_highlighter.h"
class AsmHighlighter;
class GlslHighlighter;
class gui_settings;
class cg_disasm_window : public QWidget
{

View File

@ -1,7 +1,20 @@
#include "debugger_frame.h"
#include "register_editor_dialog.h"
#include "instruction_editor_dialog.h"
#include "gui_settings.h"
#include "debugger_list.h"
#include "breakpoint_list.h"
#include "breakpoint_handler.h"
#include "qt_utils.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/PPUDisAsm.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/SPUDisAsm.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include <QKeyEvent>
#include <QScrollBar>
@ -10,6 +23,8 @@
#include <QCompleter>
#include <QMenu>
#include <QJSEngine>
#include <QVBoxLayout>
#include <QTimer>
constexpr auto qstr = QString::fromStdString;
extern bool user_asked_for_frame_capture;

View File

@ -1,25 +1,20 @@
#pragma once
#include "stdafx.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/Cell/RawSPUThread.h"
#include "Emu/Cell/PPUDisAsm.h"
#include "Emu/Cell/SPUDisAsm.h"
#include "Emu/Cell/PPUInterpreter.h"
#include "breakpoint_handler.h"
#include "custom_dock_widget.h"
#include "instruction_editor_dialog.h"
#include "register_editor_dialog.h"
#include "gui_settings.h"
#include "debugger_list.h"
#include "breakpoint_list.h"
#include <QSplitter>
#include <QTextEdit>
#include <QPushButton>
#include <QComboBox>
class CPUDisAsm;
class cpu_thread;
class gui_settings;
class debugger_list;
class breakpoint_list;
class breakpoint_handler;
class debugger_frame : public custom_dock_widget
{

View File

@ -1,9 +1,13 @@
#include "debugger_list.h"
#include "gui_settings.h"
#include "breakpoint_handler.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/System.h"
#include <QApplication>
#include <QMouseEvent>
#include <QWheelEvent>

View File

@ -1,13 +1,14 @@
#pragma once
#pragma once
#include "breakpoint_handler.h"
#include "gui_settings.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "stdafx.h"
#include <QListWidget>
class breakpoint_handler;
class CPUDisAsm;
class cpu_thread;
class gui_settings;
class debugger_list : public QListWidget
{
Q_OBJECT

View File

@ -5,7 +5,6 @@
#include <condition_variable>
#include <mutex>
#include "stdafx.h"
#include "Utilities/Config.h"
#include "Utilities/Thread.h"
#include "Utilities/StrUtil.h"

View File

@ -1,14 +1,12 @@
#pragma once
#include "Utilities/File.h"
#include "Utilities/Log.h"
#include "yaml-cpp/yaml.h"
#include "stdafx.h"
#include <QCheckBox>
#include <QStringList>
#include <QMap>
#include <QObject>
#include <QComboBox>
#include <QSpinBox>

View File

@ -1,4 +1,4 @@
#include "find_dialog.h"
#include "find_dialog.h"
#include <QVBoxLayout>
@ -41,10 +41,6 @@ find_dialog::find_dialog(QTextEdit* edit, QWidget *parent, Qt::WindowFlags f) :
show();
}
find_dialog::~find_dialog()
{
}
int find_dialog::count_all()
{
m_count_lines = 0;

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <QDialog>
#include <QTextEdit>
@ -10,7 +10,6 @@ class find_dialog : public QDialog
{
public:
find_dialog(QTextEdit* edit, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~find_dialog();
private:
int m_count_lines = 0;

View File

@ -1,7 +1,10 @@
#include "game_compatibility.h"
#include "gui_settings.h"
#include "progress_dialog.h"
#include <QLabel>
#include <QMessageBox>
#include <QJsonDocument>
#include <QNetworkReply>
LOG_CHANNEL(compat_log, "Compat");

View File

@ -3,17 +3,13 @@
#include <memory>
#include <QPainter>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QTableWidget>
#include <QTimer>
#include "gui_settings.h"
#include "progress_dialog.h"
class gui_settings;
class progress_dialog;
struct compat_status
{

View File

@ -6,6 +6,12 @@
#include "custom_table_widget_item.h"
#include "input_dialog.h"
#include "localized.h"
#include "progress_dialog.h"
#include "persistent_settings.h"
#include "emu_settings.h"
#include "gui_settings.h"
#include "game_list.h"
#include "game_list_grid.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"
@ -35,12 +41,13 @@ LOG_CHANNEL(sys_log, "SYS");
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std::shared_ptr<emu_settings> emuSettings, std::shared_ptr<persistent_settings> persistent_settings, QWidget *parent)
game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std::shared_ptr<emu_settings> emuSettings, std::shared_ptr<persistent_settings> persistent_settings, QWidget* parent)
: custom_dock_widget(tr("Game List"), parent)
, m_gui_settings(guiSettings)
, m_emu_settings(emuSettings)
, m_persistent_settings(persistent_settings)
{
m_Icon_Size = gui::gl_icon_size_min; // ensure a valid size
m_isListLayout = m_gui_settings->GetValue(gui::gl_listMode).toBool();
m_Margin_Factor = m_gui_settings->GetValue(gui::gl_marginFactor).toReal();
m_Text_Factor = m_gui_settings->GetValue(gui::gl_textFactor).toReal();

View File

@ -1,24 +1,24 @@
#pragma once
#include "stdafx.h"
#include "Emu/GameInfo.h"
#include "custom_dock_widget.h"
#include "game_list.h"
#include "game_list_grid.h"
#include "emu_settings.h"
#include "persistent_settings.h"
#include "game_compatibility.h"
#include "category.h"
#include <QMainWindow>
#include <QToolBar>
#include <QLineEdit>
#include <QStackedWidget>
#include <QSet>
#include <QTableWidgetItem>
#include <memory>
class game_list;
class game_list_grid;
class gui_settings;
class emu_settings;
class persistent_settings;
/* Having the icons associated with the game info simplifies logic internally */
struct gui_game_info
{
@ -159,7 +159,7 @@ private:
// Icons
QColor m_Icon_Color;
QSize m_Icon_Size = gui::gl_icon_size_min; // ensure a valid size
QSize m_Icon_Size;
qreal m_Margin_Factor;
qreal m_Text_Factor;
bool m_drawCompatStatusToGrid = false;

View File

@ -3,7 +3,6 @@
#include "qt_utils.h"
#include <QHeaderView>
#include <QLabel>
#include <QScrollBar>
game_list_grid::game_list_grid(const QSize& icon_size, const QColor& icon_color, const qreal& margin_factor, const qreal& text_factor, const bool& showText)

View File

@ -1,10 +1,8 @@
#pragma once
#pragma once
#include "game_list.h"
#include "game_list_grid_delegate.h"
#include <QHBoxLayout>
#include <QScrollArea>
class game_list_grid_delegate;
class game_list_grid : public game_list
{

View File

@ -3,7 +3,6 @@
#include <QOpenGLContext>
#include <QOffscreenSurface>
#include <QWindow>
gl_gs_frame::gl_gs_frame(const QRect& geometry, const QIcon& appIcon, const std::shared_ptr<gui_settings>& gui_settings)
: gs_frame(geometry, appIcon, gui_settings)

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "stdafx.h"
#include "gs_frame.h"

View File

@ -1,4 +1,5 @@
#include "gs_frame.h"
#include "gui_settings.h"
#include "Utilities/Config.h"
#include "Utilities/Timer.h"
@ -7,9 +8,6 @@
#include "Emu/Cell/Modules/cellScreenshot.h"
#include <QKeyEvent>
#include <QTimer>
#include <QThread>
#include <QLibraryInfo>
#include <QMessageBox>
#include <string>
@ -29,6 +27,14 @@
#endif
#endif
#ifdef _WIN32
#include <QWinTHumbnailToolbar>
#include <QWinTHumbnailToolbutton>
#elif HAVE_QTDBUS
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnection>
#endif
LOG_CHANNEL(screenshot);
constexpr auto qstr = QString::fromStdString;

View File

@ -3,21 +3,16 @@
#include "stdafx.h"
#include "Emu/RSX/GSRender.h"
#include "gui_settings.h"
#include <QWidget>
#include <QWindow>
#include <QPaintEvent>
#ifdef _WIN32
#include <QWinTaskbarProgress>
#include <QWinTaskbarButton>
#include <QWinTHumbnailToolbar>
#include <QWinTHumbnailToolbutton>
#elif HAVE_QTDBUS
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnection>
#endif
class gui_settings;
class gs_frame : public QWindow, public GSFrameBase
{
Q_OBJECT

View File

@ -2,6 +2,12 @@
#include "qt_utils.h"
#include "welcome_dialog.h"
#include "main_window.h"
#include "emu_settings.h"
#include "gui_settings.h"
#include "persistent_settings.h"
#include "gs_frame.h"
#include "gl_gs_frame.h"
#ifdef WITH_DISCORD_RPC
#include "_discord_utils.h"
@ -15,6 +21,7 @@
#include "stylesheets.h"
#include <QScreen>
#include <QFontDatabase>
#include <clocale>

View File

@ -3,16 +3,16 @@
#include "stdafx.h"
#include <QApplication>
#include <QFontDatabase>
#include <QIcon>
#include <QElapsedTimer>
#include <QTranslator>
#include "main_window.h"
#include "main_application.h"
#include "emu_settings.h"
#include "gui_settings.h"
#include "persistent_settings.h"
#include "gs_frame.h"
#include "gl_gs_frame.h"
class gs_frame;
class main_window;
class gui_settings;
class emu_settings;
class persistent_settings;
/** RPCS3 GUI Application Class
* The main point of this class is to do application initialization, to hold the main and game windows and to initialize callbacks.

View File

@ -1,9 +1,9 @@
#include "gui_settings.h"
#include "game_list_frame.h"
#include "qt_utils.h"
#include "localized.h"
#include <QCheckBox>
#include <QCoreApplication>
#include <QMessageBox>

View File

@ -3,7 +3,6 @@
#include "settings.h"
#include "Utilities/Log.h"
#include <QDir>
#include <QVariant>
#include <QSize>
#include <QColor>

View File

@ -1,7 +1,9 @@
#include "input_dialog.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QDialogButtonBox>
#include <QLineEdit>
#include <QPushButton>
input_dialog::input_dialog(int max_length, const QString& text, const QString& title, const QString& label, const QString& placeholder, QWidget *parent, Qt::WindowFlags f)
: QDialog(parent, f)

View File

@ -2,8 +2,6 @@
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
class input_dialog : public QDialog
{

View File

@ -1,6 +1,13 @@
#include "instruction_editor_dialog.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "instruction_editor_dialog.h"
#include <QFontDatabase>
#include <QVBoxLayout>
#include <QMessageBox>
#include <QPushButton>
constexpr auto qstr = QString::fromStdString;

View File

@ -1,17 +1,13 @@
#pragma once
#include "stdafx.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/SPUThread.h"
#include <QDialog>
#include <QLineEdit>
#include <QLabel>
#include <QVBoxLayout>
#include <QMessageBox>
#include <QPushButton>
class CPUDisAsm;
class cpu_thread;
class instruction_editor_dialog : public QDialog
{

View File

@ -9,16 +9,12 @@
#include "Emu/Cell/lv2/sys_mutex.h"
#include "Emu/Cell/lv2/sys_cond.h"
#include "Emu/Cell/lv2/sys_semaphore.h"
#include "Emu/Cell/lv2/sys_event.h"
#include "Emu/Cell/lv2/sys_event_flag.h"
#include "Emu/Cell/lv2/sys_rwlock.h"
#include "Emu/Cell/lv2/sys_prx.h"
#include "Emu/Cell/lv2/sys_overlay.h"
#include "Emu/Cell/lv2/sys_memory.h"
#include "Emu/Cell/lv2/sys_mmapper.h"
#include "Emu/Cell/lv2/sys_spu.h"
#include "Emu/Cell/lv2/sys_interrupt.h"
#include "Emu/Cell/lv2/sys_timer.h"
#include "Emu/Cell/lv2/sys_process.h"
#include "Emu/Cell/lv2/sys_fs.h"
@ -119,24 +115,24 @@ void kernel_explorer::Update()
};
std::vector<lv2_obj_rec> lv2_types(256);
lv2_types[SYS_MEM_OBJECT] = l_addTreeChild(root, "Memory");
lv2_types[SYS_MUTEX_OBJECT] = l_addTreeChild(root, "Mutexes");
lv2_types[SYS_COND_OBJECT] = l_addTreeChild(root, "Condition Variables");
lv2_types[SYS_RWLOCK_OBJECT] = l_addTreeChild(root, "Reader Writer Locks");
lv2_types[SYS_INTR_TAG_OBJECT] = l_addTreeChild(root, "Interrupt Tags");
lv2_types[SYS_MEM_OBJECT] = l_addTreeChild(root, "Memory");
lv2_types[SYS_MUTEX_OBJECT] = l_addTreeChild(root, "Mutexes");
lv2_types[SYS_COND_OBJECT] = l_addTreeChild(root, "Condition Variables");
lv2_types[SYS_RWLOCK_OBJECT] = l_addTreeChild(root, "Reader Writer Locks");
lv2_types[SYS_INTR_TAG_OBJECT] = l_addTreeChild(root, "Interrupt Tags");
lv2_types[SYS_INTR_SERVICE_HANDLE_OBJECT] = l_addTreeChild(root, "Interrupt Service Handles");
lv2_types[SYS_EVENT_QUEUE_OBJECT] = l_addTreeChild(root, "Event Queues");
lv2_types[SYS_EVENT_PORT_OBJECT] = l_addTreeChild(root, "Event Ports");
lv2_types[SYS_TRACE_OBJECT] = l_addTreeChild(root, "Traces");
lv2_types[SYS_SPUIMAGE_OBJECT] = l_addTreeChild(root, "SPU Images");
lv2_types[SYS_PRX_OBJECT] = l_addTreeChild(root, "PRX Modules");
lv2_types[SYS_SPUPORT_OBJECT] = l_addTreeChild(root, "SPU Ports");
lv2_types[SYS_OVERLAY_OBJECT] = l_addTreeChild(root, "Overlay Modules");
lv2_types[SYS_LWMUTEX_OBJECT] = l_addTreeChild(root, "Light Weight Mutexes");
lv2_types[SYS_TIMER_OBJECT] = l_addTreeChild(root, "Timers");
lv2_types[SYS_SEMAPHORE_OBJECT] = l_addTreeChild(root, "Semaphores");
lv2_types[SYS_LWCOND_OBJECT] = l_addTreeChild(root, "Light Weight Condition Variables");
lv2_types[SYS_EVENT_FLAG_OBJECT] = l_addTreeChild(root, "Event Flags");
lv2_types[SYS_EVENT_QUEUE_OBJECT] = l_addTreeChild(root, "Event Queues");
lv2_types[SYS_EVENT_PORT_OBJECT] = l_addTreeChild(root, "Event Ports");
lv2_types[SYS_TRACE_OBJECT] = l_addTreeChild(root, "Traces");
lv2_types[SYS_SPUIMAGE_OBJECT] = l_addTreeChild(root, "SPU Images");
lv2_types[SYS_PRX_OBJECT] = l_addTreeChild(root, "PRX Modules");
lv2_types[SYS_SPUPORT_OBJECT] = l_addTreeChild(root, "SPU Ports");
lv2_types[SYS_OVERLAY_OBJECT] = l_addTreeChild(root, "Overlay Modules");
lv2_types[SYS_LWMUTEX_OBJECT] = l_addTreeChild(root, "Light Weight Mutexes");
lv2_types[SYS_TIMER_OBJECT] = l_addTreeChild(root, "Timers");
lv2_types[SYS_SEMAPHORE_OBJECT] = l_addTreeChild(root, "Semaphores");
lv2_types[SYS_LWCOND_OBJECT] = l_addTreeChild(root, "Light Weight Condition Variables");
lv2_types[SYS_EVENT_FLAG_OBJECT] = l_addTreeChild(root, "Event Flags");
idm::select<lv2_obj>([&](u32 id, lv2_obj& obj)
{

View File

@ -1,19 +1,23 @@
#include "log_frame.h"
#include "qt_utils.h"
#include "gui_settings.h"
#include "stdafx.h"
#include "rpcs3_version.h"
#include "Utilities/sysinfo.h"
#include "Utilities/mutex.h"
#include "Utilities/lockless.h"
#include <QMenu>
#include <QActionGroup>
#include <QScrollBar>
#include <QTabBar>
#include <QVBoxLayout>
#include <QTimer>
#include <QStringBuilder>
#include <sstream>
#include <deque>
#include <mutex>
#include "Utilities/mutex.h"
#include "Utilities/lockless.h"
extern fs::file g_tty;
extern atomic_t<s64> g_tty_size;
@ -627,7 +631,7 @@ bool log_frame::eventFilter(QObject* object, QEvent* event)
if (m_find_dialog && m_find_dialog->isVisible())
m_find_dialog->close();
m_find_dialog = std::make_unique<find_dialog>(static_cast<QTextEdit*>(object), this);
m_find_dialog.reset(new find_dialog(static_cast<QTextEdit*>(object), this));
}
}

View File

@ -4,7 +4,6 @@
#include "Utilities/Log.h"
#include "custom_dock_widget.h"
#include "gui_settings.h"
#include "find_dialog.h"
#include <memory>
@ -12,8 +11,8 @@
#include <QTabWidget>
#include <QPlainTextEdit>
#include <QActionGroup>
#include <QTimer>
#include <QKeyEvent>
class gui_settings;
class log_frame : public custom_dock_widget
{

View File

@ -1,12 +1,5 @@

#include <QApplication>
#include <QMenuBar>
#include <QMessageBox>
#include <QMessageBox>
#include <QFileDialog>
#include <QVBoxLayout>
#include <QDockWidget>
#include <QDesktopWidget>
#include <QMimeData>
#include "qt_utils.h"
#include "vfs_dialog.h"
@ -24,35 +17,31 @@
#include "memory_viewer_panel.h"
#include "rsx_debugger.h"
#include "main_window.h"
#include "emu_settings.h"
#include "about_dialog.h"
#include "pad_settings_dialog.h"
#include "progress_dialog.h"
#include "skylander_dialog.h"
#include "cheat_manager.h"
#include "pkg_install_dialog.h"
#include "category.h"
#include "gui_settings.h"
#include <thread>
#include <QScreen>
#include "stdafx.h"
#include "rpcs3_version.h"
#include "Emu/System.h"
#include "Emu/system_config.h"
#include "Emu/Memory/vm.h"
#include "Crypto/unpkg.h"
#include "Crypto/unself.h"
#include "Loader/PUP.h"
#include "Loader/TAR.h"
#include "Loader/PSF.h"
#include "Utilities/Thread.h"
#include "Utilities/StrUtil.h"
#include "rpcs3_version.h"
#include "Utilities/sysinfo.h"
#include "ui_main_window.h"

View File

@ -1,25 +1,26 @@
#pragma once
#ifdef _WIN32
#include <QWinTaskbarProgress>
#include <QWinTaskbarButton>
#include <QWinTHumbnailToolbar>
#include <QWinTHumbnailToolbutton>
#endif
#include <QActionGroup>
#include <QMainWindow>
#include <QPushButton>
#include <QIcon>
#include "log_frame.h"
#include "debugger_frame.h"
#include "game_list_frame.h"
#include "gui_settings.h"
#include "persistent_settings.h"
#include "update_manager.h"
#include "settings.h"
#include <memory>
class log_frame;
class debugger_frame;
class game_list_frame;
class gui_settings;
class emu_settings;
class persistent_settings;
namespace Ui
{
class main_window;

View File

@ -4,6 +4,7 @@
#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>
LOG_CHANNEL(gui_log, "GUI");

View File

@ -2,7 +2,6 @@
#include <QDialog>
#include <QLineEdit>
#include <QHBoxLayout>
class memory_string_searcher : public QDialog
{

View File

@ -1,8 +1,16 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "memory_viewer_panel.h"
#include <QVBoxLayout>
#include <QPushButton>
#include <QSpinBox>
#include <QGroupBox>
#include <QTextEdit>
#include <QComboBox>
#include <QWheelEvent>
constexpr auto qstr = QString::fromStdString;
memory_viewer_panel::memory_viewer_panel(QWidget* parent)

View File

@ -1,19 +1,10 @@
#pragma once
#pragma once
#include <QDialog>
#include <QLineEdit>
#include <QTextEdit>
#include <QComboBox>
#include <QVBoxLayout>
#include <QPushButton>
#include <QSpinBox>
#include <QGroupBox>
#include <QFontDatabase>
#include <QLabel>
#include <QFont>
#include <QScrollBar>
#include <QPainter>
#include <QMouseEvent>
#include <QFontDatabase>
class memory_viewer_panel : public QDialog
{

View File

@ -1,9 +1,16 @@

#include "msg_dialog_frame.h"
#include "msg_dialog_frame.h"
#include "custom_dialog.h"
#include <QApplication>
#include <QScreen>
#include <QThread>
#include <QPushButton>
#include <QFormLayout>
#ifdef _WIN32
#include <QWinTHumbnailToolbar>
#include <QWinTHumbnailToolbutton>
#elif HAVE_QTDBUS
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnection>
#endif
constexpr auto qstr = QString::fromStdString;

View File

@ -3,27 +3,16 @@
#include "stdafx.h"
#include "Emu/Cell/Modules/cellMsgDialog.h"
#include "custom_dialog.h"
#include <QPushButton>
#include <QStaticText>
#include <QInputDialog>
#include <QFormLayout>
#include <QProgressBar>
#include <QLabel>
#include <QButtonGroup>
#include <QKeyEvent>
#ifdef _WIN32
#include <QWinTaskbarProgress>
#include <QWinTaskbarButton>
#include <QWinTHumbnailToolbar>
#include <QWinTHumbnailToolbutton>
#elif HAVE_QTDBUS
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnection>
#endif
class custom_dialog;
class msg_dialog_frame : public QObject, public MsgDialogBase
{
Q_OBJECT

View File

@ -1,5 +1,5 @@

#include "osk_dialog_frame.h"
#include "osk_dialog_frame.h"
#include "custom_dialog.h"
#include "Emu/Cell/Modules/cellMsgDialog.h"
#include <QLabel>

View File

@ -3,7 +3,9 @@
#include "stdafx.h"
#include "Emu/Cell/Modules/cellOskDialog.h"
#include "custom_dialog.h"
#include <QObject>
class custom_dialog;
class osk_dialog_frame : public QObject, public OskDialogBase
{

View File

@ -2,14 +2,15 @@
#include <QButtonGroup>
#include <QDialog>
#include <QEvent>
#include <QLabel>
#include <QTabWidget>
#include <QTimer>
#include "Emu/Io/PadHandler.h"
#include "Emu/Io/pad_config.h"
#include "Emu/GameInfo.h"
class PadHandlerBase;
namespace Ui
{
class pad_settings_dialog;

View File

@ -3,7 +3,7 @@
#include <QDialogButtonBox>
#include <QPushButton>
#include <QFileInfo>
#include <QLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QToolButton>

View File

@ -2,6 +2,14 @@
#include <QLabel>
#ifdef _WIN32
#include <QWinTHumbnailToolbar>
#include <QWinTHumbnailToolbutton>
#elif HAVE_QTDBUS
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnection>
#endif
progress_dialog::progress_dialog(const QString &windowTitle, const QString &labelText, const QString &cancelButtonText, int minimum, int maximum, bool delete_on_close, QWidget *parent, Qt::WindowFlags flags)
: QProgressDialog(labelText, cancelButtonText, minimum, maximum, parent, flags)
{

View File

@ -1,17 +1,10 @@
#pragma once
#include "stdafx.h"
#include <QProgressDialog>
#ifdef _WIN32
#include <QWinTaskbarProgress>
#include <QWinTaskbarButton>
#include <QWinTHumbnailToolbar>
#include <QWinTHumbnailToolbutton>
#elif HAVE_QTDBUS
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnection>
#endif
class progress_dialog : public QProgressDialog

View File

@ -1,5 +1,4 @@

#include "qt_utils.h"
#include "qt_utils.h"
#include <QApplication>
#include <QBitmap>
#include <QFontMetrics>

View File

@ -1,7 +1,7 @@
#pragma once
#include "stdafx.h"
#include <QtCore>
#include <QDir>
#include <QComboBox>
#include <QFont>
#include <QIcon>

View File

@ -1,5 +1,14 @@

#include "register_editor_dialog.h"
#include "register_editor_dialog.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include <QLabel>
#include <QHBoxLayout>
#include <QPushButton>
#include <QMessageBox>
constexpr auto qstr = QString::fromStdString;
inline std::string sstr(const QString& _in) { return _in.toStdString(); }

View File

@ -1,18 +1,13 @@
#pragma once
#include "stdafx.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/CPU/CPUDisAsm.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/SPUThread.h"
#include <QDialog>
#include <QComboBox>
#include <QLabel>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <QMessageBox>
class CPUDisAsm;
class cpu_thread;
class register_editor_dialog : public QDialog
{

View File

@ -1,9 +1,18 @@

#include "rsx_debugger.h"
#include "rsx_debugger.h"
#include "gui_settings.h"
#include "qt_utils.h"
#include "memory_viewer_panel.h"
#include "table_item_delegate.h"
#include "Emu/RSX/GSRender.h"
#include <QHBoxLayout>
#include <QHeaderView>
#include <QFont>
#include <QPixmap>
#include <QPushButton>
#include <QKeyEvent>
enum GCMEnumTypes
{
CELL_GCM_ENUM,

View File

@ -2,21 +2,17 @@
#include "stdafx.h"
#include "memory_viewer_panel.h"
#include "table_item_delegate.h"
#include "gui_settings.h"
#include <QDialog>
#include <QGroupBox>
#include <QImage>
#include <QLabel>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QEvent>
#include <QTabWidget>
#include <QListWidget>
#include <QTableWidget>
#include <QHeaderView>
#include <QFont>
#include <QSignalMapper>
#include <QPixmap>
#include <QTabWidget>
class gui_settings;
class Buffer : public QGroupBox
{

View File

@ -5,6 +5,8 @@
#include <Emu/IdManager.h>
#include <Emu/RSX/Overlays/overlays.h>
#include "Input/pad_thread.h"
s32 save_data_dialog::ShowSaveDataList(std::vector<SaveDataEntry>& save_entries, s32 focused, u32 op, vm::ptr<CellSaveDataListSet> listSet)
{
// TODO: Install native shell as an Emu callback

View File

@ -1,3 +1,4 @@
#include "stdafx.h"
#include "save_data_info_dialog.h"
#include <QPushButton>

Some files were not shown because too many files have changed in this diff Show More