Add default keys for file Optimize CCs
Some checks failed
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) Has been cancelled
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) Has been cancelled
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) Has been cancelled
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) Has been cancelled
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) Has been cancelled
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 -DCMAKE_PREPARE_WINDOWS_DRIVERS=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Has been cancelled
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 -DCMAKE_PREPARE_WINDOWS_DRIVERS=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Has been cancelled
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 -DCMAKE_PREPARE_WINDOWS_DRIVERS=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Has been cancelled
CD / Create Pi Mono Setup (push) Has been cancelled
CD / Publishing (push) Has been cancelled

This commit is contained in:
Lorenzooone
2026-05-31 23:04:26 +02:00
parent 9b4e1cc579
commit 85dec4fbbb
5 changed files with 40 additions and 12 deletions

View File

@@ -1317,18 +1317,8 @@ bool cyop_is_key_for_device(CaptureDevice* device, std::string key) {
return check_key_matches_device_id(device->device_id, key, (const cyop_device_usb_device*)device->descriptor);
}
static std::string get_keys_file_path(bool is_new_device) {
std::string path = get_base_path_keys();
if(is_new_device)
path += "optimize_new_3ds.txt";
else
path += "optimize_old_3ds.txt";
return path;
}
static std::string read_key_for_device_id_from_file(uint64_t device_id, bool is_new_device) {
std::ifstream file(get_keys_file_path(is_new_device));
std::ifstream file(get_optimize_keys_file_path(is_new_device));
std::string line;
std::string out_key = "";
@@ -1363,7 +1353,7 @@ static void add_key_for_device_id_to_file(uint64_t device_id, std::string key, b
if(read_key_for_device_id_from_file(device_id, is_new_device) == key)
return;
std::ofstream file(get_keys_file_path(is_new_device), std::ios_base::app | std::ios_base::out);
std::ofstream file(get_optimize_keys_file_path(is_new_device), std::ios_base::app | std::ios_base::out);
file << key << std::endl;
file.close();
}