From 28da6e1df50c4074b4b9be6d06dbe9c73d44454d Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Tue, 23 Sep 2008 14:32:43 +0000 Subject: [PATCH] win port: - Rewrite all debug tools forgot files :( --- desmume/src/common.cpp | 56 ++++++++++++++++++++ desmume/src/common.h | 42 +++++++++++++++ desmume/src/windows/NintendoDS(tm)_logo.bmp | Bin 0 -> 15574 bytes 3 files changed, 98 insertions(+) create mode 100644 desmume/src/common.cpp create mode 100644 desmume/src/common.h create mode 100644 desmume/src/windows/NintendoDS(tm)_logo.bmp diff --git a/desmume/src/common.cpp b/desmume/src/common.cpp new file mode 100644 index 000000000..df9aa145e --- /dev/null +++ b/desmume/src/common.cpp @@ -0,0 +1,56 @@ +/* Copyright (C) 2006 yopyop + yopyop156@ifrance.com + yopyop156.ifrance.com + + Copyright (C) 2006-2008 DeSmuME team + + This file is part of DeSmuME + + DeSmuME is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DeSmuME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DeSmuME; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "common.h" + +#ifdef WIN32 + +char IniName[MAX_PATH]; + +void GetINIPath() +{ + char vPath[MAX_PATH], *szPath, currDir[MAX_PATH]; + /*if (*vPath) + szPath = vPath; + else + {*/ + char *p; + ZeroMemory(vPath, sizeof(vPath)); + GetModuleFileName(NULL, vPath, sizeof(vPath)); + p = vPath + lstrlen(vPath); + while (p >= vPath && *p != '\\') p--; + if (++p >= vPath) *p = 0; + szPath = vPath; + //} + if (strlen(szPath) + strlen("\\desmume.ini") < MAX_PATH) + { + sprintf(IniName, "%s\\desmume.ini",szPath); + } else if (MAX_PATH> strlen(".\\desmume.ini")) { + sprintf(IniName, ".\\desmume.ini",szPath); + } else + { + memset(IniName,0,MAX_PATH) ; + } +} + +#endif \ No newline at end of file diff --git a/desmume/src/common.h b/desmume/src/common.h new file mode 100644 index 000000000..679d4ea91 --- /dev/null +++ b/desmume/src/common.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2006 yopyop + yopyop156@ifrance.com + yopyop156.ifrance.com + + Copyright (C) 2006-2008 DeSmuME team + + This file is part of DeSmuME + + DeSmuME is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DeSmuME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DeSmuME; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _COMMON_H_ +#define _COMMON_H_ + +#include + +#ifdef WIN32 +#include + +#define CLASSNAME "DeSmuME" +#define TITLE "DeSmuME v"VERSION + +extern HINSTANCE hAppInst; +//char vPath[MAX_PATH], *szPath, currDir[MAX_PATH]; + +extern char IniName[MAX_PATH]; +extern void GetINIPath(); +#endif + +#endif \ No newline at end of file diff --git a/desmume/src/windows/NintendoDS(tm)_logo.bmp b/desmume/src/windows/NintendoDS(tm)_logo.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b5078c3f88f05b490cba8faf07e8237913ff9df9 GIT binary patch literal 15574 zcmeI2UuYaf9LJ~WrEWBpYcOr&OU?+ko|QyT>`59f+9I^6woy|lJ|rl~LmrG$u>o6l zrC`$*!3h16rydB=q^O13hctvcRM2WLfnZYz>75T6sz``uvWDdH^Y@#Xy-QYM815)2 z^9#4TGxOW|?)Ni)?vBed&)wL?c)X3r?fANduhaNi#{zg{tWCDlb&w7if%O4)>hvkL zci&!i{rYvbZTmJhFfhQ{+uPa9%naMI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