mirror of
https://gitea.tendokyu.moe/beerpsi/segatools-configurator.git
synced 2024-11-23 23:00:57 +01:00
Add options for aimeGen and felicaGen
This commit is contained in:
parent
2de61df7d2
commit
337d65745a
@ -48,6 +48,13 @@ Configurator::Configurator() {
|
|||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
void Configurator::read_card() {
|
void Configurator::read_card() {
|
||||||
|
this->aime_gen = GetPrivateProfileIntA(
|
||||||
|
"aime",
|
||||||
|
"aimeGen",
|
||||||
|
1,
|
||||||
|
".\\segatools.ini"
|
||||||
|
);
|
||||||
|
|
||||||
GetPrivateProfileStringA(
|
GetPrivateProfileStringA(
|
||||||
"aime",
|
"aime",
|
||||||
"aimePath",
|
"aimePath",
|
||||||
@ -71,6 +78,13 @@ void Configurator::read_card() {
|
|||||||
f.close();
|
f.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->felica_gen = GetPrivateProfileIntA(
|
||||||
|
"aime",
|
||||||
|
"felicaGen",
|
||||||
|
0,
|
||||||
|
".\\segatools.ini"
|
||||||
|
);
|
||||||
|
|
||||||
GetPrivateProfileStringA(
|
GetPrivateProfileStringA(
|
||||||
"aime",
|
"aime",
|
||||||
"felicaPath",
|
"felicaPath",
|
||||||
@ -96,6 +110,12 @@ void Configurator::read_card() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Configurator::write_card() {
|
void Configurator::write_card() {
|
||||||
|
WritePrivateProfileStringA(
|
||||||
|
"aime",
|
||||||
|
"aimeGen",
|
||||||
|
this->aime_gen ? "1" : "0",
|
||||||
|
".\\segatools.ini"
|
||||||
|
);
|
||||||
WritePrivateProfileStringA(
|
WritePrivateProfileStringA(
|
||||||
"aime",
|
"aime",
|
||||||
"aimePath",
|
"aimePath",
|
||||||
@ -113,6 +133,12 @@ void Configurator::write_card() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WritePrivateProfileStringA(
|
||||||
|
"aime",
|
||||||
|
"felicaGen",
|
||||||
|
this->felica_gen ? "1" : "0",
|
||||||
|
".\\segatools.ini"
|
||||||
|
);
|
||||||
WritePrivateProfileStringA(
|
WritePrivateProfileStringA(
|
||||||
"aime",
|
"aime",
|
||||||
"felicaPath",
|
"felicaPath",
|
||||||
@ -232,6 +258,13 @@ void Configurator::build_cards() {
|
|||||||
ImGui::PushID("CardAime");
|
ImGui::PushID("CardAime");
|
||||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "AiMe");
|
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "AiMe");
|
||||||
|
|
||||||
|
ImGui::AlignTextToFramePadding();
|
||||||
|
ImGui::Text("Automatically generate if not exist when scanning");
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Checkbox(this->aime_gen ? "Enabled" : "Disabled", &this->aime_gen)) {
|
||||||
|
updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::InputTextWithHint("Card Path", "DEVICE\\aime.txt", this->aime_card_path, sizeof(this->aime_card_path))) {
|
if (ImGui::InputTextWithHint("Card Path", "DEVICE\\aime.txt", this->aime_card_path, sizeof(this->aime_card_path))) {
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
@ -297,6 +330,13 @@ void Configurator::build_cards() {
|
|||||||
ImGui::PushID("CardFeliCa");
|
ImGui::PushID("CardFeliCa");
|
||||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "FeliCa");
|
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "FeliCa");
|
||||||
|
|
||||||
|
ImGui::AlignTextToFramePadding();
|
||||||
|
ImGui::Text("Automatically generate if not exist when scanning");
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Checkbox(this->felica_gen ? "Enabled" : "Disabled", &this->felica_gen)) {
|
||||||
|
updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::InputTextWithHint("Card Path", "DEVICE\\felica.txt", this->felica_card_path, sizeof(this->felica_card_path))) {
|
if (ImGui::InputTextWithHint("Card Path", "DEVICE\\felica.txt", this->felica_card_path, sizeof(this->felica_card_path))) {
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,11 @@ private:
|
|||||||
std::thread *card_select_thread = nullptr;
|
std::thread *card_select_thread = nullptr;
|
||||||
bool card_select_done = false;
|
bool card_select_done = false;
|
||||||
|
|
||||||
|
bool aime_gen;
|
||||||
char aime_card_id[21];
|
char aime_card_id[21];
|
||||||
char aime_card_path[MAX_PATH];
|
char aime_card_path[MAX_PATH];
|
||||||
|
|
||||||
|
bool felica_gen;
|
||||||
char felica_card_id[17];
|
char felica_card_id[17];
|
||||||
char felica_card_path[MAX_PATH];
|
char felica_card_path[MAX_PATH];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user