mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-28 12:11:51 +01:00
Merge branch 'master' of https://github.com/dborth/snes9xgx.git
This commit is contained in:
commit
42888f0707
@ -443,7 +443,7 @@ DefaultSettings ()
|
||||
GCSettings.render = 3; // Filtered (sharp)
|
||||
GCSettings.FilterMethod = FILTER_NONE; // no hq2x
|
||||
|
||||
GCSettings.widescreen = 1; // aspect ratio correction
|
||||
GCSettings.widescreen = 0; // no aspect ratio correction
|
||||
GCSettings.zoomHor = 1.0; // horizontal zoom level
|
||||
GCSettings.zoomVert = 1.0; // vertical zoom level
|
||||
GCSettings.xshift = 0; // horizontal video shift
|
||||
|
@ -4,7 +4,6 @@
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include "../snes9x.h"
|
||||
#include "apu.h"
|
||||
|
@ -4,7 +4,6 @@
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef _APU_H_
|
||||
#define _APU_H_
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
/* Simple resampler based on bsnes's ruby audio library */
|
||||
/*****************************************************************************\
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
This file is licensed under the Snes9x License.
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __HERMITE_RESAMPLER_H
|
||||
#define __HERMITE_RESAMPLER_H
|
||||
|
@ -1,4 +1,8 @@
|
||||
/* Simple resampler based on bsnes's ruby audio library */
|
||||
/*****************************************************************************\
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
This file is licensed under the Snes9x License.
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __RESAMPLER_H
|
||||
#define __RESAMPLER_H
|
||||
|
@ -1,4 +1,8 @@
|
||||
/* Simple byte-based ring buffer. Licensed under public domain (C) BearOso. */
|
||||
/*****************************************************************************\
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
This file is licensed under the Snes9x License.
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __RING_BUFFER_H
|
||||
#define __RING_BUFFER_H
|
||||
|
@ -4,11 +4,24 @@
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "memmap.h"
|
||||
#include "cheats.h"
|
||||
#include "bml.h"
|
||||
|
||||
static inline char *trim (char *string)
|
||||
{
|
||||
int start;
|
||||
int end;
|
||||
|
||||
for (start = 0; string[start] && isspace (string[start]); start++) {}
|
||||
for (end = start; string[end] && !isspace (string[end]); end++) {}
|
||||
string[end] = '\0';
|
||||
return &string[start];
|
||||
}
|
||||
|
||||
static inline uint8 S9xGetByteFree (uint32 Address)
|
||||
{
|
||||
int block = (Address & 0xffffff) >> MEMMAP_SHIFT;
|
||||
@ -394,20 +407,23 @@ SCheat S9xTextToCheat (char *text)
|
||||
SCheatGroup S9xCreateCheatGroup (const char *name, const char *cheat)
|
||||
{
|
||||
SCheatGroup g;
|
||||
char *code;
|
||||
char *code_string = strdup (cheat);
|
||||
char *code_ptr = code_string;
|
||||
int len;
|
||||
|
||||
g.name = strdup (name);
|
||||
g.enabled = false;
|
||||
|
||||
for (code = strtok (code_string, "+"); code; code = strtok (NULL, "+"))
|
||||
for (len = strcspn (code_ptr, "+"); len; len = strcspn (code_ptr, "+"))
|
||||
{
|
||||
if (code)
|
||||
{
|
||||
SCheat c = S9xTextToCheat (code);
|
||||
if (c.address)
|
||||
g.c.push_back (c);
|
||||
}
|
||||
char *code = code_ptr;
|
||||
code_ptr += len + (code_ptr[len] == '\0' ? 0 : 1);
|
||||
code[len] = '\0';
|
||||
code = trim (code);
|
||||
|
||||
SCheat c = S9xTextToCheat (code);
|
||||
if (c.address)
|
||||
g.c.push_back (c);
|
||||
}
|
||||
|
||||
delete[] code_string;
|
||||
|
@ -54,7 +54,7 @@ enum
|
||||
S9X_NOT_A_MOVIE_SNAPSHOT,
|
||||
S9X_SNAPSHOT_INCONSISTENT,
|
||||
S9X_AVI_INFO,
|
||||
S9X_PRESSED_KEYS_INFO,
|
||||
S9X_PRESSED_KEYS_INFO
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user