mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-18 20:21:31 +02:00
Update to v106r56 release.
byuu says: I fixed all outstanding bugs that I'm aware of, including all of the errata I listed yesterday. And now it's time for lots of regression testing. After that, I need to add Talarubi's XAudio2 DRC code, and then get a new public bsnes WIP out for final testing. New errata: when setting an icon (nall::image) larger than a Canvas on Windows, it's not centering the image, so you end up seeing the overscan area in the state manager previews, and the bottom of the image gets cut off. I also need to forcefully disable the Xlib screensaver disable support. I think I'll remove the GUI option to bypass it as well, and just force screensaver disable always on with Windows. I'll improve it in the future to toggle the effect between emulator pauses.
This commit is contained in:
@@ -142,6 +142,16 @@ auto image::load(const string& filename) -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
//assumes image and data are in the same format; pitch is adapted to image
|
||||
auto image::copy(const void* data, uint pitch, uint width, uint height) -> void {
|
||||
allocate(width, height);
|
||||
for(uint y : range(height)) {
|
||||
auto input = (const uint8_t*)data + y * pitch;
|
||||
auto output = (uint8_t*)_data + y * this->pitch();
|
||||
memory::copy(output, input, width * stride());
|
||||
}
|
||||
}
|
||||
|
||||
auto image::allocate(unsigned width, unsigned height) -> void {
|
||||
if(_data && _width == width && _height == height) return;
|
||||
free();
|
||||
@@ -150,6 +160,7 @@ auto image::allocate(unsigned width, unsigned height) -> void {
|
||||
_data = allocate(_width, _height, stride());
|
||||
}
|
||||
|
||||
//private
|
||||
auto image::allocate(unsigned width, unsigned height, unsigned stride) -> uint8_t* {
|
||||
//allocate 1x1 larger than requested; so that linear interpolation does not require bounds-checking
|
||||
unsigned size = width * height * stride;
|
||||
@@ -159,14 +170,4 @@ auto image::allocate(unsigned width, unsigned height, unsigned stride) -> uint8_
|
||||
return data;
|
||||
}
|
||||
|
||||
//assumes image and data are in the same format; pitch is adapted to image
|
||||
auto image::allocate(const void* data, uint pitch, uint width, uint height) -> void {
|
||||
allocate(width, height);
|
||||
for(uint y : range(height)) {
|
||||
auto input = (const uint8_t*)data + y * pitch;
|
||||
auto output = (uint8_t*)_data + y * this->pitch();
|
||||
memory::copy(output, input, width * stride());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user