mirror of https://github.com/stella-emu/stella.git
removed 'WE' prefix from PlusROM id
This commit is contained in:
parent
3394584aa8
commit
38449a9962
|
@ -514,18 +514,15 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum,
|
||||||
settings().getString("plusroms.id") == EmptyString)
|
settings().getString("plusroms.id") == EmptyString)
|
||||||
{
|
{
|
||||||
// Make sure there always is an id
|
// Make sure there always is an id
|
||||||
if(settings().getString("plusroms.id") == EmptyString)
|
constexpr int ID_LEN = 32;
|
||||||
{
|
const char* HEX_DIGITS = "0123456789ABCDEF";
|
||||||
constexpr int ID_LEN = 32 - 2; // WE prefix added later
|
char id_chr[ID_LEN] = {0};
|
||||||
const char* HEX_DIGITS = "0123456789ABCDEF";
|
Random rnd;
|
||||||
char id_chr[ID_LEN] = {0};
|
|
||||||
|
|
||||||
Random rnd;
|
for(char& c: id_chr)
|
||||||
for(char& c: id_chr)
|
c = HEX_DIGITS[rnd.next() % 16];
|
||||||
c = HEX_DIGITS[rnd.next() % 16];
|
|
||||||
|
|
||||||
settings().setValue("plusroms.id", string(id_chr, ID_LEN));
|
settings().setValue("plusroms.id", string(id_chr, ID_LEN));
|
||||||
}
|
|
||||||
|
|
||||||
myEventHandler->changeStateByEvent(Event::PlusRomsSetupMode);
|
myEventHandler->changeStateByEvent(Event::PlusRomsSetupMode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ class PlusROMRequest {
|
||||||
ostringstream content;
|
ostringstream content;
|
||||||
content << "agent=Stella; "
|
content << "agent=Stella; "
|
||||||
<< "ver=" << STELLA_VERSION << "; "
|
<< "ver=" << STELLA_VERSION << "; "
|
||||||
<< "id=WE" << myId.id << "; "
|
<< "id=" << myId.id << "; "
|
||||||
<< "nick=" << myId.nick;
|
<< "nick=" << myId.nick;
|
||||||
|
|
||||||
httplib::Client client(myDestination.host);
|
httplib::Client client(myDestination.host);
|
||||||
|
|
Loading…
Reference in New Issue