Merge pull request #60 from Mystro256/master

Various fixes
This commit is contained in:
Zach Bacon 2016-12-30 21:17:00 -05:00 committed by GitHub
commit fd693b385e
10 changed files with 15 additions and 24 deletions

View File

@ -95,7 +95,6 @@ Here is the complete list:
| ENABLE_FFMPEG | Enable ffmpeg A/V recording | ON on Linux and MSys2 |
| ENABLE_LTO | Compile with Link Time Optimization (gcc and clang only) | ON where works |
| ENABLE_GBA_LOGGING | Enable extended GBA logging | ON |
| ENABLE_SDL | Build the SDL port | OFF |
| ENABLE_CAIRO | Enable Cairo rendering for wxWidgets | OFF |
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
| ENABLE_XAUDIO2 | Enable xaudio2 sound output for wxWidgets (Windows only) | ON |

View File

@ -20,7 +20,6 @@ int g_allocCountTemp = 0;
void* SzAlloc(void* p, size_t size)
{
p = p;
if (size == 0)
return 0;
#ifdef _SZ_ALLOC_DEBUG
@ -32,7 +31,6 @@ void* SzAlloc(void* p, size_t size)
void SzFree(void* p, void* address)
{
p = p;
#ifdef _SZ_ALLOC_DEBUG
if (address != 0) {
g_allocCount--;
@ -44,7 +42,6 @@ void SzFree(void* p, void* address)
void* SzAllocTemp(void* p, size_t size)
{
p = p;
if (size == 0)
return 0;
#ifdef _SZ_ALLOC_DEBUG
@ -59,7 +56,6 @@ void* SzAllocTemp(void* p, size_t size)
void SzFreeTemp(void* p, void* address)
{
p = p;
#ifdef _SZ_ALLOC_DEBUG
if (address != 0) {
g_allocCountTemp--;

View File

@ -237,8 +237,6 @@ static const BOOST::uint8_t val_tab[6]={0,0xC0,0xE0,0xF0,0xF8,0xFC};
size_t utf8_char_len_from_header( char p_c )
{
BOOST::uint8_t c = (BOOST::uint8_t)p_c;
size_t cnt = 0;
for(;;)
{
@ -354,7 +352,8 @@ size_t utf16_encode_char( unsigned cur_wchar, wchar_t * out )
{
if ( cur_wchar < 0x10000 )
{
if ( out ) *out = (wchar_t) cur_wchar; return 1;
if ( out ) *out = (wchar_t) cur_wchar;
return 1;
}
else if ( cur_wchar < ( 1 << 20 ) )
{
@ -370,7 +369,8 @@ size_t utf16_encode_char( unsigned cur_wchar, wchar_t * out )
}
else
{
if ( out ) *out = '?'; return 1;
if ( out ) *out = '?';
return 1;
}
}

View File

@ -130,7 +130,7 @@ MediaRet MediaRecorder::setup_sound_stream(const char *fname, AVOutputFormat *fm
ctx->codec_id = fmt->audio_codec;
ctx->codec_type = AVMEDIA_TYPE_AUDIO;
// Some encoders don't like int16_t (SAMPLE_FMT_S16)
ctx->sample_fmt = codec->sample_fmts[0];
if(!codec) ctx->sample_fmt = codec->sample_fmts[0];
// This was changed in the initial ffmpeg 3.0 update,
// but shouldn't (as far as I'm aware) cause problems with older versions
ctx->bit_rate = 128000; // arbitrary; in case we're generating mp3

View File

@ -87,7 +87,6 @@ void gbPrinterShowData()
void gbPrinterReceiveData()
{
int i = gbPrinterDataCount;
if (gbPrinterPacket[3]) { // compressed
uint8_t* data = &gbPrinterPacket[6];
uint8_t* dest = &gbPrinterData[gbPrinterDataCount];

View File

@ -1917,7 +1917,7 @@ static INSN_REGPARM void thumbBreakpoint(uint32_t opcode)
// SWI #comment
static INSN_REGPARM void thumbDF(uint32_t opcode)
{
uint32_t address = 0;
//uint32_t address = 0;
//clockTicks = codeTicksAccessSeq16(address)*2 + codeTicksAccess16(address)+3;
clockTicks = 3;
busPrefetchCount = 0;

View File

@ -3721,7 +3721,6 @@ void CPULoop(int ticks)
{
int clockTicks;
int timerOverflow = 0;
uint32_t memAddr = 0;
// variable used by the CPU core
cpuTotalTicks = 0;

View File

@ -298,7 +298,7 @@ public:
sf::IpAddress udpaddr[5];
RFUServer(void);
sf::Packet& Serialize(sf::Packet& packet, int slave);
void DeSerialize(sf::Packet packet, int slave);
void DeSerialize(sf::Packet& packet, int slave);
void Send(void);
void Recv(void);
};
@ -315,7 +315,7 @@ public:
void Send(void);
void Recv(void);
sf::Packet& Serialize(sf::Packet& packet);
void DeSerialize(sf::Packet packet);
void DeSerialize(sf::Packet& packet);
void CheckConn(void);
};
@ -1465,7 +1465,7 @@ sf::Packet& RFUServer::Serialize(sf::Packet& packet, int slave)
return packet;
}
void RFUServer::DeSerialize(sf::Packet packet, int slave)
void RFUServer::DeSerialize(sf::Packet& packet, int slave)
{
bool slave_is_host = false;
packet >> slave_is_host;
@ -1601,7 +1601,7 @@ sf::Packet& RFUClient::Serialize(sf::Packet& packet)
return packet;
}
void RFUClient::DeSerialize(sf::Packet packet)
void RFUClient::DeSerialize(sf::Packet& packet)
{
bool is_current_host = false;
for (int i = 0; i < MAX_CLIENTS; i++) {
@ -1656,7 +1656,6 @@ void RFUClient::Recv(void)
//transferring = false;
//return;
}
size_t nr;
sf::Packet packet;
sf::Socket::Status status = lanlink.tcpsocket.receive(packet);
if (status == sf::Socket::Disconnected) {
@ -1781,7 +1780,6 @@ static void StartRFUSocket(uint16_t value)
return;
}
static bool logstartd;
uint32_t CurCOM = 0, CurDAT = 0;
bool rfulogd = (READ16LE(&ioMem[COMM_SIOCNT]) != value);
@ -2999,7 +2997,6 @@ static void StartRFU(uint16_t value)
linktimeout = 1;
static bool logstartd;
uint32_t CurCOM = 0, CurDAT = 0;
bool rfulogd = (READ16LE(&ioMem[COMM_SIOCNT]) != value);
@ -4090,7 +4087,7 @@ uint16_t gbLinkUpdateIPC(uint8_t b, int gbSerialOn) //used on external clock
rfu_enabled = false;
if (gbSerialOn) {
if (gba_link_enabled)
if (gba_link_enabled) {
//Single Computer
if (GetLinkMode() == LINK_GAMEBOY_IPC) {
uint32_t tm; // = GetTickCount();
@ -4120,6 +4117,7 @@ uint16_t gbLinkUpdateIPC(uint8_t b, int gbSerialOn) //used on external clock
SetEvent(linksync[linkid]);
}
}
}
if (dat == 0xff /*||dat==0x00||b==0x00*/) //dat==0xff||dat==0x00
LinkFirstTime = true;

View File

@ -2685,7 +2685,7 @@ void clearBreaks(uint32_t address, uint8_t flags, char** expression, int howToCl
removeConditionalWithFlag(flags << 4, false);
}
{
sprintf(monbuf, "Cleared all requested breaks.\n", address);
sprintf(monbuf, "Cleared all requested breaks.\n");
monprintf(monbuf);
}
}
@ -3344,9 +3344,8 @@ void dbgExecute(char* toRun)
return;
}
//although it mights seem wierd, the old step is the last one to be executed.
//although it mights seem weird, the old step is the last one to be executed.
for (int j = 0;; j++) {
bool notFound = false;
if (debuggerCommands[j].name == NULL) {
{
sprintf(monbuf, "Unrecognized command %s. Type h for help.\n", commands[0]);

View File

@ -35,6 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <wchar.h>
#include <locale.h>
#include <unistd.h>
#include <wctype.h>
#define BUF_SIZE 4096
#define WBUF_SIZE BUF_SIZE * sizeof(wchar_t)