wx port vcproj

This commit is contained in:
zeromus 2010-02-04 06:22:54 +00:00
parent 99401dd1f4
commit e48bd707f3
23 changed files with 1819 additions and 30 deletions

View File

@ -550,7 +550,7 @@ void DrawHUD()
drawPad(Hud.GraphicalInputDisplay.x, Hud.GraphicalInputDisplay.y, 2.5);
}
#ifdef WIN32
#if defined(WIN32) && !defined(WXPORT)
if (CommonSettings.hud.ShowMicrophone)
{
osd->addFixed(Hud.Microphone.x, Hud.Microphone.y, "%03d [%07d]",MicDisplay, Hud.cpuloopIterationCount);

View File

@ -33,7 +33,7 @@
#include <string>
#ifdef WIN32
#if defined(WIN32) && !defined(WXPORT)
#include "pathsettings.h"
#endif

View File

@ -44,7 +44,7 @@ static void ENDGL() {
oglrender_endOpenGL();
}
#ifdef _WIN32
#ifdef _WIN32 && !defined(WXPORT)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <GL/gl.h>

View File

@ -11,12 +11,14 @@
#include "GPU_osd.h"
#include "saves.h"
#include "emufile.h"
#ifdef WIN32
#if defined(WIN32) && !defined(WXPORT)
#include "main.h"
#include "windows.h"
#include "video.h"
#endif
using namespace std;
// functions that maybe aren't part of the Lua engine
// but didn't make sense to add to BaseDriver (at least not yet)
@ -424,7 +426,7 @@ static int doPopup(lua_State* L, const char* deftype, const char* deficon)
static const char * const titles [] = {"Notice", "Question", "Warning", "Error"};
const char* answer = "ok";
#ifdef _WIN32
#if defined(_WIN32) && !defined(WXPORT)
static const int etypes [] = {MB_OK, MB_YESNO, MB_YESNOCANCEL, MB_OKCANCEL, MB_ABORTRETRYIGNORE};
static const int eicons [] = {MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONWARNING, MB_ICONERROR};
// DialogsOpen++;
@ -1274,7 +1276,7 @@ bool luabitop_validate(lua_State *L) // originally named as luaopen_bit
if (b != (UBits)1437217655L || BAD_SAR) { /* Perform a simple self-test. */
const char *msg = "compiled with incompatible luaconf.h";
#ifdef LUA_NUMBER_DOUBLE
#ifdef _WIN32
#if defined(_WIN32) && !defined(WXPORT)
if (b == (UBits)1610612736L)
msg = "use D3DCREATE_FPU_PRESERVE with DirectX";
#endif
@ -1346,7 +1348,7 @@ void indicateBusy(lua_State* L, bool busy)
lua_pop(L, 1);
}
*/
#ifdef _WIN32
#if defined(_WIN32) && !defined(WXPORT)
int uid = luaStateToUIDMap[L->l_G->mainthread];
HWND hDlg = (HWND)uid;
char str [1024];
@ -1400,7 +1402,7 @@ void LuaRescueHook(lua_State* L, lua_Debug *dbg)
if(!info.panic)
{
SPU_ClearOutputBuffer();
#if defined(ASK_USER_ON_FREEZE) && defined(_WIN32)
#if defined(ASK_USER_ON_FREEZE) && defined(_WIN32) && !defined(WXPORT)
DialogsOpen++;
int answer = MessageBox(HWnd, "A Lua script has been running for quite a while. Maybe it is in an infinite loop.\n\nWould you like to stop the script?\n\n(Yes to stop it now,\n No to keep running and not ask again,\n Cancel to keep running but ask again later)", "Lua Alert", MB_YESNOCANCEL | MB_DEFBUTTON3 | MB_ICONASTERISK);
DialogsOpen--;
@ -2508,7 +2510,7 @@ static void prepare_reading()
}
else
{
#ifdef WIN32
#if defined(WIN32) && !defined(WXPORT)
extern VideoInfo video;
curGuiData.data = video.buffer;
curGuiData.stridePix = 256;
@ -3356,7 +3358,7 @@ static void GetCurrentScriptDir(char* buffer, int bufLen)
DEFINE_LUA_FUNCTION(emu_openscript, "filename")
{
#ifdef WIN32
#if defined(WIN32) && !defined(WXPORT)
char curScriptDir[1024]; GetCurrentScriptDir(curScriptDir, 1024); // make sure we can always find scripts that are in the same directory as the current script
const char* filename = lua_isstring(L,1) ? lua_tostring(L,1) : NULL;
extern const char* OpenLuaScript(const char* filename, const char* extraDirToCheck, bool makeSubservient);
@ -3536,7 +3538,7 @@ DEFINE_LUA_FUNCTION(sound_clear, "")
return 0;
}
#ifdef _WIN32
#if defined(_WIN32) && !defined(WXPORT)
const char* s_keyToName[256] =
{
NULL,
@ -3650,7 +3652,7 @@ DEFINE_LUA_FUNCTION(input_getcurrentinputstatus, "")
{
lua_newtable(L);
#ifdef _WIN32
#if defined(_WIN32) && !defined(WXPORT)
// keyboard and mouse button status
{
int BackgroundInput = 0;//TODO

View File

@ -1,6 +1,6 @@
#include <string>
#ifdef WIN32
#if defined(WIN32) && !defined(WXPORT)
#include "resource.h"
#else
#include <glib.h>
@ -312,7 +312,7 @@ public:
enum ImageFormat
{
#ifdef WIN32
#if defined(WIN32) && !defined(WXPORT)
PNG = IDC_PNG,
BMP = IDC_BMP
#else

View File

@ -21,7 +21,7 @@
#include "version.h"
//todo - everyone will want to support this eventually, i suppose
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(WXPORT)
#include "svnrev.h"
#else
#ifdef SVN_REV

View File

@ -32,7 +32,9 @@
#include <ws2tcpip.h>
#define socket_t SOCKET
#define sockaddr_t SOCKADDR
#include "windriver.h"
#ifndef WXPORT
#include "windriver.h"
#endif
#else
#include <unistd.h>
#include <stdlib.h>

View File

@ -48,6 +48,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="0"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="false"
@ -1576,6 +1577,14 @@
<File
RelativePath="..\wxdlg\wxdlg3dViewer.cpp"
>
<FileConfiguration
Name="Release FastBuild|Win32"
>
<Tool
Name="VCCLCompilerTool"
GeneratePreprocessedFile="1"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\wxdlg\wxdlg3dViewer.h"

View File

@ -1,6 +1,8 @@
#ifndef _CONFIG_H
#define _CONFIG_H
#if !defined(WXPORT)
#include "userconfig.h"
#endif
#endif

BIN
desmume/src/wx/7z.dll Normal file

Binary file not shown.

BIN
desmume/src/wx/7z.exe Normal file

Binary file not shown.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
name="DeSmuME"
processorArchitecture="amd64"
version="1.0.0.0"
type="win32"/>
<description>DeSmuME</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
name="DeSmuME"
processorArchitecture="x86"
version="1.0.0.0"
type="win32"/>
<description>DeSmuME</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

View File

@ -18,7 +18,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <string.h>
#include <string>
#include <vector>

View File

@ -26,7 +26,7 @@
#include <stdio.h>
#define DIRECTINPUT_VERSION 0x0800 // DirectInput
#include <dinput.h>
#include <directx/dinput.h>
//#include "ConsoleWindow.h" // Common

View File

@ -2,7 +2,7 @@
#include <stdio.h>
#include <ctype.h>
#if defined HAVE_WX && HAVE_WX
#if defined(HAVE_WX)
#include <wx/wx.h>
#endif
@ -98,7 +98,7 @@ bool EventHandler::TestEvent (Keys k, sf::Event e)
return (false);
}
#if defined HAVE_WX && HAVE_WX
#if defined(HAVE_WX)
// Taken from wxw source code
sf::Key::Code EventHandler::wxCharCodeToSF(int id)
{

View File

@ -54,7 +54,7 @@ public:
static void Destroy();
bool addEvent(sf::Event *e);
static bool TestEvent (Keys k, sf::Event e);
#if defined HAVE_WX && HAVE_WX
#if defined(HAVE_WX)
static sf::Key::Code wxCharCodeToSF(int id);
#endif
static void SFKeyToString(sf::Key::Code keycode, char *keyStr);

View File

@ -30,7 +30,7 @@
//#include "FileUtil.h"
//#include "ChunkFile.h"
#if defined(HAVE_WX) && HAVE_WX
#if defined(HAVE_WX)
#include "GUI/ConfigDlg.h"
PADConfigDialogSimple* m_ConfigFrame = NULL;
#endif
@ -68,7 +68,7 @@ SPADInitialize g_PADInitialize;
#ifdef _WIN32
//HINSTANCE g_hInstance;
#if defined(HAVE_WX) && HAVE_WX
#if defined(HAVE_WX)
class wxDLLApp : public wxApp
{
bool OnInit()
@ -88,7 +88,7 @@ BOOL APIENTRY aMain(HINSTANCE hinstDLL, // DLL module handle
{
case DLL_PROCESS_ATTACH:
{
#if defined(HAVE_WX) && HAVE_WX
#if defined(HAVE_WX)
wxSetInstance((HINSTANCE)hinstDLL);
int argc = 0;
char **argv = NULL;
@ -100,7 +100,7 @@ BOOL APIENTRY aMain(HINSTANCE hinstDLL, // DLL module handle
break;
case DLL_PROCESS_DETACH:
#if defined(HAVE_WX) && HAVE_WX
#if defined(HAVE_WX)
wxEntryCleanup();
#endif
break;
@ -113,7 +113,7 @@ BOOL APIENTRY aMain(HINSTANCE hinstDLL, // DLL module handle
}
#endif
#if defined(HAVE_WX) && HAVE_WX
#if defined(HAVE_WX)
wxWindow* GetParentedWxWindow(HWND Parent)
{
#ifdef _WIN32

BIN
desmume/src/wx/touch.exe Normal file

Binary file not shown.

View File

@ -0,0 +1,2 @@
7z x -bd -y -o.libs %1
touch %2 %3 %4 %5 %6 %7 %8 %9

View File

@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxDeSmuME_VS2008", "wxDeSmuME_2008.vcproj", "{9F5F72A1-D3A5-4918-B460-E076B16D10A9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Dev+|Win32 = Dev+|Win32
Dev+|x64 = Dev+|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Debug|Win32.ActiveCfg = Debug|Win32
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Debug|Win32.Build.0 = Debug|Win32
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Debug|x64.ActiveCfg = Debug|x64
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Debug|x64.Build.0 = Debug|x64
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Dev+|Win32.ActiveCfg = Dev+|Win32
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Dev+|Win32.Build.0 = Dev+|Win32
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Dev+|x64.ActiveCfg = Dev+|x64
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Dev+|x64.Build.0 = Dev+|x64
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|Win32.ActiveCfg = Release|Win32
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|Win32.Build.0 = Release|Win32
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|x64.ActiveCfg = Release|x64
{9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,10 @@
#include "rasterize.h"
#include "OGLRender.h"
#ifdef WIN32
#include "snddx.h"
#endif
#include <wx/stdpaths.h>
#include "LuaWindow.h"
@ -31,7 +35,7 @@
SoundInterface_struct *SNDCoreList[] = {
&SNDDummy,
#ifdef WIN32
&SNDDIRECTX,
// &SNDDIRECTX,
#else
&SNDSDL,
#endif
@ -39,10 +43,12 @@ SoundInterface_struct *SNDCoreList[] = {
};
GPU3DInterface *core3DList[] = {
&gpu3DNull,
&gpu3Dgl,
&gpu3DRasterize,
NULL
#ifndef WIN32
&gpu3Dgl,
#endif
&gpu3DNull,
NULL
};
/* lua stuff stubs */
@ -93,7 +99,11 @@ public:
SPADStatus s;
memset(&s,0,sizeof(s));
//TODO !!!!!!!!!!!!!!!!!!!!!! FIXME!!!!!!!!!!1
#ifndef _MSC_VER
PAD_GetStatus(0, &s);
#endif
if(s.button & PAD_BUTTON_LEFT)
left = true;
@ -309,7 +319,9 @@ public:
void OnOpenControllerConfiguration(wxCommandEvent& WXUNUSED (event))
{
#ifndef _MSC_VER
new PADConfigDialogSimple(this);
#endif
}
wxMenu* MakeStatesSubMenu( int baseid ) const
@ -438,6 +450,7 @@ bool Desmume::OnInit()
Desmume_InitOnce();
aggDraw.hud->attach((u8*)GPU_screen, 256, 384, 1024);//TODO
NDS_3D_ChangeCore(0);
#ifdef __WIN32__
extern void OpenConsole();
@ -459,7 +472,9 @@ bool Desmume::OnInit()
SPADInitialize PADInitialize;
PADInitialize.padNumber = 1;
extern void Initialize(void *init);
#ifndef _WIN32
Initialize(&PADInitialize);
#endif
//TODO
addon_type = NDS_ADDON_NONE;
@ -561,3 +576,22 @@ DesmumeFrame::DesmumeFrame(const wxString& title)
// CreateStatusBar(2);
// SetStatusText("Welcome to Desmume!");
}
#ifdef _WIN32
/*
* The thread handling functions needed by the GDB stub code.
*/
void *
createThread_gdb( void (APIENTRY *thread_function)( void *data),
void *thread_data) {
void *new_thread = CreateThread( NULL, 0,
(LPTHREAD_START_ROUTINE)thread_function, thread_data,
0, NULL);
return new_thread;
}
void
joinThread_gdb( void *thread_handle) {
}
#endif