mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-03 00:02:59 +02:00
Update to bsnes v107.1 release.
byuu says: Don't let the point release fool you, there are many significant changes in this release. I will be keeping bsnes releases using a point system until the new higan release is ready. Changelog: - GUI: added high DPI support - GUI: fixed the state manager image preview - Windows: added a new waveOut driver with support for dynamic rate control - Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso] - Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering - Windows: fixed XInput controller support on Windows 10 - SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4 coprocessors - SFC: fixed a slight rendering glitch in the intro to Megalomania If the coprocessor firmware is missing, bsnes will fallback on HLE where it is supported, which is everything other than SD Gundam GX and the two Hayazashi Nidan Morita Shougi games. The Windows dynamic rate control works best with Direct3D in fullscreen exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it is not possible to target a single XAudio2 version on all Windows OS releases. The waveOut driver should work everywhere out of the box. Note that with DRC, the synchronization source is your monitor, so you will want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
This commit is contained in:
@@ -6,6 +6,7 @@ template<typename T>
|
||||
struct vector_iterator {
|
||||
vector_iterator(vector<T>& self, uint64_t offset) : self(self), offset(offset) {}
|
||||
auto operator*() -> T& { return self.operator[](offset); }
|
||||
auto operator->() -> T* { return self.operator[](offset); }
|
||||
auto operator!=(const vector_iterator& source) const -> bool { return offset != source.offset; }
|
||||
auto operator++() -> vector_iterator& { return offset++, *this; }
|
||||
|
||||
@@ -18,6 +19,7 @@ template<typename T>
|
||||
struct vector_iterator_const {
|
||||
vector_iterator_const(const vector<T>& self, uint64_t offset) : self(self), offset(offset) {}
|
||||
auto operator*() -> const T& { return self.operator[](offset); }
|
||||
auto operator->() -> T* { return self.operator[](offset); }
|
||||
auto operator!=(const vector_iterator_const& source) const -> bool { return offset != source.offset; }
|
||||
auto operator++() -> vector_iterator_const& { return offset++, *this; }
|
||||
|
||||
@@ -30,6 +32,7 @@ template<typename T>
|
||||
struct vector_reverse_iterator {
|
||||
vector_reverse_iterator(vector<T>& self, uint64_t offset) : self(self), offset(offset) {}
|
||||
auto operator*() -> T& { return self.operator[](offset); }
|
||||
auto operator->() -> T* { return self.operator[](offset); }
|
||||
auto operator!=(const vector_reverse_iterator& source) const -> bool { return offset != source.offset; }
|
||||
auto operator++() -> vector_reverse_iterator& { return offset--, *this; }
|
||||
|
||||
@@ -42,6 +45,7 @@ template<typename T>
|
||||
struct vector_reverse_iterator_const {
|
||||
vector_reverse_iterator_const(const vector<T>& self, uint64_t offset) : self(self), offset(offset) {}
|
||||
auto operator*() -> const T& { return self.operator[](offset); }
|
||||
auto operator->() -> T* { return self.operator[](offset); }
|
||||
auto operator!=(const vector_reverse_iterator_const& source) const -> bool { return offset != source.offset; }
|
||||
auto operator++() -> vector_reverse_iterator_const& { return offset--, *this; }
|
||||
|
||||
|
@@ -101,6 +101,25 @@ template<typename T> auto vector<T>::remove(uint64_t offset, uint64_t length) ->
|
||||
_size -= length;
|
||||
}
|
||||
|
||||
template<typename T> auto vector<T>::RemoveWhere::operator==(const T& value) -> type& { return remove<std::equal_to<T>>(value); }
|
||||
template<typename T> auto vector<T>::RemoveWhere::operator!=(const T& value) -> type& { return remove<std::not_equal_to<T>>(value); }
|
||||
template<typename T> auto vector<T>::RemoveWhere::operator< (const T& value) -> type& { return remove<std::less<T>>(value); }
|
||||
template<typename T> auto vector<T>::RemoveWhere::operator<=(const T& value) -> type& { return remove<std::less_equal<T>>(value); }
|
||||
template<typename T> auto vector<T>::RemoveWhere::operator> (const T& value) -> type& { return remove<std::greater<T>>(value); }
|
||||
template<typename T> auto vector<T>::RemoveWhere::operator>=(const T& value) -> type& { return remove<std::greater_equal<T>>(value); }
|
||||
|
||||
template<typename T> template<typename Compare> auto vector<T>::RemoveWhere::remove(const T& value) -> type& {
|
||||
auto source = self.begin();
|
||||
auto target = self.begin();
|
||||
while(source != self.end()) {
|
||||
if(source != target) *target = move(*source);
|
||||
if(!Compare()(*target, value)) ++target;
|
||||
++source;
|
||||
}
|
||||
self.resize(target.offset());
|
||||
return self;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
template<typename T> auto vector<T>::takeLeft() -> T {
|
||||
|
@@ -36,6 +36,36 @@ template<typename T> auto vector<T>::findSorted(const T& value) const -> maybe<u
|
||||
return nothing;
|
||||
}
|
||||
|
||||
template<typename T> auto vector<T>::FindWhere::operator==(const T& value) -> vector<iterator<T>> { return move(find<std::equal_to<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhere::operator!=(const T& value) -> vector<iterator<T>> { return move(find<std::not_equal_to<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhere::operator< (const T& value) -> vector<iterator<T>> { return move(find<std::less<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhere::operator<=(const T& value) -> vector<iterator<T>> { return move(find<std::less_equal<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhere::operator> (const T& value) -> vector<iterator<T>> { return move(find<std::greater<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhere::operator>=(const T& value) -> vector<iterator<T>> { return move(find<std::greater_equal<T>>(value)); }
|
||||
|
||||
template<typename T> template<typename Compare> auto vector<T>::FindWhere::find(const T& value) -> vector<iterator<T>> {
|
||||
vector<iterator<T>> found;
|
||||
for(auto iterator = self.begin(); iterator != self.end(); ++iterator) {
|
||||
if(Compare()(*iterator, value)) found.append(iterator);
|
||||
}
|
||||
return move(found);
|
||||
}
|
||||
|
||||
template<typename T> auto vector<T>::FindWhereConst::operator==(const T& value) const -> vector<iterator_const<T>> { return move(find<std::equal_to<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhereConst::operator!=(const T& value) const -> vector<iterator_const<T>> { return move(find<std::not_equal_to<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhereConst::operator< (const T& value) const -> vector<iterator_const<T>> { return move(find<std::less<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhereConst::operator<=(const T& value) const -> vector<iterator_const<T>> { return move(find<std::less_equal<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhereConst::operator> (const T& value) const -> vector<iterator_const<T>> { return move(find<std::greater<T>>(value)); }
|
||||
template<typename T> auto vector<T>::FindWhereConst::operator>=(const T& value) const -> vector<iterator_const<T>> { return move(find<std::greater_equal<T>>(value)); }
|
||||
|
||||
template<typename T> template<typename Compare> auto vector<T>::FindWhereConst::find(const T& value) const -> vector<iterator_const<T>> {
|
||||
vector<iterator_const<T>> found;
|
||||
for(auto iterator = self.begin(); iterator != self.end(); ++iterator) {
|
||||
if(Compare()(*iterator, value)) found.append(iterator);
|
||||
}
|
||||
return move(found);
|
||||
}
|
||||
|
||||
template<typename T> auto vector<T>::foreach(const function<void (const T&)>& callback) -> void {
|
||||
for(uint64_t n : range(size())) callback(_pool[n]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user