Bug fix for Qt GUI message log in windows.
This commit is contained in:
parent
97c8c591bd
commit
1a622b5f30
|
@ -24,6 +24,10 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
|
@ -44,9 +48,21 @@ class msgLogBuf_t
|
||||||
public:
|
public:
|
||||||
msgLogBuf_t(void)
|
msgLogBuf_t(void)
|
||||||
{
|
{
|
||||||
char filename[256];
|
char filename[512];
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
if ( GetTempPathA( sizeof(filename), filename ) > 0 )
|
||||||
|
{
|
||||||
|
//printf("PATH: %s \n", filename );
|
||||||
|
strcat( filename, "fceux.log");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strcpy( filename, "fceux.log" );
|
||||||
|
}
|
||||||
|
#else
|
||||||
strcpy( filename, "/tmp/fceux.log" );
|
strcpy( filename, "/tmp/fceux.log" );
|
||||||
|
#endif
|
||||||
|
|
||||||
fp = ::fopen( filename, "w+");
|
fp = ::fopen( filename, "w+");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue