2 * This file is part of NumptyPhysics
3 * Copyright (C) 2008 Tim Edmonds
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 3 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
23 #include <SDL/SDL_syswm.h>
27 class OsWin32
: public Os
36 HINSTANCE handle
= GetModuleHandle(NULL
);
37 icon
= LoadIcon(handle
, MAKEINTRESOURCE(1));
39 SDL_VERSION(&wminfo
.version
);
40 if(SDL_GetWMInfo(&wminfo
) != 1) {
41 //error wrong SDL version
44 SetClassLong(hwnd
, GCL_HICON
, (LONG
)icon
);
52 virtual bool openBrowser( const char* url
)
67 const char Os::pathSep
= '\\';
72 * For Windows, we have to define "WinMain" instead of the
73 * usual "main" in order to get a graphical application without
74 * the console window that normally pops up otherwise
76 int WINAPI
WinMain(HINSTANCE hInstance
, HINSTANCE hPrevInstance
,
77 LPSTR lpCmdLine
, int nCmdShow
)
79 //TODO - pass level args here...