mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-31 12:31:49 +02:00
Update to v094r44 release.
byuu says: Changelog: - return open bus instead of mirroring addresses on the bus (fixes Mario&Luigi, Minish Cap, etc) [Jonas Quinn] - add boolean flag to load requests for slotted game carts (fixes slot load prompts) - rename BS-X Town cart from psram to ram - icarus: add support for game database Note: I didn't rename "bsx" to "mcc" in the database for icarus before uploading that. But I just fixed it locally, so it'll be in the next WIP. For now, make it create the manifest for you and then rename it yourself. I did fix the PSRAM size to 256kbit.
This commit is contained in:
@@ -2,28 +2,26 @@
|
||||
|
||||
namespace nall {
|
||||
|
||||
template<bool Insensitive, bool Quoted> auto _find(const string& self, signed offset, rstring source) -> maybe<unsigned> {
|
||||
template<bool Insensitive, bool Quoted> auto string::_find(signed offset, rstring source) const -> maybe<unsigned> {
|
||||
if(source.size() == 0) return nothing;
|
||||
|
||||
const char* p = self.data();
|
||||
unsigned size = self.size();
|
||||
|
||||
for(unsigned n = offset, quoted = 0; n < size;) {
|
||||
auto p = data();
|
||||
for(unsigned n = offset, quoted = 0; n < size();) {
|
||||
if(Quoted) { if(p[n] == '\"') { quoted ^= 1; n++; continue; } if(quoted) { n++; continue; } }
|
||||
if(_compare<Insensitive>(p + n, size - n, source.data(), source.size())) { n++; continue; }
|
||||
if(_compare<Insensitive>(p + n, size() - n, source.data(), source.size())) { n++; continue; }
|
||||
return n - offset;
|
||||
}
|
||||
|
||||
return nothing;
|
||||
}
|
||||
|
||||
auto find(const string& self, rstring source) -> maybe<unsigned> { return _find<0, 0>(self, 0, source); }
|
||||
auto ifind(const string& self, rstring source) -> maybe<unsigned> { return _find<1, 0>(self, 0, source); }
|
||||
auto qfind(const string& self, rstring source) -> maybe<unsigned> { return _find<0, 1>(self, 0, source); }
|
||||
auto iqfind(const string& self, rstring source) -> maybe<unsigned> { return _find<1, 1>(self, 0, source); }
|
||||
auto string::find(rstring source) const -> maybe<unsigned> { return _find<0, 0>(0, source); }
|
||||
auto string::ifind(rstring source) const -> maybe<unsigned> { return _find<1, 0>(0, source); }
|
||||
auto string::qfind(rstring source) const -> maybe<unsigned> { return _find<0, 1>(0, source); }
|
||||
auto string::iqfind(rstring source) const -> maybe<unsigned> { return _find<1, 1>(0, source); }
|
||||
|
||||
auto findFrom(const string& self, signed offset, rstring source) -> maybe<unsigned> { return _find<0, 0>(self, offset, source); }
|
||||
auto ifindFrom(const string& self, signed offset, rstring source) -> maybe<unsigned> { return _find<1, 0>(self, offset, source); }
|
||||
auto string::findFrom(signed offset, rstring source) const -> maybe<unsigned> { return _find<0, 0>(offset, source); }
|
||||
auto string::ifindFrom(signed offset, rstring source) const -> maybe<unsigned> { return _find<1, 0>(offset, source); }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user