mirror of https://github.com/PCSX2/pcsx2.git
Rushed my prev commit. Here's some basic thing, only much less broken and crappy. (fixes double-spaced emuLog.txt file contents)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1099 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e24851927a
commit
17caa515ac
|
@ -168,12 +168,20 @@ void hwWrite8(u32 mem, u8 value) {
|
|||
case RCNT3_TARGET: rcntWtarget(3, value); break;
|
||||
|
||||
case 0x1000f180:
|
||||
if (value == '\n') {
|
||||
{
|
||||
bool flush = false;
|
||||
|
||||
// Terminate lines on CR or full buffers, and ignore \n's if the string contents
|
||||
// are empty (otherwise terminate on \n too!)
|
||||
if( ( value == '\r' ) || ( sio_count == 1023 ) ||
|
||||
( value == '\n' && sio_count != 0 ) )
|
||||
{
|
||||
sio_buffer[sio_count] = 0;
|
||||
Console::WriteLn( Color_Cyan, sio_buffer );
|
||||
sio_count = 0;
|
||||
} else {
|
||||
if (sio_count < 1023) {
|
||||
}
|
||||
else if( value != '\n' )
|
||||
{
|
||||
sio_buffer[sio_count++] = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -666,14 +666,24 @@ void psxHwWrite8(u32 add, u8 value) {
|
|||
case 0x1f801803: cdrWrite3(value); break;
|
||||
|
||||
case 0x1f80380c:
|
||||
if (value == '\r') break;
|
||||
if (value == '\n' || g_pbufi >= 1023) { // A line break, or the buffer is about to overflow.
|
||||
g_pbuf[g_pbufi++] = 0;
|
||||
g_pbufi = 0;
|
||||
{
|
||||
bool flush = false;
|
||||
|
||||
// Terminate lines on CR or full buffers, and ignore \n's if the string contents
|
||||
// are empty (otherwise terminate on \n too!)
|
||||
if( ( value == '\r' ) || ( g_pbufi == 1023 ) ||
|
||||
( value == '\n' && g_pbufi != 0 ) )
|
||||
{
|
||||
g_pbuf[g_pbufi] = 0;
|
||||
DevCon::WriteLn( Color_Cyan, g_pbuf );
|
||||
g_pbufi = 0;
|
||||
}
|
||||
else if( value != '\n' )
|
||||
{
|
||||
g_pbuf[g_pbufi++] = value;
|
||||
}
|
||||
else g_pbuf[g_pbufi++] = value;
|
||||
psxHu8(add) = value;
|
||||
}
|
||||
return;
|
||||
|
||||
case 0x1F808260:
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace Console
|
|||
|
||||
if (emuLog != NULL)
|
||||
{
|
||||
fputs("", emuLog);
|
||||
fputs("\n", emuLog);
|
||||
fflush( emuLog );
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ namespace Console
|
|||
|
||||
// No flushing here -- only flush after newlines.
|
||||
if (emuLog != NULL)
|
||||
fprintf( emuLog, fmt );
|
||||
fputs( fmt, emuLog );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue