mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-18 09:31:50 +02:00
Update to v101r19 release.
byuu says: Changelog: - added \~130 new PAL games to icarus (courtesy of Smarthuman and aquaman) - added all three Korean-localized games to icarus - sfc: removed SuperDisc emulation (it was going nowhere) - sfc: fixed MSU1 regression where the play/repeat flags were not being cleared on track select - nall: cryptography support added; will be used to sign future databases (validation will always be optional) - minor shims to fix compilation issues due to nall changes The real magic is that we now have 25-30% of the PAL SNES library in icarus! Signing will be tricky. Obviously if I put the public key inside the higan archive, then all anyone has to do is change that public key for their own releases. And if you download from my site (which is now over HTTPS), then you don't need the signing to verify integrity. I may just put the public key on my site on my site and leave it at that, we'll see.
This commit is contained in:
@@ -92,11 +92,11 @@ auto slice(string_view self, int offset, int length) -> string {
|
||||
return result;
|
||||
}
|
||||
|
||||
auto fromInteger(char* result, intmax value) -> char* {
|
||||
template<typename T> auto fromInteger(char* result, T value) -> char* {
|
||||
bool negative = value < 0;
|
||||
if(negative) value = -value;
|
||||
|
||||
char buffer[64];
|
||||
char buffer[1 + sizeof(T) * 3];
|
||||
uint size = 0;
|
||||
|
||||
do {
|
||||
@@ -111,8 +111,8 @@ auto fromInteger(char* result, intmax value) -> char* {
|
||||
return result;
|
||||
}
|
||||
|
||||
auto fromNatural(char* result, uintmax value) -> char* {
|
||||
char buffer[64];
|
||||
template<typename T> auto fromNatural(char* result, T value) -> char* {
|
||||
char buffer[1 + sizeof(T) * 3];
|
||||
uint size = 0;
|
||||
|
||||
do {
|
||||
@@ -129,13 +129,13 @@ auto fromNatural(char* result, uintmax value) -> char* {
|
||||
//using sprintf is certainly not the most ideal method to convert
|
||||
//a double to a string ... but attempting to parse a double by
|
||||
//hand, digit-by-digit, results in subtle rounding errors.
|
||||
auto fromReal(char* result, long double value) -> uint {
|
||||
template<typename T> auto fromReal(char* result, T value) -> uint {
|
||||
char buffer[256];
|
||||
#ifdef _WIN32
|
||||
//Windows C-runtime does not support long double via sprintf()
|
||||
sprintf(buffer, "%f", (double)value);
|
||||
#else
|
||||
sprintf(buffer, "%Lf", value);
|
||||
sprintf(buffer, "%Lf", (long double)value);
|
||||
#endif
|
||||
|
||||
//remove excess 0's in fraction (2.500000 -> 2.5)
|
||||
|
Reference in New Issue
Block a user