Linux: Fix focus problems with various dialogs when hitting escape, and hook in dev9's dialog box.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1190 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 committed 2009-05-15 07:02:51 +00:00
1 parent 5615929ce3
commit 667581e4be
13 files changed
+301 -27

No files matched your search

+33 -9
View File
@@ -16,11 +16,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include "PS2Etypes.h"
#include <errno.h>
#include <string>
using namespace std;
#include "DEV9.h"
const unsigned char version = PS2E_DEV9_VERSION;
@@ -28,9 +29,11 @@ const unsigned char revision = 0;
const unsigned char build = 4; // increase that with each version
const char *libraryName = "DEV9null Driver";
string s_strIniPath="inis/DEV9null.ini";
void (*DEV9irq)();
void (*DEV9irq)(int);
FILE *dev9Log;
Config conf;
EXPORT_C_(u32) PS2EgetLibType()
{
@@ -47,10 +50,12 @@ EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
return (version<<16) | (revision<<8) | build;
}
void __Log(char *fmt, ...)
void __Log(char *fmt, ...)
{
va_list list;
if (!conf.Log || dev9Log == NULL) return;
va_start(list, fmt);
vfprintf(dev9Log, fmt, list);
va_end(list);
@@ -58,11 +63,23 @@ void __Log(char *fmt, ...)
EXPORT_C_(s32) DEV9init()
{
LoadConfig();
#ifdef DEV9_LOG
dev9Log = fopen("logs/dev9Log.txt", "w");
if (dev9Log) setvbuf(dev9Log, NULL, _IONBF, 0);
DEV9_LOG("dev9null plugin version %d,%d\n", revision, build);
DEV9_LOG("DEV9init\n");
#endif
return 0;
}
EXPORT_C_(void) DEV9shutdown()
{
#ifdef DEV9_LOG
if (dev9Log) fclose(dev9Log);
#endif
}
EXPORT_C_(s32) DEV9open(void *pDsp)
@@ -77,42 +94,50 @@ EXPORT_C_(void) DEV9close()
EXPORT_C_(u8) DEV9read8(u32 addr)
{
DEV9_LOG("*Unknown 8bit read at address %lx ", addr);
return 0;
}
EXPORT_C_(u16 ) DEV9read16(u32 addr)
{
DEV9_LOG("*Unknown 16bit read at address %lx ", addr);
return 0;
}
EXPORT_C_(u32 ) DEV9read32(u32 addr)
{
DEV9_LOG("*Unknown 32bit read at address %lx ", addr);
return 0;
}
EXPORT_C_(void) DEV9write8(u32 addr, u8 value)
{
DEV9_LOG("*Unknown 8bit write at address %lx value %x\n", addr, value);
}
EXPORT_C_(void) DEV9write16(u32 addr, u16 value)
{
DEV9_LOG("*Unknown 16bit write at address %lx value %x\n", addr, value);
}
EXPORT_C_(void) DEV9write32(u32 addr, u32 value)
{
DEV9_LOG("*Unknown 32bit write at address %lx value %x\n", addr, value);
}
EXPORT_C_(void) DEV9readDMA8Mem(u32 *pMem, int size)
{
DEV9_LOG("Reading DMA8 Mem.");
}
EXPORT_C_(void) DEV9writeDMA8Mem(u32* pMem, int size)
{
DEV9_LOG("Writing DMA8 Mem.");
}
EXPORT_C_(void) DEV9irqCallback(DEV9callback callback)
{
DEV9irq = callback;
}
EXPORT_C_(DEV9handler) DEV9irqHandler(void)
@@ -127,6 +152,7 @@ EXPORT_C_(s32) DEV9test()
return 0;
}
#ifdef _WIN32
EXPORT_C_(void) DEV9configure()
{
SysMessage("Nothing to Configure");
@@ -136,8 +162,6 @@ EXPORT_C_(void) DEV9about()
{
}
#ifdef _WIN32
HINSTANCE hInst;
void SysMessage(const char *fmt, ...)