mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-25 10:41:49 +01:00
fixed the option to disable the aiming crosshair, fixed support for
128kb backup files (thanks Tanooki16!)
This commit is contained in:
parent
5bff07b305
commit
8aa8e4ce74
@ -24,6 +24,10 @@
|
||||
#include "netplay.h"
|
||||
#endif
|
||||
|
||||
#ifdef GEKKO
|
||||
#include "snes9xgx.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define NONE (-2)
|
||||
@ -3202,6 +3206,9 @@ void S9xControlEOF (void)
|
||||
DoGunLatch(superscope.x, superscope.y);
|
||||
|
||||
c = &superscope.crosshair;
|
||||
#ifdef GEKKO
|
||||
if(GCSettings.crosshair)
|
||||
#endif
|
||||
if (IPPU.RenderThisFrame)
|
||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, superscope.x, superscope.y);
|
||||
}
|
||||
@ -3212,6 +3219,9 @@ void S9xControlEOF (void)
|
||||
if (n == 1 && !justifier.offscreen[1])
|
||||
{
|
||||
c = &justifier.crosshair[1];
|
||||
#ifdef GEKKO
|
||||
if(GCSettings.crosshair)
|
||||
#endif
|
||||
if (IPPU.RenderThisFrame)
|
||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[1], justifier.y[1]);
|
||||
}
|
||||
@ -3231,6 +3241,9 @@ void S9xControlEOF (void)
|
||||
if (!justifier.offscreen[0])
|
||||
{
|
||||
c = &justifier.crosshair[0];
|
||||
#ifdef GEKKO
|
||||
if(GCSettings.crosshair)
|
||||
#endif
|
||||
if (IPPU.RenderThisFrame)
|
||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[0], justifier.y[0]);
|
||||
}
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include "snes9x/memmap.h"
|
||||
#include "snes9x/srtc.h"
|
||||
|
||||
bool HiROM;
|
||||
bool LoROM;
|
||||
|
||||
/****************************************************************************
|
||||
* Load SRAM
|
||||
***************************************************************************/
|
||||
@ -41,12 +44,14 @@ LoadSRAM (char * filepath, bool silent)
|
||||
|
||||
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
||||
|
||||
if (size > 0x20000)
|
||||
size = 0x20000;
|
||||
if (LoROM)
|
||||
size = size < 0x70000 ? size : 0x70000;
|
||||
else if (HiROM)
|
||||
size = size < 0x40000 ? size : 0x40000;
|
||||
|
||||
if (size)
|
||||
{
|
||||
len = LoadFile((char *)Memory.SRAM, filepath, 0, 0x20000, silent);
|
||||
len = LoadFile((char *)Memory.SRAM, filepath, 0, size, silent);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
@ -120,8 +125,10 @@ SaveSRAM (char * filepath, bool silent)
|
||||
// determine SRAM size
|
||||
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
||||
|
||||
if (size > 0x20000)
|
||||
size = 0x20000;
|
||||
if (LoROM)
|
||||
size = size < 0x70000 ? size : 0x70000;
|
||||
else if (HiROM)
|
||||
size = size < 0x40000 ? size : 0x40000;
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user