[mupen64plus-video-arachnoid] 110/147: Imported Upstream version 1.99.5+22+711f2d8cbdcd
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:09:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch master
in repository mupen64plus-video-arachnoid.
commit 7fa87ba0b24b2a057b73d4e6be753d2f23cf193b
Author: Sven Eckelmann <sven at narfation.org>
Date: Wed Jun 5 11:05:20 2013 +0200
Imported Upstream version 1.99.5+22+711f2d8cbdcd
---
projects/unix/Makefile | 47 ++++++++++++++++++++++-------------------------
src/GraphicsPlugin.cpp | 2 +-
src/m64p.h | 1 +
src/main.cpp | 18 +++++++++++++++---
src/video_api_export.ver | 1 +
5 files changed, 40 insertions(+), 29 deletions(-)
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
index f624a9d..0be1822 100755
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -109,7 +109,7 @@ ifneq ("$(filter arm%,$(HOST_CPU))","")
endif
# base CFLAGS, LDLIBS, and LDFLAGS
-OPTFLAGS ?= -O3
+OPTFLAGS ?= -O3 -flto
WARNFLAGS ?= -Wall
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src \
-I../../src/hash -I../../src/ucodes -I../../src/GBI -I../../src/RDP -I../../src/utils \
@@ -118,9 +118,6 @@ CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility
CXXFLAGS += -fvisibility-inlines-hidden
LDFLAGS += $(SHARED)
-# default configuration programs
-PKG_CONFIG = $(CROSS_COMPILE)pkg-config
-
# On OS X, add a few extra flags to elegantly support cross-compilation and backward
# compatibility (and also the flags to link against OpenGL)
ifeq ($(OS), OSX)
@@ -139,31 +136,39 @@ ifeq ($(OS), OSX)
ifeq ($(CPU), X86)
ifeq ($(ARCH_DETECTED), 64BITS)
CFLAGS += -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
- LDFLAGS += -bundle -framework OpenGL -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
+ LDFLAGS += -bundle
else
CFLAGS += -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
- LDFLAGS += -bundle -framework OpenGL -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
+ LDFLAGS += -bundle
endif
endif
else
# search for OpenGL libraries
- GL_LIBS=
+ ifeq ($(OS), OSX)
+ GL_LDLIBS = -framework OpenGL
+ endif
ifeq ($(OS), MINGW)
- GL_LIBS = -lopengl32
+ GL_LDLIBS = -lopengl32
endif
- ifeq ("$(GL_LIBS)", "")
- ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
- $(error $(PKG_CONFIG) not found)
+
+ ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
+ ifeq ($(origin PKG_CONFIG), undefined)
+ PKG_CONFIG = $(CROSS_COMPILE)pkg-config
+ ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
+ $(error $(PKG_CONFIG) not found)
+ endif
endif
+
ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),)
$(error No OpenGL development libraries found!)
endif
- CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
- GL_LIBS = $(shell $(PKG_CONFIG) --libs gl)
+ GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
+ GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl)
endif
+ CFLAGS += $(GL_CFLAGS)
+ LDLIBS += $(GL_LDLIBS)
CFLAGS += -pthread
- LDLIBS += -pthread $(GL_LIBS)
endif
ifeq ($(OS), LINUX)
LDLIBS += -ldl
@@ -177,10 +182,8 @@ endif
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
ifeq ($(PIC), 1)
CFLAGS += -fPIC
- LDFLAGS += -fPIC
else
CFLAGS += -fno-PIC
- LDFLAGS += -fno-PIC
endif
ifeq ($(BIG_ENDIAN), 1)
@@ -217,7 +220,7 @@ ifneq ($(OS), FREEBSD)
# tweak flags for 32-bit build on 64-bit system
ifeq ($(ARCH_DETECTED), 64BITS_32)
CFLAGS += -m32
- LDFLAGS += -m32 -Wl,-m,elf_i386
+ LDFLAGS += -Wl,-m,elf_i386
endif
endif
else
@@ -243,7 +246,7 @@ INSTALL ?= install
MKDIR ?= mkdir -p
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
-LINK.o = $(Q_LD)$(CXX) $(LDFLAGS) $(TARGET_ARCH)
+LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH)
# set special flags for given Makefile parameters
ifeq ($(DEBUG),1)
@@ -351,7 +354,7 @@ targets:
@echo " Options:"
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
- @echo " OPTFLAGS=flag == compiler optimization (default: -O3)"
+ @echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
@echo " PIC=(1|0) == Force enable/disable of position independent code"
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
@@ -362,7 +365,6 @@ targets:
@echo " DESTDIR=path == path to prepend to all installation paths (only for packagers)"
@echo " Debugging Options:"
@echo " DEBUG=1 == add debugging symbols"
- @echo " LTO=1 == enable experimental build with link-time optimization"
@echo " V=1 == show verbose compiler output"
all: $(TARGET)
@@ -383,11 +385,6 @@ CFLAGS += -MD
-include $(OBJECTS:.o=.d)
CXXFLAGS += $(CFLAGS)
-ifeq ($(LTO), 1)
- CFLAGS += -flto -ffunction-sections -fdata-sections
- CXXFLAGS += -flto -ffunction-sections -fdata-sections
- LDFLAGS += -fuse-linker-plugin -Wl,--gc-sections $(CXXFLAGS)
-endif
# standard build rules
$(OBJDIR)/%.o: $(SRCDIR)/%.c
diff --git a/src/GraphicsPlugin.cpp b/src/GraphicsPlugin.cpp
index 959c8f4..229f470 100755
--- a/src/GraphicsPlugin.cpp
+++ b/src/GraphicsPlugin.cpp
@@ -101,7 +101,7 @@ bool GraphicsPlugin::initialize(GFX_INFO* graphicsInfo)
}
if (CoreVideo_SetVideoMode(m_config->fullscreenWidth, m_config->fullscreenHeight, m_config->fullscreenBitDepth,
- m_config->startFullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED) != M64ERR_SUCCESS)
+ m_config->startFullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED, (m64p_video_flags) 0) != M64ERR_SUCCESS)
{
Logger::getSingleton().printMsg("Could not set video mode.", M64MSG_ERROR);
return false;
diff --git a/src/m64p.h b/src/m64p.h
index 2084d58..e0ce6c0 100755
--- a/src/m64p.h
+++ b/src/m64p.h
@@ -63,6 +63,7 @@ extern ptr_VidExt_ListFullscreenModes CoreVideo_ListFullscreenModes;
extern ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode;
extern ptr_VidExt_SetCaption CoreVideo_SetCaption;
extern ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen;
+extern ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow;
extern ptr_VidExt_GL_GetProcAddress CoreVideo_GL_GetProcAddress;
extern ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute;
extern ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers;
diff --git a/src/main.cpp b/src/main.cpp
index a09929d..8079901 100755
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -39,9 +39,9 @@
//Definitions
#define PLUGIN_NAME "Arachnoid Video Plugin"
#define PLUGIN_VERSION 0x016305
-#define VIDEO_PLUGIN_API_VERSION 0x020100
+#define VIDEO_PLUGIN_API_VERSION 0x020200
#define CONFIG_API_VERSION 0x020000
-#define VIDEXT_API_VERSION 0x020000
+#define VIDEXT_API_VERSION 0x030000
#define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff)
@@ -86,6 +86,7 @@ ptr_VidExt_ListFullscreenModes CoreVideo_ListFullscreenModes = NULL;
ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode = NULL;
ptr_VidExt_SetCaption CoreVideo_SetCaption = NULL;
ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen = NULL;
+ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow = NULL;
ptr_VidExt_GL_GetProcAddress CoreVideo_GL_GetProcAddress = NULL;
ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute = NULL;
ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers = NULL;
@@ -163,13 +164,14 @@ EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle CoreLibHandle, void *Con
CoreVideo_SetVideoMode = (ptr_VidExt_SetVideoMode) osal_dynlib_getproc(CoreLibHandle, "VidExt_SetVideoMode");
CoreVideo_SetCaption = (ptr_VidExt_SetCaption) osal_dynlib_getproc(CoreLibHandle, "VidExt_SetCaption");
CoreVideo_ToggleFullScreen = (ptr_VidExt_ToggleFullScreen) osal_dynlib_getproc(CoreLibHandle, "VidExt_ToggleFullScreen");
+ CoreVideo_ResizeWindow = (ptr_VidExt_ResizeWindow) osal_dynlib_getproc(CoreLibHandle, "VidExt_ResizeWindow");
CoreVideo_GL_GetProcAddress = (ptr_VidExt_GL_GetProcAddress) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_GetProcAddress");
CoreVideo_GL_SetAttribute = (ptr_VidExt_GL_SetAttribute) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_SetAttribute");
CoreVideo_GL_SwapBuffers = (ptr_VidExt_GL_SwapBuffers) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_SwapBuffers");
if (!CoreVideo_Init || !CoreVideo_Quit || !CoreVideo_ListFullscreenModes || !CoreVideo_SetVideoMode ||
!CoreVideo_SetCaption || !CoreVideo_ToggleFullScreen || !CoreVideo_GL_GetProcAddress ||
- !CoreVideo_GL_SetAttribute || !CoreVideo_GL_SwapBuffers)
+ !CoreVideo_GL_SetAttribute || !CoreVideo_GL_SwapBuffers || !CoreVideo_ResizeWindow)
{
Logger::getSingleton().printMsg("Couldn't connect to Core video functions", M64MSG_ERROR);
return M64ERR_INCOMPATIBLE;
@@ -258,6 +260,16 @@ EXPORT int CALL RomOpen()
}
//-----------------------------------------------------------------------------
+//* Resize Video Output
+//! This function is called to force us to resize our output OpenGL window.
+//! This is currently unsupported, and should never be called because we do
+//! not pass the RESIZABLE flag to VidExt_SetVideoMode when initializing.
+//-----------------------------------------------------------------------------
+EXPORT void CALL ResizeVideoOutput(int Width, int Height)
+{
+}
+
+//-----------------------------------------------------------------------------
//* Rom Closed
//! This function is called when a rom is closed.
//-----------------------------------------------------------------------------
diff --git a/src/video_api_export.ver b/src/video_api_export.ver
index 557b009..c4db656 100644
--- a/src/video_api_export.ver
+++ b/src/video_api_export.ver
@@ -15,6 +15,7 @@ ViStatusChanged;
ViWidthChanged;
ReadScreen2;
SetRenderingCallback;
+ResizeVideoOutput;
FBRead;
FBWrite;
FBGetFrameBufferInfo;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-arachnoid.git
More information about the Pkg-games-commits
mailing list