mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-04 02:24:00 +00:00
Merge branch 'vs15' into controllerfixup
This commit is contained in:
commit
84da02e4aa
8 changed files with 51 additions and 60 deletions
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
#define WIN32_NOMINMAX
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1600
|
||||
#define strtof (float)strtod
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4786)
|
||||
#pragma warning(disable:4005)
|
||||
//#pragma warning(disable:4005)
|
||||
#pragma warning(disable:4305)
|
||||
|
||||
#pragma warning(disable:4018) // signed/unsigned mismatch
|
||||
|
|
|
@ -65,37 +65,10 @@ Core *core = 0;
|
|||
|
||||
static std::ofstream _logOut;
|
||||
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
HICON icon_windows = 0;
|
||||
#endif
|
||||
|
||||
#ifndef KMOD_GUI
|
||||
#define KMOD_GUI KMOD_META
|
||||
#endif
|
||||
|
||||
void Core::initIcon()
|
||||
{
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
HINSTANCE handle = ::GetModuleHandle(NULL);
|
||||
|
||||
|
||||
|
||||
icon_windows = ::LoadIcon(handle, "icon");
|
||||
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(&wminfo.version)
|
||||
if (SDL_GetWindowWMInfo(gScreen, &wminfo) != 1)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
HWND hwnd = wminfo.info.win.window;
|
||||
|
||||
::SetClassLong(hwnd, GCL_HICON, (LONG) icon_windows);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Core::resetCamera()
|
||||
{
|
||||
cameraPos = Vector(0,0);
|
||||
|
@ -785,7 +758,7 @@ bool Core::initGraphicsLibrary(int width, int height, bool fullscreen, int vsync
|
|||
|
||||
setWindowCaption(appName, appName);
|
||||
|
||||
initIcon();
|
||||
initIcon(gScreen);
|
||||
// Create window
|
||||
|
||||
setSDLGLAttributes();
|
||||
|
@ -990,14 +963,7 @@ void Core::shutdownGraphicsLibrary(bool killVideo)
|
|||
|
||||
lib_graphics = false;
|
||||
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
if (icon_windows)
|
||||
{
|
||||
::DestroyIcon(icon_windows);
|
||||
icon_windows = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
destroyIcon();
|
||||
}
|
||||
|
||||
void Core::quit()
|
||||
|
|
|
@ -478,8 +478,6 @@ protected:
|
|||
|
||||
int virtualOffX, virtualOffY;
|
||||
|
||||
void initIcon();
|
||||
|
||||
float old_dt;
|
||||
float current_dt;
|
||||
|
||||
|
|
21
BBGE/GL/gl.h
21
BBGE/GL/gl.h
|
@ -31,7 +31,10 @@ extern "C" {
|
|||
** the United States.
|
||||
*/
|
||||
|
||||
#ifndef APIENTRY
|
||||
#undef APIENTRY
|
||||
#ifdef _WIN32
|
||||
#define APIENTRY __stdcall
|
||||
#else
|
||||
#define APIENTRY
|
||||
#endif
|
||||
|
||||
|
@ -44,17 +47,6 @@ extern "C" {
|
|||
#undef WINGDIAPI
|
||||
#define WINGDIAPI extern
|
||||
|
||||
|
||||
|
||||
#ifndef GLAPI
|
||||
# ifdef _WIN32
|
||||
# define GLAPI __stdcall
|
||||
# else
|
||||
# define GLAPI
|
||||
# endif
|
||||
# define __DEFINED_GLAPI
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
typedef unsigned int GLenum;
|
||||
|
@ -1628,11 +1620,6 @@ WINGDIAPI void APIENTRY glVertex4sv (const GLshort *v);
|
|||
WINGDIAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
WINGDIAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __DEFINED_GLAPI
|
||||
# undef GLAPI
|
||||
# undef __DEFINED_GLAPI
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "ttvfs_stdio.h"
|
||||
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
//# define WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_NOMINMAX
|
||||
# include <windows.h>
|
||||
# undef min
|
||||
|
@ -49,6 +49,43 @@ static std::string _CFToStdString(CFStringRef cs)
|
|||
#endif
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
static HICON icon_windows = 0;
|
||||
#endif
|
||||
|
||||
void initIcon(void *screen)
|
||||
{
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
HINSTANCE handle = ::GetModuleHandle(NULL);
|
||||
if(!icon_windows)
|
||||
icon_windows = ::LoadIcon(handle, "icon");
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(&wminfo.version)
|
||||
|
||||
#ifdef BBGE_BUILD_SDL2
|
||||
SDL_GetWindowWMInfo((SDL_Window*)screen, &wminfo);
|
||||
#else
|
||||
SDL_GetWindowWMInfo((SDL_Surface*)screen, &wminfo);
|
||||
#endif
|
||||
|
||||
HWND hwnd = wminfo.info.win.window;
|
||||
::SetClassLongPtr(hwnd, -14, (LONG) icon_windows); // -14 is GCL_HICON (32bit) or GCLP_HICON (64bit)
|
||||
#endif
|
||||
}
|
||||
|
||||
void destroyIcon()
|
||||
{
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
if (icon_windows)
|
||||
{
|
||||
::DestroyIcon(icon_windows);
|
||||
icon_windows = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void openURL(const std::string &url)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
void initIcon(void *screen);
|
||||
void destroyIcon();
|
||||
void messageBox(const std::string &title, const std::string& msg);
|
||||
void forEachFile(const std::string& inpath, std::string type, void callback(const std::string &filename, intptr_t param), intptr_t param);
|
||||
std::string adjustFilenameCase(const char *_buf);
|
||||
|
|
|
@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "MathFunctions.h"
|
||||
#include "Base.h"
|
||||
#include <float.h>
|
||||
#include <algorithm>
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
|
|||
OPTION(AQUARIA_DEMO_BUILD "Demo Build?" FALSE)
|
||||
OPTION(AQUARIA_USE_VFS "Use Virtual File System? Required for some additional features." TRUE)
|
||||
|
||||
OPTION(AQUARIA_USE_SDL2 "Use SDL2" FALSE)
|
||||
OPTION(AQUARIA_USE_SDL2 "Use SDL2" TRUE)
|
||||
OPTION(AQUARIA_USE_GLM "Use GLM for matrix math" TRUE)
|
||||
|
||||
# No Steamworks SDK for Linux at the moment. Roll our own achievements.
|
||||
|
@ -393,7 +393,6 @@ SET(AQUARIA_SRCS
|
|||
${SRCDIR}/AquariaMenuItem.cpp
|
||||
${SRCDIR}/AquariaProgressBar.cpp
|
||||
${SRCDIR}/AquariaSaveSlot.cpp
|
||||
${SRCDIR}/AutoMap.cpp
|
||||
${SRCDIR}/Avatar.cpp
|
||||
${SRCDIR}/Beam.cpp
|
||||
${SRCDIR}/BitBlotLogo.cpp
|
||||
|
@ -482,6 +481,7 @@ SET(BBGE_SRCS
|
|||
${BBGEDIR}/Event.cpp
|
||||
${BBGEDIR}/FrameBuffer.cpp
|
||||
${BBGEDIR}/Gradient.cpp
|
||||
${BBGEDIR}/GLLoad.cpp
|
||||
${BBGEDIR}/Joystick.cpp
|
||||
${BBGEDIR}/LensFlare.cpp
|
||||
${BBGEDIR}/Localization.cpp
|
||||
|
|
Loading…
Add table
Reference in a new issue