[mupen64plus-video-z64] 116/161: Imported Upstream version 1.99.5+24+f331e66fc630

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:20:36 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-z64.

commit f5850100bb05aea41e20d4e28478ea3cd239909f
Author: Sven Eckelmann <sven at narfation.org>
Date:   Wed Jun 5 11:05:34 2013 +0200

    Imported Upstream version 1.99.5+24+f331e66fc630
---
 projects/unix/Makefile   | 90 ++++++++++++++++++++++--------------------------
 src/maingl.cpp           | 12 +++++--
 src/rgl_osdep.cpp        |  3 +-
 src/video_api_export.ver |  1 +
 4 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/projects/unix/Makefile b/projects/unix/Makefile
index 55eb43a..b0dc002 100644
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -119,24 +119,18 @@ ifeq ("$(CPU)","NONE")
 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
 CXXFLAGS += -fvisibility-inlines-hidden
 LDFLAGS += $(SHARED)
 
-# default configuration programs
-SDL_CONFIG = $(CROSS_COMPILE)sdl-config
-PKG_CONFIG = $(CROSS_COMPILE)pkg-config
-
 # Since we are building a shared library, we must compile with -fPIC on some architectures
 # 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)
@@ -149,7 +143,7 @@ ifeq ($(ARCH_DETECTED), 64BITS_32)
     $(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
   endif
   CFLAGS += -m32
-  LDFLAGS += -m32 -Wl,-m,elf_i386
+  LDFLAGS += -Wl,-m,elf_i386
 endif
 
 # set special flags per-system
@@ -173,11 +167,11 @@ ifeq ($(OS), OSX)
   ifeq ($(CPU), X86)
     ifeq ($(ARCH_DETECTED), 64BITS)
       CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
-      LDFLAGS += -bundle -arch x86_64
+      LDFLAGS += -bundle
       LDLIBS += -ldl
     else
       CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
-      LDFLAGS += -bundle -arch i686
+      LDFLAGS += -bundle
       LDLIBS += -ldl
     endif
   endif
@@ -190,54 +184,58 @@ ifeq ($(OS), FREEBSD)
 endif
 
 # test for essential build dependencies
-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
-  $(error $(PKG_CONFIG) not found)
+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 glew 2>/dev/null),)
-  $(error No GLEW development libraries found!)
+
+ifeq ($(origin GLEW_CFLAGS) $(origin GLEW_LDLIBS), undefined undefined)
+  ifeq ($(shell $(PKG_CONFIG) --modversion glew 2>/dev/null),)
+    (error No GLEW development libraries found!)
+  endif
+  GLEW_CFLAGS += $(shell $(PKG_CONFIG) --cflags glew)
+  GLEW_LDLIBS +=  $(shell $(PKG_CONFIG) --libs glew)
 endif
-CFLAGS += $(shell $(PKG_CONFIG) --cflags glew)
-LDLIBS += $(shell $(PKG_CONFIG) --libs glew)
+CFLAGS += $(GLEW_CFLAGS)
+LDLIBS += $(GLEW_LDLIBS)
 
 # search for OpenGL libraries
-GL_LIBS=
 ifeq ($(OS), OSX)
-  GL_LIBS = -framework OpenGL
+  GL_LDLIBS = -framework OpenGL
 endif
 ifeq ($(OS), MINGW)
-  GL_LIBS = -lopengl32
+  GL_LDLIBS = -lopengl32
 endif
-ifeq ("$(GL_LIBS)", "")
+ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
   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
-LDLIBS += $(GL_LIBS)
+CFLAGS += $(GL_CFLAGS)
+LDLIBS += $(GL_LDLIBS)
 
 # test for presence of SDL
-ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
-  $(error No SDL development libraries found!)
-endif
-ifeq ($(OS),FREEBSD)
-    CFLAGS  += $(shell $(SDL_CONFIG) --cflags)
-    LDLIBS += $(shell $(SDL_CONFIG) --libs)
-endif
-ifeq ($(OS),OSX)
-    CFLAGS  += $(shell $(SDL_CONFIG) --cflags)
+ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
+  SDL_CONFIG = $(CROSS_COMPILE)sdl-config
+  ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
+    $(error No SDL development libraries found!)
+  endif
+  ifeq ($(OS),OSX)
+    SDL_CFLAGS  += $(shell $(SDL_CONFIG) --cflags)
     # sdl-config on mac screws up when we're trying to build a library and not an executable
     # SDL 1.3 is supposed to fix that, if it's ever released
-    LDLIBS += -L/usr/local/lib -lSDL -Wl,-framework,Cocoa
-endif
-ifeq ($(OS),LINUX)
-    CFLAGS  += $(shell $(SDL_CONFIG) --cflags)
-    LDLIBS += $(shell $(SDL_CONFIG) --libs)
-endif
-ifeq ($(OS), MINGW)
-  CFLAGS += $(shell $(SDL_CONFIG) --cflags)
-  LDLIBS += $(shell $(SDL_CONFIG) --libs)
+    SDL_LDLIBS += -L/usr/local/lib -lSDL -Wl,-framework,Cocoa
+  else
+    SDL_CFLAGS  += $(shell $(SDL_CONFIG) --cflags)
+    SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
+  endif
 endif
+CFLAGS += $(SDL_CFLAGS)
+LDLIBS += $(SDL_LDLIBS)
 
 # set mupen64plus core API header path
 ifneq ("$(APIDIR)","")
@@ -278,7 +276,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)
@@ -345,7 +343,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: '')"
@@ -357,7 +355,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)
@@ -380,11 +377,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/maingl.cpp b/src/maingl.cpp
index b27e98d..9a0142e 100644
--- a/src/maingl.cpp
+++ b/src/maingl.cpp
@@ -27,9 +27,9 @@
 #define THREADED
 
 #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)
 
@@ -47,6 +47,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;
@@ -159,13 +160,14 @@ extern "C" {
         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)
         {
             rdp_log(M64MSG_ERROR, "Couldn't connect to Core video functions");
             return M64ERR_INCOMPATIBLE;
@@ -301,6 +303,10 @@ extern "C" {
         return;
     }
 
+    EXPORT void CALL ResizeVideoOutput(int Width, int Height)
+    {
+    }
+
     EXPORT void CALL RomClosed (void)
     {
 #ifdef THREADED
diff --git a/src/rgl_osdep.cpp b/src/rgl_osdep.cpp
index 78cc7e1..2f6d120 100644
--- a/src/rgl_osdep.cpp
+++ b/src/rgl_osdep.cpp
@@ -34,6 +34,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;
@@ -82,7 +83,7 @@ int rglOpenScreen()
         return 0;
     }
 
-    if (CoreVideo_SetVideoMode(screen_width, screen_height, 32, screen_mode) != M64ERR_SUCCESS)
+    if (CoreVideo_SetVideoMode(screen_width, screen_height, 32, screen_mode, (m64p_video_flags) 0) != M64ERR_SUCCESS)
     {
         rdp_log(M64MSG_ERROR, "Could not set video mode.");
         return 0;
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-z64.git



More information about the Pkg-games-commits mailing list