mirror of https://github.com/bsnes-emu/bsnes.git
v108.12
* fix sprite index mask (Addams Family bugfix) * fix exclusive mode in Direct3D driver
This commit is contained in:
parent
7a98db84ac
commit
db1c37c799
|
@ -29,7 +29,7 @@ using namespace nall;
|
||||||
|
|
||||||
namespace Emulator {
|
namespace Emulator {
|
||||||
static const string Name = "bsnes";
|
static const string Name = "bsnes";
|
||||||
static const string Version = "108.11";
|
static const string Version = "108.12";
|
||||||
static const string Author = "byuu";
|
static const string Author = "byuu";
|
||||||
static const string License = "GPLv3";
|
static const string License = "GPLv3";
|
||||||
static const string Website = "https://byuu.org";
|
static const string Website = "https://byuu.org";
|
||||||
|
|
|
@ -12,7 +12,7 @@ auto PPU::Line::renderObject(PPU::IO::Object& self) -> void {
|
||||||
for(uint n : range(ppu.TileLimit)) tiles[n].valid = false;
|
for(uint n : range(ppu.TileLimit)) tiles[n].valid = false;
|
||||||
|
|
||||||
for(uint n : range(128)) {
|
for(uint n : range(128)) {
|
||||||
ObjectItem item{true, uint8_t(self.first + n)};
|
ObjectItem item{true, uint8_t(self.first + n & 127)};
|
||||||
const auto& object = ppu.objects[item.index];
|
const auto& object = ppu.objects[item.index];
|
||||||
|
|
||||||
if(object.size == 0) {
|
if(object.size == 0) {
|
||||||
|
|
|
@ -253,8 +253,10 @@ private:
|
||||||
_monitorWidth = monitor.width;
|
_monitorWidth = monitor.width;
|
||||||
_monitorHeight = monitor.height;
|
_monitorHeight = monitor.height;
|
||||||
|
|
||||||
|
_exclusive = self.exclusive && self.fullScreen;
|
||||||
|
|
||||||
//Direct3D exclusive mode targets the primary monitor only
|
//Direct3D exclusive mode targets the primary monitor only
|
||||||
if(self.exclusive) {
|
if(_exclusive) {
|
||||||
POINT point{0, 0}; //the primary monitor always starts at (0,0)
|
POINT point{0, 0}; //the primary monitor always starts at (0,0)
|
||||||
HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY);
|
HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY);
|
||||||
MONITORINFOEX info{};
|
MONITORINFOEX info{};
|
||||||
|
@ -292,10 +294,10 @@ private:
|
||||||
_presentation.AutoDepthStencilFormat = D3DFMT_UNKNOWN;
|
_presentation.AutoDepthStencilFormat = D3DFMT_UNKNOWN;
|
||||||
_presentation.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
|
_presentation.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
|
||||||
_presentation.hDeviceWindow = _context;
|
_presentation.hDeviceWindow = _context;
|
||||||
_presentation.Windowed = !self.exclusive;
|
_presentation.Windowed = !_exclusive;
|
||||||
_presentation.BackBufferFormat = self.exclusive ? D3DFMT_X8R8G8B8 : D3DFMT_UNKNOWN;
|
_presentation.BackBufferFormat = _exclusive ? D3DFMT_X8R8G8B8 : D3DFMT_UNKNOWN;
|
||||||
_presentation.BackBufferWidth = self.exclusive ? _monitorWidth : 0;
|
_presentation.BackBufferWidth = _exclusive ? _monitorWidth : 0;
|
||||||
_presentation.BackBufferHeight = self.exclusive ? _monitorHeight : 0;
|
_presentation.BackBufferHeight = _exclusive ? _monitorHeight : 0;
|
||||||
_presentation.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
|
_presentation.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
|
||||||
|
|
||||||
if(_instance->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _context,
|
if(_instance->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _context,
|
||||||
|
@ -348,6 +350,7 @@ private:
|
||||||
LPDIRECT3DTEXTURE9 _texture = nullptr;
|
LPDIRECT3DTEXTURE9 _texture = nullptr;
|
||||||
LPDIRECT3DSURFACE9 _surface = nullptr;
|
LPDIRECT3DSURFACE9 _surface = nullptr;
|
||||||
|
|
||||||
|
bool _exclusive = false;
|
||||||
bool _lost = true;
|
bool _lost = true;
|
||||||
uint _windowWidth;
|
uint _windowWidth;
|
||||||
uint _windowHeight;
|
uint _windowHeight;
|
||||||
|
|
Loading…
Reference in New Issue