mirror of
https://github.com/Lorenzooone/cc3dsfs.git
synced 2026-08-25 01:54:34 -05:00
Implement Menu for adding Optimize serial keys
Some checks are pending
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Waiting to run
CD / Create Pi Mono Setup (push) Blocked by required conditions
CD / Publishing (push) Blocked by required conditions
Some checks are pending
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Waiting to run
CD / Create Pi Mono Setup (push) Blocked by required conditions
CD / Publishing (push) Blocked by required conditions
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
#ifndef __CYPRESS_OPTIMIZE_3DS_ACQUISITION_HPP
|
||||
#define __CYPRESS_OPTIMIZE_3DS_ACQUISITION_HPP
|
||||
|
||||
#define SERIAL_KEY_OPTIMIZE_NO_DASHES_SIZE 20
|
||||
#define SERIAL_KEY_OPTIMIZE_DASHES_REPEATED_POS 4
|
||||
// Not the last one, so -1
|
||||
#define SERIAL_KEY_OPTIMIZE_DASHES_NUM ((SERIAL_KEY_OPTIMIZE_NO_DASHES_SIZE / SERIAL_KEY_OPTIMIZE_DASHES_REPEATED_POS) - 1)
|
||||
#define SERIAL_KEY_OPTIMIZE_WITH_DASHES_SIZE (SERIAL_KEY_OPTIMIZE_NO_DASHES_SIZE + SERIAL_KEY_OPTIMIZE_DASHES_NUM)
|
||||
|
||||
#include <vector>
|
||||
#include "utils.hpp"
|
||||
#include "hw_defs.hpp"
|
||||
@@ -18,6 +24,7 @@ bool is_device_optimize_3ds(CaptureDevice* device);
|
||||
bool is_device_optimize_o3ds(CaptureDevice* device);
|
||||
bool is_device_optimize_n3ds(CaptureDevice* device);
|
||||
bool cyop_is_key_for_device_id(CaptureDevice* device, std::string key);
|
||||
KeySaveError add_key_to_file(std::string key, bool is_for_new_3ds);
|
||||
void usb_cyop_device_init();
|
||||
void usb_cyop_device_close();
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ int StartCaptureDma(cy_device_device_handlers* handlers, const cyop_device_usb_d
|
||||
int capture_end(cy_device_device_handlers* handlers, const cyop_device_usb_device* device);
|
||||
int ReadFrame(cy_device_device_handlers* handlers, uint8_t* buf, int length, const cyop_device_usb_device* device_desc);
|
||||
int ReadFrameAsync(cy_device_device_handlers* handlers, uint8_t* buf, int length, const cyop_device_usb_device* device_desc, cy_async_callback_data* cb_data);
|
||||
uint64_t get_device_id_from_key(std::string key, bool is_new_device);
|
||||
bool check_key_matches_device_id(uint64_t device_id, std::string key, bool is_new_device);
|
||||
bool check_key_matches_device_id(uint64_t device_id, std::string key, const cyop_device_usb_device* device);
|
||||
bool check_key_valid(std::string key, bool is_new_device);
|
||||
|
||||
@@ -11,5 +11,7 @@ public:
|
||||
virtual void draw(float scaling_factor, sf::RenderTarget &window) = 0;
|
||||
virtual void reset_data(bool full_reset) = 0;
|
||||
virtual void reset_output_option() = 0;
|
||||
virtual void on_menu_unloaded() {};
|
||||
bool is_inside_textbox = false;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,10 @@ enum Optimize3DSMenuOutAction{
|
||||
OPTIMIZE3DS_MENU_BACK,
|
||||
OPTIMIZE3DS_MENU_INPUT_VIDEO_FORMAT_INC,
|
||||
OPTIMIZE3DS_MENU_INPUT_VIDEO_FORMAT_DEC,
|
||||
OPTIMIZE3DS_MENU_INFO_DEVICE_ID,
|
||||
OPTIMIZE3DS_MENU_COPY_DEVICE_ID,
|
||||
OPTIMIZE3DS_MENU_OPTIMIZE_SERIAL_KEY,
|
||||
OPTIMIZE3DS_MENU_OPTIMIZE_SERIAL_KEY_MENU,
|
||||
};
|
||||
|
||||
class Optimize3DSMenu : public OptionSelectionMenu {
|
||||
@@ -30,6 +34,7 @@ protected:
|
||||
void set_output_option(int index, int action);
|
||||
size_t get_num_options();
|
||||
std::string get_string_option(int index, int action);
|
||||
float get_option_text_factor(int index);
|
||||
void class_setup();
|
||||
private:
|
||||
int *options_indexes;
|
||||
|
||||
127
include/Menus/OptimizeSerialKeyAddMenu.hpp
Normal file
127
include/Menus/OptimizeSerialKeyAddMenu.hpp
Normal file
@@ -0,0 +1,127 @@
|
||||
#ifndef __OPTIMIZESERIALKEYADDMENU_HPP
|
||||
#define __OPTIMIZESERIALKEYADDMENU_HPP
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "GenericMenu.hpp"
|
||||
|
||||
#include "TextRectangle.hpp"
|
||||
#include "TextRectanglePool.hpp"
|
||||
#include "display_structs.hpp"
|
||||
#include "capture_structs.hpp"
|
||||
|
||||
#define BACK_X_OUTPUT_OPTION -1
|
||||
|
||||
enum OptimizeSerialKeyMenuOutAction{
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_NO_ACTION,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_BACK,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_TARGET_DEC,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_TARGET_INC,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_TARGET_INFO,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_SELECT_TEXTBOX,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_CONFIRM,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_KEY_PRINT,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_KEY_BUTTON_ABOVE_PRINT,
|
||||
OPTIMIZE_SERIAL_KEY_ADD_MENU_KEY_BUTTON_BELOW_PRINT,
|
||||
};
|
||||
|
||||
class OptimizeSerialKeyAddMenu : public GenericMenu {
|
||||
public:
|
||||
OptimizeSerialKeyAddMenu();
|
||||
OptimizeSerialKeyAddMenu(TextRectanglePool* text_pool);
|
||||
virtual ~OptimizeSerialKeyAddMenu();
|
||||
bool poll(SFEvent &event_data);
|
||||
void draw(float scaling_factor, sf::RenderTarget &window);
|
||||
void reset_data(bool full_reset);
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_input_processed_time;
|
||||
void reset_output_option();
|
||||
void on_menu_unloaded();
|
||||
void prepare(float scaling_factor, int view_size_x, int view_size_y);
|
||||
void insert_data(CaptureDevice* device);
|
||||
std::string get_key();
|
||||
|
||||
OptimizeSerialKeyMenuOutAction selected_index = OptimizeSerialKeyMenuOutAction::OPTIMIZE_SERIAL_KEY_ADD_MENU_NO_ACTION;
|
||||
bool key_for_new = false;
|
||||
protected:
|
||||
struct TextFieldInputFixedData {
|
||||
int option_selected = -1;
|
||||
int menu_width;
|
||||
int menu_height;
|
||||
int pos_x;
|
||||
int pos_y;
|
||||
};
|
||||
TextFieldInputFixedData future_data;
|
||||
TextRectangle **labels;
|
||||
bool *selectable_labels;
|
||||
|
||||
int num_vertical_slices;
|
||||
int num_elements_per_screen;
|
||||
int num_elements_displayed_per_screen;
|
||||
int num_options_per_screen;
|
||||
int elements_start_id;
|
||||
int min_elements_text_scaling_factor;
|
||||
int width_factor_menu;
|
||||
int width_divisor_menu;
|
||||
int base_height_factor_menu;
|
||||
int base_height_divisor_menu;
|
||||
float min_text_size;
|
||||
float max_width_slack;
|
||||
sf::Color menu_color;
|
||||
std::string title;
|
||||
|
||||
void initialize(TextRectanglePool* text_pool);
|
||||
void prepare_options();
|
||||
void base_prepare(float menu_scaling_factor, int view_size_x, int view_size_y);
|
||||
void prepare_text_slices(int x_multiplier, int x_divisor, int y_multiplier, int y_divisor, int x_size, int y_size, int index, float text_scaling_factor, TextKind text_kind, TextPosKind pos_kind = POS_KIND_NORMAL, bool center = false);
|
||||
TextRectangle* get_label_for_option(int option_num);
|
||||
|
||||
virtual bool is_option_selectable(int index);
|
||||
virtual bool is_option_drawable(int index);
|
||||
virtual void set_output_option(int index);
|
||||
virtual std::string get_string_option(int index);
|
||||
virtual void class_setup();
|
||||
virtual void option_slice_prepare(int i, int index, int num_vertical_slices, float text_scaling_factor);
|
||||
virtual bool is_option_element(int option);
|
||||
virtual bool is_option_left(int index);
|
||||
virtual bool is_option_right(int index);
|
||||
virtual bool is_selected_insert_text_option(int index);
|
||||
virtual int get_next_option_selected_after_key_input();
|
||||
virtual int get_option_selected_key_input();
|
||||
virtual int get_option_print_key_input();
|
||||
virtual bool add_to_key(uint32_t unicode);
|
||||
virtual int get_pos_in_serial_key();
|
||||
virtual int get_key_size();
|
||||
virtual void key_update_char(bool increase);
|
||||
virtual bool handle_click(int index, percentage_pos_text_t percentage, bool started_inside_textbox);
|
||||
virtual void set_pos_special_label(int index);
|
||||
private:
|
||||
int num_title_back_x_elements;
|
||||
int title_back_x_start_id;
|
||||
int back_x_id;
|
||||
int title_id;
|
||||
int pos_key = 0;
|
||||
std::string key = "WWWW-WWWW-WWWW-WWWW-WWWW";
|
||||
const float cursor_blank_timeout = 0.2f;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> menu_time;
|
||||
bool first_pass;
|
||||
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_action_time;
|
||||
const float action_timeout = 0.1f;
|
||||
TextFieldInputFixedData loaded_data;
|
||||
sf::RectangleShape menu_rectangle = sf::RectangleShape(sf::Vector2f(1, 1));
|
||||
|
||||
void after_class_setup_connected_values();
|
||||
bool can_execute_action();
|
||||
void up_code(bool is_simple);
|
||||
void down_code(bool is_simple);
|
||||
void left_code();
|
||||
void right_code();
|
||||
void option_selection_handling();
|
||||
void set_default_cursor_position();
|
||||
void decrement_selected_option(bool is_simple);
|
||||
void increment_selected_option(bool is_simple);
|
||||
void quit_textbox(bool change_option_selected = true);
|
||||
char get_key_update_char(bool increase);
|
||||
std::string generate_key_print_string();
|
||||
};
|
||||
#endif
|
||||
@@ -47,6 +47,7 @@ protected:
|
||||
virtual size_t get_num_options();
|
||||
virtual std::string get_string_option(int index, int action);
|
||||
virtual void class_setup();
|
||||
virtual float get_option_text_factor(int index) { return 1.0; }
|
||||
|
||||
int single_option_multiplier;
|
||||
|
||||
|
||||
@@ -8,37 +8,61 @@
|
||||
|
||||
#define BASE_PIXEL_FONT_HEIGHT 24
|
||||
|
||||
enum TextKind {TEXT_KIND_NORMAL, TEXT_KIND_SELECTED, TEXT_KIND_SUCCESS, TEXT_KIND_WARNING, TEXT_KIND_ERROR, TEXT_KIND_OPAQUE_ERROR, TEXT_KIND_TITLE};
|
||||
#define PERCENTAGE_POS_TEXT_ERROR (-1)
|
||||
|
||||
enum TextKind {TEXT_KIND_NORMAL, TEXT_KIND_SELECTED, TEXT_KIND_SUCCESS, TEXT_KIND_WARNING, TEXT_KIND_ERROR, TEXT_KIND_OPAQUE_ERROR, TEXT_KIND_TITLE, TEXT_KIND_TEXTBOX, TEXT_KIND_TEXTBOX_TRANSPARENT};
|
||||
enum FontKind {FONT_KIND_NORMAL, FONT_KIND_MONO};
|
||||
enum TextPosKind {POS_KIND_NORMAL, POS_KIND_PRIORITIZE_TOP_LEFT, POS_KIND_PRIORITIZE_BOTTOM_LEFT};
|
||||
|
||||
typedef sf::Vector2i percentage_pos_text_t;
|
||||
typedef sf::Vector2i size_text_t;
|
||||
typedef sf::Vector2i position_text_t;
|
||||
|
||||
class TextRectangle {
|
||||
public:
|
||||
TextRectangle(bool font_load_success, sf::Font &text_font);
|
||||
TextRectangle(bool font_load_success, sf::Font *text_font, bool font_mono_load_success, sf::Font *text_font_mono);
|
||||
~TextRectangle();
|
||||
void setRectangleKind(TextKind kind);
|
||||
void setTextFactor(float size_multiplier);
|
||||
void setSize(int width, int height);
|
||||
size_text_t getFinalSize();
|
||||
size_text_t getFinalSizeNoMultipliers();
|
||||
percentage_pos_text_t getCoordInRectanglePercentage(int coord_x, int coord_y);
|
||||
bool isCoordInRectangle(int coord_x, int coord_y);
|
||||
void setDuration(float on_seconds);
|
||||
void setPosition(int pos_x, int pos_y);
|
||||
void setPosition(int pos_x, int pos_y, TextPosKind kind=POS_KIND_NORMAL);
|
||||
position_text_t getFinalPosition();
|
||||
position_text_t getFinalPositionNoMultipliers();
|
||||
void startTimer(bool do_start);
|
||||
void setProportionalBox(bool proportional_box);
|
||||
void setTightAndCentered(bool tight_and_centered);
|
||||
void prepareRenderText();
|
||||
void setText(std::string text);
|
||||
void setShowText(bool show_text);
|
||||
bool getShowText();
|
||||
void draw(sf::RenderTarget &window);
|
||||
void changeFont(FontKind new_font_kind);
|
||||
void setLineSpacing(float new_line_spacing);
|
||||
void setCharacterSpacing(float new_character_spacing);
|
||||
void setLocked(bool new_locked);
|
||||
// Only applies to text displayed with timer set to true
|
||||
bool isTimerTextDone();
|
||||
|
||||
private:
|
||||
out_rect_data text_rect;
|
||||
sf::Text actual_text;
|
||||
sf::Font *text_font;
|
||||
sf::Font *text_font_mono;
|
||||
bool font_load_success;
|
||||
bool font_mono_load_success;
|
||||
bool is_done_showing_text;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> clock_time_start;
|
||||
int time_phase;
|
||||
sf::Color curr_color;
|
||||
const float base_time_slide_factor = 0.5;
|
||||
const float base_pixel_slide_factor = 2.0;
|
||||
int pos_x_center_contrib = 0;
|
||||
int pos_y_center_contrib = 0;
|
||||
|
||||
struct TextData {
|
||||
bool is_timed;
|
||||
@@ -47,13 +71,24 @@ private:
|
||||
bool show_text;
|
||||
bool render_text;
|
||||
bool proportional_box;
|
||||
bool tight_and_centered;
|
||||
std::string printed_text;
|
||||
float duration;
|
||||
float font_pixel_height;
|
||||
int width;
|
||||
int height;
|
||||
int stored_width;
|
||||
int stored_height;
|
||||
int pos_x;
|
||||
int pos_y;
|
||||
int stored_pos_x;
|
||||
int stored_pos_y;
|
||||
bool locked;
|
||||
bool schedule_font_swap;
|
||||
FontKind font_kind;
|
||||
float line_spacing;
|
||||
float character_spacing;
|
||||
TextPosKind pos_kind;
|
||||
};
|
||||
|
||||
TextData future_data;
|
||||
@@ -64,5 +99,8 @@ private:
|
||||
void setTextWithLineWrapping(int x_limit = 0);
|
||||
void updateText(int x_limit = 0);
|
||||
void updateSlides(float* time_seconds);
|
||||
float getNoBlurCharacterSpacing();
|
||||
bool isFontLoaded(TextData &reference_data);
|
||||
sf::Font* getFont(TextData &reference_data);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
|
||||
class TextRectanglePool {
|
||||
public:
|
||||
TextRectanglePool(bool font_load_success, sf::Font *text_font);
|
||||
TextRectanglePool(bool font_load_success, sf::Font *text_font, bool font_mono_load_success, sf::Font *text_font_mono);
|
||||
~TextRectanglePool();
|
||||
void request_num_text_rectangles(int num_wanted_text_rectangles);
|
||||
TextRectangle* get_text_rectangle(int index);
|
||||
|
||||
private:
|
||||
bool font_load_success;
|
||||
bool font_mono_load_success;
|
||||
sf::Font *text_font;
|
||||
sf::Font *text_font_mono;
|
||||
int num_loaded_text_rectangles;
|
||||
TextRectangle** text_rectangles_list;
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ struct CaptureStatus {
|
||||
volatile bool reset_hardware = false;
|
||||
bool requested_3d = false;
|
||||
bool request_low_bw_format = true;
|
||||
bool key_updated = false;
|
||||
CaptureScreensType capture_type;
|
||||
CaptureSpeedsType capture_speed;
|
||||
int battery_percentage;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "capture_structs.hpp"
|
||||
#include "frontend.hpp"
|
||||
|
||||
enum KeySaveError { KEY_SAVED, KEY_INVALID, KEY_ALREADY_PRESENT, KEY_SAVE_METHOD_NOT_FOUND };
|
||||
|
||||
struct no_access_recap_data {
|
||||
no_access_recap_data(std::string name) : name(name), vid(-1), pid(-1) {}
|
||||
no_access_recap_data(uint16_t vid, uint16_t pid) : name(""), vid(vid), pid(pid) {}
|
||||
@@ -26,6 +28,7 @@ void capture_warning_print(CaptureData* capture_data, std::string graphical_stri
|
||||
uint64_t get_audio_n_samples(CaptureData* capture_data, CaptureDataSingleBuffer* data_buffer);
|
||||
uint64_t get_video_in_size(CaptureData* capture_data, bool is_3d, InputVideoDataType video_data_type);
|
||||
std::string get_device_id_string(CaptureStatus* capture_status);
|
||||
std::string get_device_serial_key_string(CaptureStatus* capture_status);
|
||||
std::string get_name_of_device(CaptureStatus* capture_status, bool use_long = false, bool want_real_serial = false);
|
||||
int get_usb_speed_of_device(CaptureStatus* capture_status);
|
||||
bool get_device_can_do_3d(CaptureStatus* capture_status);
|
||||
@@ -35,4 +38,6 @@ bool get_3d_enabled(CaptureStatus* capture_status, bool skip_requested_3d_check
|
||||
bool update_3d_enabled(CaptureStatus* capture_status);
|
||||
bool set_3d_enabled(CaptureStatus* capture_status, bool new_value);
|
||||
float get_framerate_multiplier(CaptureStatus* capture_status);
|
||||
KeySaveError save_cc_key(std::string key, CaptureConnectionType conn_type, bool differentiator);
|
||||
void check_device_serial_key_update(CaptureStatus* capture_status, bool differentiator, std::string key);
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ enum ScreenType { TOP, BOTTOM, JOINT };
|
||||
enum BottomRelativePosition { UNDER_TOP, LEFT_TOP, ABOVE_TOP, RIGHT_TOP, BOT_REL_POS_END };
|
||||
enum SecondScreen3DRelativePosition { UNDER_FIRST, LEFT_FIRST, ABOVE_FIRST, RIGHT_FIRST, SECOND_SCREEN_3D_REL_POS_END };
|
||||
enum NonIntegerScalingModes { SMALLER_PRIORITY, INVERSE_PROPORTIONAL_PRIORITY, EQUAL_PRIORITY, PROPORTIONAL_PRIORITY, BIGGER_PRIORITY, END_NONINT_SCALE_MODES };
|
||||
enum CurrMenuType { DEFAULT_MENU_TYPE, CONNECT_MENU_TYPE, MAIN_MENU_TYPE, VIDEO_MENU_TYPE, AUDIO_MENU_TYPE, CROP_MENU_TYPE, TOP_PAR_MENU_TYPE, BOTTOM_PAR_MENU_TYPE, ROTATION_MENU_TYPE, OFFSET_MENU_TYPE, BFI_MENU_TYPE, LOAD_MENU_TYPE, SAVE_MENU_TYPE, RESOLUTION_MENU_TYPE, EXTRA_MENU_TYPE, STATUS_MENU_TYPE, LICENSES_MENU_TYPE, RELATIVE_POS_MENU_TYPE, SHORTCUTS_MENU_TYPE, ACTION_SELECTION_MENU_TYPE, SCALING_RATIO_MENU_TYPE, ISN_MENU_TYPE, VIDEO_EFFECTS_MENU_TYPE, INPUT_MENU_TYPE, AUDIO_DEVICE_MENU_TYPE, SEPARATOR_MENU_TYPE, COLOR_CORRECTION_MENU_TYPE, MAIN_3D_MENU_TYPE, SECOND_SCREEN_RELATIVE_POS_MENU_TYPE, USB_CONFLICT_RESOLUTION_MENU_TYPE, OPTIMIZE_3DS_MENU_TYPE };
|
||||
enum CurrMenuType { DEFAULT_MENU_TYPE, CONNECT_MENU_TYPE, MAIN_MENU_TYPE, VIDEO_MENU_TYPE, AUDIO_MENU_TYPE, CROP_MENU_TYPE, TOP_PAR_MENU_TYPE, BOTTOM_PAR_MENU_TYPE, ROTATION_MENU_TYPE, OFFSET_MENU_TYPE, BFI_MENU_TYPE, LOAD_MENU_TYPE, SAVE_MENU_TYPE, RESOLUTION_MENU_TYPE, EXTRA_MENU_TYPE, STATUS_MENU_TYPE, LICENSES_MENU_TYPE, RELATIVE_POS_MENU_TYPE, SHORTCUTS_MENU_TYPE, ACTION_SELECTION_MENU_TYPE, SCALING_RATIO_MENU_TYPE, ISN_MENU_TYPE, VIDEO_EFFECTS_MENU_TYPE, INPUT_MENU_TYPE, AUDIO_DEVICE_MENU_TYPE, SEPARATOR_MENU_TYPE, COLOR_CORRECTION_MENU_TYPE, MAIN_3D_MENU_TYPE, SECOND_SCREEN_RELATIVE_POS_MENU_TYPE, USB_CONFLICT_RESOLUTION_MENU_TYPE, OPTIMIZE_3DS_MENU_TYPE, OPTIMIZE_SERIAL_KEY_ADD_MENU_TYPE };
|
||||
enum InputColorspaceMode { FULL_COLORSPACE, DS_COLORSPACE, GBA_COLORSPACE, INPUT_COLORSPACE_END };
|
||||
enum FrameBlendingMode { NO_FRAME_BLENDING, FULL_FRAME_BLENDING, DS_3D_BOTH_SCREENS_FRAME_BLENDING, FRAME_BLENDING_END };
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ enum JoystickAction {JOY_ACTION_NONE, JOY_ACTION_CONFIRM, JOY_ACTION_NEGATE, JOY
|
||||
enum EventType {EVENT_NONE, EVENT_JOYSTICK_BTN_PRESSED, EVENT_JOYSTICK_BTN_RELEASED, EVENT_JOYSTICK_MOVED, EVENT_MOUSE_BTN_PRESSED, EVENT_MOUSE_MOVED, EVENT_KEY_PRESSED, EVENT_TEXT_ENTERED, EVENT_CLOSED, EVENT_KEY_RELEASED, EVENT_MOUSE_BTN_RELEASED};
|
||||
|
||||
struct SFEvent {
|
||||
SFEvent(bool pressed, sf::Keyboard::Key code, bool poweroff_cmd = false, bool is_extra = false) : type(pressed ? EVENT_KEY_PRESSED : EVENT_KEY_RELEASED), code(code), poweroff_cmd(poweroff_cmd), is_extra(is_extra) {}
|
||||
SFEvent(bool pressed, sf::Keyboard::Key code, bool alt, bool control, bool shift, bool system, bool poweroff_cmd = false, bool is_extra = false) : type(pressed ? EVENT_KEY_PRESSED : EVENT_KEY_RELEASED), code(code), alt(alt), control(control), shift(shift), system(system), poweroff_cmd(poweroff_cmd), is_extra(is_extra) {}
|
||||
SFEvent(uint32_t unicode) : type(EVENT_TEXT_ENTERED), unicode(unicode) {}
|
||||
SFEvent(bool pressed, uint32_t joystickId, uint32_t joy_button) : type(pressed ? EVENT_JOYSTICK_BTN_PRESSED : EVENT_MOUSE_BTN_RELEASED), joystickId(joystickId), joy_button(joy_button) {}
|
||||
SFEvent(uint32_t joystickId, sf::Joystick::Axis axis, float position) : type(EVENT_JOYSTICK_MOVED), joystickId(joystickId), axis(axis), position(position) {}
|
||||
@@ -20,6 +20,10 @@ struct SFEvent {
|
||||
|
||||
EventType type;
|
||||
sf::Keyboard::Key code;
|
||||
bool alt;
|
||||
bool control;
|
||||
bool shift;
|
||||
bool system;
|
||||
uint32_t unicode;
|
||||
uint32_t joystickId;
|
||||
uint32_t joy_button;
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "SecondScreen3DRelativePositionMenu.hpp"
|
||||
#include "USBConflictResolutionMenu.hpp"
|
||||
#include "Optimize3DSMenu.hpp"
|
||||
#include "OptimizeSerialKeyAddMenu.hpp"
|
||||
#include "display_structs.hpp"
|
||||
#include "event_structs.hpp"
|
||||
#include "shaders_list.hpp"
|
||||
@@ -198,6 +199,7 @@ private:
|
||||
SecondScreen3DRelativePositionMenu *second_screen_3d_relpos_menu;
|
||||
USBConflictResolutionMenu *usb_conflict_resolution_menu;
|
||||
Optimize3DSMenu* optimize_3ds_menu;
|
||||
OptimizeSerialKeyAddMenu* optimize_serial_key_add_menu;
|
||||
|
||||
std::vector<const CropData*> possible_crops;
|
||||
std::vector<const CropData*> possible_crops_ds;
|
||||
@@ -230,6 +232,7 @@ private:
|
||||
sf::Texture bot_in_tex;
|
||||
|
||||
sf::Font text_font;
|
||||
sf::Font text_font_mono;
|
||||
|
||||
volatile bool main_thread_owns_window;
|
||||
volatile bool is_window_factory_done;
|
||||
@@ -321,6 +324,7 @@ private:
|
||||
void second_screen_3d_match_bottom_pos_change();
|
||||
void devices_allowed_change(PossibleCaptureDevices device);
|
||||
void input_video_data_format_request_change(bool positive);
|
||||
bool add_new_cc_key(std::string key, CaptureConnectionType conn_type, bool discriminator);
|
||||
bool query_reset_request();
|
||||
void reset_held_times(bool force = true);
|
||||
void poll_window(bool do_everything);
|
||||
@@ -410,7 +414,9 @@ private:
|
||||
void setup_second_screen_3d_relpos_menu(bool reset_data = true);
|
||||
void setup_usb_conflict_resolution_menu(bool reset_data = true);
|
||||
void setup_optimize_3ds_menu(bool reset_data = true);
|
||||
void setup_optimize_serial_key_add_menu(bool reset_data = true);
|
||||
void update_connection();
|
||||
bool has_menu_textbox();
|
||||
};
|
||||
|
||||
struct FrontendData {
|
||||
|
||||
Reference in New Issue
Block a user