diff --git a/.gitignore b/.gitignore index 369bb4d452..7cb4fe57f0 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ .tmp .tmp.c .tmp.cxx +.moc.h +.moc.cpp config.log /.project /.externalToolBuilders/ diff --git a/.travis.yml b/.travis.yml index 6cd994d026..6fea0eee65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,9 @@ matrix: - g++-mingw-w64-i686 - mingw-w64-i686-dev script: - - CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1 + - ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib + - make + env: CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" - compiler: mingw-x64 addons: apt: @@ -18,41 +20,34 @@ matrix: - g++-mingw-w64-x86-64 - mingw-w64-x86-64-dev script: - - CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1 + - ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib + - make + env: CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" - compiler: gcc - addons: - # Install a more recent gcc than the default - apt: - packages: - - g++-7 - sources: - - ubuntu-toolchain-r-test + # Install a more recent gcc than the default + before_install: + - sudo apt-get install -y g++-8 + env: CC=gcc-8 CXX=g++-8 - compiler: clang - addons: - # Install a more recent clang than the default - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.8 - packages: - - clang-3.8 - env: COMPILER_NAME=clang-3.8 CXX=clang++-3.8 CC=clang-3.8 + # Install a more recent clang than the default + before_install: + - sudo apt-get install -y libstdc++-7-dev + - sudo apt-get install -y clang-6.0 + env: CC=clang-6.0 CXX=clang++-6.0 - os: osx osx_image: xcode8 script: - - xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj + - xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj - os: osx osx_image: xcode9.3 script: - - cd ~/ + - brew update - brew install --force-bottle qt5 - - git clone --depth=50 https://github.com/libretro/libretro-super - - cd libretro-super/travis - - ./build-retroarch-metal.sh + - xcodebuild -target RetroArchQt -configuration Release -project pkg/apple/RetroArch_Metal.xcodeproj deploy: skip_cleanup: true provider: script - script: cd ../retroarch; bash travis_metal_deploy.sh + script: bash travis_metal_deploy.sh on: branch: master @@ -67,19 +62,13 @@ env: addons: apt: packages: - - curl - - pkg-config - - libglu1-mesa-dev - - freeglut3-dev - - mesa-common-dev - - libsdl1.2-dev - - libsdl-image1.2-dev - - libsdl-mixer1.2-dev - - libsdl-ttf2.0-dev + - libsdl2-dev - libusb-1.0-0-dev - - qt5-default - - qt5-qmake - - qtbase5-dev-tools + - qtbase5-dev + - qtdeclarative5-dev + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-6.0 coverity_scan: project: name: "RetroArch" diff --git a/AUTHORS.h b/AUTHORS.h index 4863d9b0fb..c9eee84309 100644 --- a/AUTHORS.h +++ b/AUTHORS.h @@ -25,6 +25,7 @@ Amiga1200Gamer (amigagamer) Andre Leiradella (leiradel) Andrés (fr500) Anthony J. Bentley (bentley) +Antonio Jose Ramos Marquez (psxdev) AridRayne Arto Vainiolehto (arakerlu) asako (asakous) diff --git a/CHANGES.md b/CHANGES.md index d0e3a4c545..782daae2ed 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,22 +1,28 @@ # 1.7.6 (future) - ANDROID: Fix Xperia Play input binding - CHEEVOS: Reset when hardcore mode is toggled +- COMMON: Add new JSON playlist format - CORE UPDATER: Allow sideloading cores from the menu - CPU FILTERS: Add Normal2x filter. - DATE: Add Date / Time style options. - DEBUGGING: Add an integrated crash handler for debug builds (see https://docs.libretro.com/tech/debugging) - DISCORD: Register the application name properly. - DISK CONTROL: Remember the last used folder / current active folder to make disk-swapping faster. +- INPUT: Add new menu toggle (hold start button for 2 seconds) - INPUT/SDL: Flush the joypad events. Decreases cpu usage over time with the SDL joypad driver. - LOCALIZATION: Add Greek translation. - LOCALIZATION: Update German translation. - LOCALIZATION: Update Italian translation. - LOCALIZATION: Update Japanese translation. - LOCALIZATION: Update Simplified Chinese translation. +- LOCALIZATION: Update Spanish translation. - MENU: Only show CRT SwitchRes if video display server is implemented (Windows/Linux for now) - MENU: User Interface -> Appearance -> 'Menu Font Green/Blue Color' settings now work properly. - MIDI: Add a Linux ALSA driver for MIDI. - NETPLAY: Force fast-save-states when netlay is enabled +- NETPLAY: Allow quick joining subsystem lobbies +- PS2: Initial PlayStation2 port. +- PS4: Initial PlayStation4 port. - RECORDING: Implement recording options in the menu complete with quality profiles, streaming, and proper file naming - SCANNER: Fix GDI disc scanning. - SHADERS: Fix auto shader preset loading on D3D10, D3D11, D3D12 @@ -33,7 +39,10 @@ - WINDOWS: Fix an ancient bug that caused wrong mappings for keyboard arrows - WINDOWS: Remember window size and position if so desired - WINDOWS: SSL/TLS connections now work properly. - +- UWP: Initial UWP port. +- XBONE: Initial Xbox One port. +- XMB/OZONE: Add more icons +- ???: Easter Egg # 1.7.5 - CAMERA: Fix Video4Linux2 driver that broke years ago. diff --git a/Makefile b/Makefile index 5517dbb810..3243d38f0f 100644 --- a/Makefile +++ b/Makefile @@ -16,28 +16,35 @@ include config.mk TARGET = retroarch +OBJ := +LIBS := +DEF_FLAGS := +DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 +DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"' + OBJDIR_BASE := obj-unix ifeq ($(DEBUG), 1) OBJDIR := $(OBJDIR_BASE)/debug + CFLAGS ?= -O0 -g + CXXFLAGS ?= -O0 -g + DEFINES += -DDEBUG -D_DEBUG else OBJDIR := $(OBJDIR_BASE)/release + CFLAGS ?= -O3 + CXXFLAGS ?= -O3 + DEF_FLAGS += -ffast-math endif -OBJ := -LIBS := -DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"' - ifneq ($(findstring BSD,$(OS)),) - CFLAGS += -DBSD + DEF_FLAGS += -DBSD LDFLAGS += -L/usr/local/lib UDEV_CFLAGS += -I/usr/local/include/libepoll-shim UDEV_LIBS += -lepoll-shim endif ifneq ($(findstring DOS,$(OS)),) - CFLAGS += -march=i386 + DEF_FLAGS += -march=i386 LDFLAGS += -lemu endif @@ -77,15 +84,8 @@ ifneq ($(V),1) Q := @ endif -ifeq ($(DEBUG), 1) - OPTIMIZE_FLAG = -O0 -g - DEFINES += -DDEBUG -D_DEBUG -else - OPTIMIZE_FLAG = -O3 -ffast-math -endif - ifeq ($(HAVE_DRMINGW), 1) - CFLAGS += -DHAVE_DRMINGW + DEF_FLAGS += -DHAVE_DRMINGW LDFLAGS += $(DRMINGW_LIBS) endif @@ -93,10 +93,10 @@ ifneq ($(findstring Win32,$(OS)),) LDFLAGS += -mwindows endif -CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb +DEF_FLAGS += -Wall $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb -APPEND_CFLAGS := $(CFLAGS) -CXXFLAGS += $(APPEND_CFLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS +CFLAGS += $(DEF_FLAGS) +CXXFLAGS += $(DEF_FLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS OBJCFLAGS := $(CFLAGS) -D__STDC_CONSTANT_MACROS ifeq ($(HAVE_CXX), 1) @@ -171,7 +171,7 @@ all: $(TARGET) config.mk $(MOC_SRC): @$(if $(Q), $(shell echo echo MOC $<),) $(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@)) - $(Q)$(MOC) -o $(MOC_TMP) $< + $(Q)QT_SELECT=$(QT_VERSION) $(MOC) -o $(MOC_TMP) $< $(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x)) diff --git a/Makefile.common b/Makefile.common index da7cd321f6..a6bf00da77 100644 --- a/Makefile.common +++ b/Makefile.common @@ -4,7 +4,7 @@ LIBRETRO_COMM_DIR := $(ROOT_DIR)/libretro-common WANT_WGL = 0 ifeq ($(HAVE_STACK_USAGE), 1) - CFLAGS += -fstack-usage + DEF_FLAGS += -fstack-usage endif ifeq ($(HAVE_GL_CONTEXT),) @@ -31,11 +31,6 @@ ifeq ($(HAVE_VIDEO_PROCESSOR), 1) DEFINES += -DHAVE_VIDEO_PROCESSOR endif -ifeq ($(HAVE_MENU), 1) - DEFINES += -DHAVE_MENU - HAVE_MENU_COMMON = 1 -endif - ifeq ($(HAVE_SOCKET_LEGACY), 1) DEFINES += -DHAVE_SOCKET_LEGACY endif @@ -65,13 +60,11 @@ ifeq ($(HAVE_PRESERVE_DYLIB),1) endif ifeq ($(GL_DEBUG), 1) - CFLAGS += -DGL_DEBUG - CXXFLAGS += -DGL_DEBUG + DEF_FLAGS += -DGL_DEBUG endif ifeq ($(VULKAN_DEBUG), 1) - CFLAGS += -DVULKAN_DEBUG - CXXFLAGS += -DVULKAN_DEBUG + DEF_FLAGS += -DVULKAN_DEBUG endif ifeq ($(HAVE_HARD_FLOAT), 1) @@ -83,23 +76,23 @@ ifeq ($(TDM_GCC),) endif ifeq ($(HAVE_FILE_LOGGER), 1) - CFLAGS += -DHAVE_FILE_LOGGER + DEF_FLAGS += -DHAVE_FILE_LOGGER endif ifeq ($(HAVE_SHADERPIPELINE), 1) - CFLAGS += -DHAVE_SHADERPIPELINE + DEF_FLAGS += -DHAVE_SHADERPIPELINE endif -CFLAGS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR) +DEF_FLAGS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR) # Switches # ifeq ($(HAVE_NETPLAYDISCOVERY), 1) - CFLAGS += -DHAVE_NETPLAYDISCOVERY + DEF_FLAGS += -DHAVE_NETPLAYDISCOVERY endif ifeq ($(HAVE_NETLOGGER), 1) - CFLAGS += -DHAVE_LOGGER + DEF_FLAGS += -DHAVE_LOGGER DEFINES += -DHAVE_LOGGER OBJ += network/net_logger.o endif @@ -151,7 +144,7 @@ endif # General object files DEFINES += -DHAVE_DR_MP3 -CFLAGS += -DHAVE_DR_MP3 +DEF_FLAGS += -DHAVE_DR_MP3 OBJ += frontend/frontend.o \ frontend/frontend_driver.o \ @@ -196,6 +189,7 @@ OBJ += frontend/frontend.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_linux.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_unixmmap.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_windowsmmap.o \ + $(LIBRETRO_COMM_DIR)/file/nbio/nbio_orbis.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_intf.o \ $(LIBRETRO_COMM_DIR)/file/file_path.o \ file_path_special.o \ @@ -342,14 +336,14 @@ ifeq ($(HAVE_QT), 1) ui/drivers/qt/ui_qt_browser_window.o \ ui/drivers/qt/ui_qt_load_core_window.o \ ui/drivers/qt/ui_qt_msg_window.o \ - ui/drivers/qt/flowlayout.o \ + ui/drivers/qt/gridview.o \ ui/drivers/qt/shaderparamsdialog.o \ ui/drivers/qt/coreoptionsdialog.o \ ui/drivers/qt/filedropwidget.o \ ui/drivers/qt/coreinfodialog.o \ ui/drivers/qt/playlistentrydialog.o \ ui/drivers/qt/viewoptionsdialog.o \ - ui/drivers/qt/playlist.o \ + ui/drivers/qt/qt_playlist.o \ ui/drivers/qt/updateretroarch.o \ ui/drivers/qt/thumbnaildownload.o \ ui/drivers/qt/thumbnailpackdownload.o \ @@ -357,7 +351,7 @@ ifeq ($(HAVE_QT), 1) MOC_HEADERS += ui/drivers/ui_qt.h \ ui/drivers/qt/ui_qt_load_core_window.h \ - ui/drivers/qt/flowlayout.h \ + ui/drivers/qt/gridview.h \ ui/drivers/qt/shaderparamsdialog.h \ ui/drivers/qt/coreoptionsdialog.h \ ui/drivers/qt/filedropwidget.h \ @@ -644,7 +638,7 @@ ifeq ($(HAVE_NEON),1) $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.o endif -HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI) +HW_CONTEXT_MENU_DRIVERS=$(HAVE_MENU) ifeq ($(HW_CONTEXT_MENU_DRIVERS),0) ifeq ($(HAVE_GL_CONTEXT),1) @@ -661,6 +655,10 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1) HAVE_ZARCH = 0 endif + ifeq ($(HAVE_RGUI),) + HAVE_RGUI = 1 + endif + ifeq ($(HAVE_MATERIALUI),) HAVE_MATERIALUI = 1 endif @@ -682,6 +680,7 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1) endif else HAVE_ZARCH ?= 0 + HAVE_RGUI ?= 0 HAVE_MATERIALUI ?= 0 HAVE_NUKLEAR ?= 0 HAVE_XMB ?= 0 @@ -689,53 +688,57 @@ else HAVE_OZONE ?= 0 endif -ifeq ($(HAVE_RGUI), 1) - OBJ += menu/drivers/rgui.o - DEFINES += -DHAVE_MENU -DHAVE_RGUI +ifeq ($(HAVE_MENU), 1) + DEFINES += -DHAVE_MENU HAVE_MENU_COMMON = 1 + + ifeq ($(HAVE_RGUI), 1) + OBJ += menu/drivers/rgui.o + DEFINES += -DHAVE_RGUI + endif + ifeq ($(HAVE_MATERIALUI), 1) OBJ += menu/drivers/materialui.o DEFINES += -DHAVE_MATERIALUI - HAVE_MENU_COMMON = 1 HAVE_ASSETS = 1 endif + ifeq ($(HAVE_NUKLEAR), 1) - OBJ += menu/drivers/nuklear/nk_common.o - OBJ += menu/drivers/nuklear/nk_menu.o - OBJ += menu/drivers/nuklear/nk_wnd_debug.o - OBJ += menu/drivers/nuklear.o + OBJ += menu/drivers/nuklear/nk_common.o \ + menu/drivers/nuklear/nk_menu.o \ + menu/drivers/nuklear/nk_wnd_debug.o \ + menu/drivers/nuklear.o DEFINES += -DHAVE_NUKLEAR HAVE_ASSETS = 1 endif + ifeq ($(HAVE_ZARCH), 1) OBJ += menu/drivers/zarch.o DEFINES += -DHAVE_ZARCH HAVE_ASSETS = 1 endif -endif -ifeq ($(HAVE_XMB), 1) - OBJ += menu/drivers/xmb.o - DEFINES += -DHAVE_XMB - HAVE_MENU_COMMON = 1 - HAVE_ASSETS = 1 -endif + ifeq ($(HAVE_XMB), 1) + OBJ += menu/drivers/xmb.o + DEFINES += -DHAVE_XMB + HAVE_ASSETS = 1 + endif -ifeq ($(HAVE_OZONE), 1) - OBJ += menu/drivers/ozone/ozone.o - OBJ += menu/drivers/ozone/ozone_entries.o - OBJ += menu/drivers/ozone/ozone_display.o - OBJ += menu/drivers/ozone/ozone_texture.o - OBJ += menu/drivers/ozone/ozone_theme.o - OBJ += menu/drivers/ozone/ozone_sidebar.o - DEFINES += -DHAVE_OZONE - HAVE_MENU_COMMON = 1 - HAVE_ASSETS = 1 -endif + ifeq ($(HAVE_OZONE), 1) + OBJ += menu/drivers/ozone/ozone.o \ + menu/drivers/ozone/ozone_entries.o \ + menu/drivers/ozone/ozone_display.o \ + menu/drivers/ozone/ozone_texture.o \ + menu/drivers/ozone/ozone_theme.o \ + menu/drivers/ozone/ozone_sidebar.o + DEFINES += -DHAVE_OZONE + HAVE_ASSETS = 1 + endif -ifeq ($(HAVE_STRIPES), 1) - OBJ += menu/drivers/stripes.o - DEFINES += -DHAVE_STRIPES + ifeq ($(HAVE_STRIPES), 1) + OBJ += menu/drivers/stripes.o + DEFINES += -DHAVE_STRIPES + endif endif ifeq ($(HAVE_LAKKA), 1) @@ -746,6 +749,8 @@ ifeq ($(HAVE_LAKKA_SWITCH), 1) DEFINES += -DHAVE_LAKKA_SWITCH endif +OBJ += menu/menu_shader.o + ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/menu_driver.o \ menu/menu_content.o \ @@ -753,7 +758,6 @@ ifeq ($(HAVE_MENU_COMMON), 1) menu/menu_entries.o \ menu/menu_setting.o \ menu/menu_networking.o \ - menu/menu_shader.o \ menu/widgets/menu_filebrowser.o \ menu/widgets/menu_dialog.o \ menu/widgets/menu_input_dialog.o \ @@ -780,9 +784,12 @@ ifeq ($(HAVE_MENU_COMMON), 1) menu/cbs/menu_cbs_contentlist_switch.o \ menu/menu_displaylist.o \ menu/menu_animation.o \ - menu/drivers_display/menu_display_null.o \ menu/drivers/menu_generic.o \ menu/drivers/null.o + + ifeq ($(HAVE_MENU_COMMON),1) + OBJ += menu/drivers_display/menu_display_null.o + endif endif ifeq ($(HAVE_OVERLAY), 1) @@ -832,14 +839,14 @@ ifeq ($(HAVE_VITA2D), 1) $(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \ $(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o - ifeq ($(HAVE_MENU),1) + ifeq ($(HAVE_MENU_COMMON),1) OBJ += menu/drivers_display/menu_display_vita2d.o endif OBJ += gfx/drivers/vita2d_gfx.o \ gfx/drivers_font/vita2d_font.o - CFLAGS += -I$(DEPS_DIR)/libvita2d/include + DEF_FLAGS += -I$(DEPS_DIR)/libvita2d/include endif ifeq ($(TARGET), retroarch_3ds) @@ -940,7 +947,7 @@ endif ifeq ($(HAVE_DBUS), 1) LIBS += $(DBUS_LIBS) - CFLAGS += $(DBUS_CFLAGS) + DEF_FLAGS += $(DBUS_CFLAGS) OBJ += gfx/common/dbus_common.o endif @@ -1035,7 +1042,7 @@ endif ifeq ($(HAVE_SIXEL), 1) DEFINES += -DHAVE_SIXEL - CFLAGS += -I/usr/include/sixel + DEF_FLAGS += -I/usr/include/sixel OBJ += gfx/drivers/sixel_gfx.o gfx/drivers_font/sixel_font.o \ gfx/drivers_context/sixel_ctx.o LIBS += -lsixel @@ -1047,7 +1054,7 @@ endif ifeq ($(HAVE_PLAIN_DRM), 1) OBJ += gfx/drivers/drm_gfx.o - CFLAGS += -I/usr/include/libdrm + DEF_FLAGS += -I/usr/include/libdrm LIBS += -ldrm endif @@ -1116,8 +1123,11 @@ ifeq ($(HAVE_GL_CONTEXT), 1) gfx/common/metal/MenuDisplay.o \ gfx/common/metal_common.o \ gfx/drivers/metal.o \ - menu/drivers_display/menu_display_metal.o \ gfx/drivers_font/metal_raster_font.o + + ifeq ($(HAVE_MENU_COMMON), 1) + OBJ += menu/drivers_display/menu_display_metal.o + endif endif ifeq ($(HAVE_MPV), 1) @@ -1299,16 +1309,20 @@ endif ifeq ($(HAVE_D3D10), 1) OBJ += gfx/drivers/d3d10.o \ gfx/common/d3d10_common.o \ - gfx/drivers_font/d3d10_font.o \ - menu/drivers_display/menu_display_d3d10.o + gfx/drivers_font/d3d10_font.o + ifeq ($(HAVE_MENU_COMMON), 1) + OBJ += menu/drivers_display/menu_display_d3d10.o + endif DEFINES += -DHAVE_D3D10 endif ifeq ($(HAVE_D3D11), 1) OBJ += gfx/drivers/d3d11.o \ gfx/common/d3d11_common.o \ - gfx/drivers_font/d3d11_font.o \ - menu/drivers_display/menu_display_d3d11.o + gfx/drivers_font/d3d11_font.o + ifeq ($(HAVE_MENU_COMMON), 1) + OBJ += menu/drivers_display/menu_display_d3d11.o + endif DEFINES += -DHAVE_D3D11 HAVE_SLANG = 1 HAVE_GLSLANG = 1 @@ -1318,8 +1332,10 @@ endif ifeq ($(HAVE_D3D12), 1) OBJ += gfx/drivers/d3d12.o \ gfx/common/d3d12_common.o \ - gfx/drivers_font/d3d12_font.o \ - menu/drivers_display/menu_display_d3d12.o + gfx/drivers_font/d3d12_font.o + ifeq ($(HAVE_MENU_COMMON), 1) + OBJ += menu/drivers_display/menu_display_d3d12.o + endif DEFINES += -DHAVE_D3D12 HAVE_SLANG = 1 HAVE_GLSLANG = 1 @@ -1330,7 +1346,7 @@ ifneq ($(findstring 1, $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)),) INCLUDE_DIRS += -isystemgfx/include/dxsdk OBJ += gfx/common/d3dcompiler_common.o \ gfx/common/dxgi_common.o - CFLAGS += -Wno-unknown-pragmas + DEF_FLAGS += -Wno-unknown-pragmas endif ifeq ($(HAVE_D3D8), 1) @@ -1446,7 +1462,7 @@ OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \ $(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.o ifeq ($(HAVE_7ZIP),1) - CFLAGS += -I$(DEPS_DIR)/7zip + DEF_FLAGS += -I$(DEPS_DIR)/7zip HAVE_COMPRESSION = 1 DEFINES += -DHAVE_7ZIP -D_7ZIP_ST 7ZOBJ = $(DEPS_DIR)/7zip/7zIn.o \ @@ -1475,8 +1491,8 @@ endif ifeq ($(HAVE_BUILTINFLAC),1) HAVE_FLAC = 1 DEFINES += -DHAVE_DR_FLAC -I$(DEPS_DIR) - CFLAGS += -DHAVE_DR_FLAC - CFLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include + DEF_FLAGS += -DHAVE_DR_FLAC + DEF_FLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include DEFINES += -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \ -DFLAC_PACKAGE_VERSION="\"retroarch\"" FLACOBJ = $(DEPS_DIR)/libFLAC/bitmath.o \ @@ -1534,7 +1550,7 @@ ifeq ($(HAVE_ZLIB), 1) endif ifeq ($(HAVE_CHD), 1) - CFLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr + DEF_FLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_bitstream.o \ $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_cdrom.o \ @@ -1586,6 +1602,12 @@ ifdef HAVE_COMPRESSION DEFINES += -DHAVE_COMPRESSION endif +# Easter Egg +ifeq ($(HAVE_EASTEREGG),1) + DEFINES += -DHAVE_EASTEREGG + OBJ += cores/libretro-gong/gong.o +endif + # Video4Linux 2 ifeq ($(HAVE_V4L2),1) @@ -1753,9 +1775,11 @@ ifneq ($(findstring Win32,$(OS)),) OBJ += gfx/drivers/gdi_gfx.o \ gfx/drivers_context/gdi_ctx.o \ gfx/drivers_font/gdi_font.o \ - gfx/display_servers/dispserv_win32.o \ - menu/drivers_display/menu_display_gdi.o + gfx/display_servers/dispserv_win32.o + ifeq ($(HAVE_MENU_COMMON), 1) + OBJ += menu/drivers_display/menu_display_gdi.o + endif LIBS += -lmsimg32 -lhid -lsetupapi endif @@ -1826,7 +1850,7 @@ endif ifeq ($(WANT_IOSUHAX), 1) DEFINES += -I$(DEPS_DIR)/libiosuhax - CFLAGS += -I$(DEPS_DIR)/libiosuhax + DEF_FLAGS += -I$(DEPS_DIR)/libiosuhax OBJ += $(DEPS_DIR)/libiosuhax/iosuhax.o \ $(DEPS_DIR)/libiosuhax/iosuhax_devoptab.o \ $(DEPS_DIR)/libiosuhax/iosuhax_disc_interface.o @@ -1834,7 +1858,7 @@ endif ifeq ($(WANT_LIBFAT), 1) DEFINES += -I$(DEPS_DIR)/libfat/include - CFLAGS += -I$(DEPS_DIR)/libfat/include + DEF_FLAGS += -I$(DEPS_DIR)/libfat/include OBJ += $(DEPS_DIR)/libfat/cache.o \ $(DEPS_DIR)/libfat/directory.o \ $(DEPS_DIR)/libfat/disc.o \ @@ -1868,7 +1892,7 @@ endif # Help at https://modmyclassic.com/comp ifeq ($(HAVE_CLASSIC), 1) - CFLAGS += -DHAVE_CLASSIC + DEF_FLAGS += -DHAVE_CLASSIC endif ifeq ($(HAVE_C_A7A7), 1) @@ -1880,12 +1904,11 @@ ifeq ($(HAVE_C_A7A7), 1) -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \ -fmerge-all-constants -fno-math-errno \ -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard - CFLAGS += $(C_A7A7_OPT) - CXXFLAGS += $(C_A7A7_OPT) + DEF_FLAGS += $(C_A7A7_OPT) ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1) - CFLAGS += -march=armv7-a + DEF_FLAGS += -march=armv7-a else - CFLAGS += -march=armv7ve + DEF_FLAGS += -march=armv7ve # If gcc is 5.0 or later ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1) LDFLAGS += -static-libgcc -static-libstdc++ @@ -1894,6 +1917,6 @@ ifeq ($(HAVE_C_A7A7), 1) endif ifeq ($(HAVE_HAKCHI), 1) - CFLAGS += -DHAVE_HAKCHI + DEF_FLAGS += -DHAVE_HAKCHI endif ################################## diff --git a/Makefile.ctr b/Makefile.ctr index 4b1318aadf..c276e79b3e 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -62,6 +62,7 @@ else HAVE_RPNG = 1 HAVE_RJPEG = 1 HAVE_RBMP = 1 + HAVE_MENU = 1 HAVE_RGUI = 1 HAVE_ZLIB = 1 HAVE_7ZIP = 1 @@ -80,6 +81,7 @@ else #HAVE_BUILTINMBEDTLS = 1 include Makefile.common + CFLAGS += $(DEF_FLAGS) BLACKLIST := BLACKLIST += input/input_overlay.o BLACKLIST += tasks/task_overlay.o @@ -105,7 +107,6 @@ MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARG INCDIRS := -I$(CTRULIB)/include LIBDIRS := -L. -L$(CTRULIB)/lib - ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft CFLAGS += -mword-relocations \ @@ -149,7 +150,6 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) CFLAGS += -std=gnu99 -ffast-math - LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lm ifeq ($(DEBUG), 1) @@ -158,7 +158,6 @@ else LIBS += -lctru endif - ifeq ($(BUILD_3DSX), 1) TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh endif @@ -268,7 +267,6 @@ $(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF) $(TARGET).cia: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF) $(MAKEROM) -f cia -o $@ $(MAKEROM_ARGS_COMMON) -DAPP_ENCRYPTED=false - clean: rm -f $(OBJ) rm -f $(TARGET).3dsx @@ -282,5 +280,3 @@ clean: rm -f ctr/3dsx_custom_crt0.o .PHONY: clean - - diff --git a/Makefile.ctr.salamander b/Makefile.ctr.salamander index 2c45a1bfe2..090f4a0c04 100644 --- a/Makefile.ctr.salamander +++ b/Makefile.ctr.salamander @@ -27,6 +27,7 @@ OBJ := ctr/ctr_system.o \ frontend/drivers/platform_null.o \ libretro-common/encodings/encoding_utf.o \ libretro-common/compat/compat_strcasestr.o \ + libretro-common/compat/fopen_utf8.o \ libretro-common/file/file_path.o \ libretro-common/string/stdstring.o \ libretro-common/lists/string_list.o \ @@ -94,10 +95,8 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) CFLAGS += -std=gnu99 -ffast-math - LIBS := -lctru -lm - ifeq ($(BUILD_3DSX), 1) TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh endif @@ -220,5 +219,3 @@ clean: rm -f ctr/3dsx_custom_crt0.o .PHONY: clean - - diff --git a/Makefile.emscripten b/Makefile.emscripten index c935759ab1..28d5698702 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -16,6 +16,7 @@ HAVE_OPENGLES = 1 HAVE_RJPEG = 0 HAVE_RPNG = 1 HAVE_EMSCRIPTEN = 1 +HAVE_MENU = 1 HAVE_RGUI = 1 HAVE_SDL = 0 HAVE_SDL2 = 0 @@ -57,7 +58,7 @@ endif include Makefile.common -CFLAGS += -Ideps/libz -Ideps -Ideps/stb +CFLAGS += $(DEF_FLAGS) -Ideps/libz -Ideps -Ideps/stb libretro = libretro_emscripten.bc ifneq ($(V), 1) diff --git a/Makefile.griffin b/Makefile.griffin index 4a099fa2b7..c77f6c73c1 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -430,8 +430,8 @@ else ifeq ($(platform), windows_msvc2005_x86) CXX = cl.exe LD = link.exe - PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS - LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib + PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -DHAVE_EASTEREGG + LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH) PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE") @@ -479,7 +479,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform))) LD = link.exe PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS - PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 + PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib PlatformSuffix = $(subst windows_msvc2010_,,$(platform)) @@ -550,7 +550,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform))) LD = link.exe PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS - PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 + PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib PlatformSuffix = $(subst windows_msvc2012_,,$(platform)) @@ -625,7 +625,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform))) LD = link.exe PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS - PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 + PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib PlatformSuffix = $(subst windows_msvc2013_,,$(platform)) @@ -700,7 +700,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform))) LD = link.exe PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS - PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 + PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib PlatformSuffix = $(subst windows_msvc2015_,,$(platform)) @@ -1074,7 +1074,6 @@ overlays-checkout: $(GIT) clone git://github.com/libretro/common-overlays.git $(OVERLAY_DIR); \ fi - clean: rm -f $(EXT_TARGET) rm -f $(EXT_INTER_TARGET) diff --git a/Makefile.libnx b/Makefile.libnx index 7a087bdfa5..566730ecb3 100644 --- a/Makefile.libnx +++ b/Makefile.libnx @@ -22,7 +22,7 @@ OBJ := # For threading we need to overwrite some vars with global defines because devkitPro's includes # make it hard for us. This works for the pthread wrapper DEFINES_THREAD := -Dpthread_t=Thread -Dpthread_mutex_t=Mutex -Dpthread_mutexattr_t='void*' -Dpthread_attr_t=int -Dpthread_cond_t=CondVar -Dpthread_condattr_t='int' -D_SYS__PTHREADTYPES_H_ -DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD) +DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD) -DHAVE_STB_VORBIS HAVE_CC_RESAMPLER = 1 HAVE_MENU_COMMON = 1 @@ -41,6 +41,8 @@ HAVE_NETWORKING = 1 HAVE_NETPLAYDISCOVERY = 1 HAVE_STB_FONT = 1 HAVE_CHEEVOS = 1 +HAVE_CHD = 1 +HAVE_STB_VORBIS = 1 # RetroArch libnx useful flags HAVE_THREADS = 1 diff --git a/Makefile.libogc b/Makefile.libogc index 77d3bf6c5f..70c846c461 100644 --- a/Makefile.libogc +++ b/Makefile.libogc @@ -45,7 +45,6 @@ export CXX := $(PREFIX)g++ export AR := $(PREFIX)ar export OBJCOPY := $(PREFIX)objcopy - ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH)) #--------------------------------------------------------------------------------- @@ -131,7 +130,6 @@ INCLUDES := $(DEFINCS) \ MACHDEP := -DBIGENDIAN -DGEKKO -mcpu=750 -meabi -msdata=eabi -mhard-float -ffunction-sections -fdata-sections - ifeq ($(PLATFORM),wii) MACHDEP += -DHW_RVL endif @@ -159,7 +157,6 @@ VPATH := $(LWIPDIR) \ $(LIBWIIKEYB) \ $(STUBSDIR) - #--------------------------------------------------------------------------------- SOURCES_LWIP := $(LWIPDIR)/network.c \ $(LWIPDIR)/netio.c \ @@ -264,7 +261,6 @@ SOURCES_OGC_ASM := $(OGCDIR)/cache_asm.S \ $(OGCDIR)/system_asm.S \ $(OGCDIR)/video_asm.S - ifneq ($(BUILD_LITE), 1) SOURCES_OGC += $(OGCDIR)/dvd.c endif diff --git a/Makefile.msvc b/Makefile.msvc index 3ece3af7a4..02361fe30e 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -7,7 +7,6 @@ ARCH = amd64 BUILD_DIR = objs/msvc CXX_BUILD = 0 - WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING) WindowsSDKVersion := 10.0.14393.0\$(NOTHING) VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING) @@ -30,6 +29,7 @@ HAVE_WINMM := 1 HAVE_RPNG := 1 HAVE_ZLIB := 1 WANT_ZLIB := 1 +HAVE_MENU := 1 HAVE_RGUI := 1 HAVE_XMB := 1 HAVE_MATERIALUI := 1 @@ -59,7 +59,7 @@ HAVE_IMAGEVIEWER := 1 include Makefile.common INCLUDE_DIRS := $(patsubst -isystem%,-I%,$(INCLUDE_DIRS)) -CFLAGS := $(filter-out -Wno-unknown-pragmas,$(CFLAGS)) +CFLAGS := $(filter-out -Wno-unknown-pragmas,$(DEF_FLAGS)) CXXFLAGS := $(filter-out -fpermissive -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses,$(CXXFLAGS)) LIBS := $(filter-out -lstdc++,$(LIBS)) @@ -90,14 +90,12 @@ ifeq ($(ARCH),x86) CROSS = endif - INCLUDE := $(VCINSTALLDIR)include;$(VCINSTALLDIR)atlmfc\include;$(WindowsSdkDir)include\$(WindowsSDKVersion)ucrt;$(WindowsSdkDir)include\$(WindowsSDKVersion)shared;$(WindowsSdkDir)include\$(WindowsSDKVersion)um; LIB := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS);$(WindowsSdkDir)lib\$(WindowsSDKVersion)ucrt\$(TARGET_ARCH2);$(WindowsSdkDir)lib\$(WindowsSDKVersion)um\$(TARGET_ARCH2);C:\Program Files (x86)\NVIDIA Corporation\Cg\lib.$(TARGET_ARCH2);C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Lib\$(TARGET_ARCH2); LIBPATH := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS); PATH := $(shell IFS=$$'\n'; cygpath "$(VCINSTALLDIR)bin\\$(CROSS)"):$(shell IFS=$$'\n'; cygpath "$(WindowsSdkDir)\bin\\$(ARCH2)"):$(PATH) - export INCLUDE := $(INCLUDE) export LIB := $(LIB) export LIBPATH := $(LIBPATH) @@ -144,7 +142,6 @@ RC = rc.exe LIBS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib LDFLAGS += -nologo -wx -nxcompat -machine:$(TARGET_ARCH2) - ifeq ($(DEBUG),1) FLAGS += -GS -Gy -Od -RTC1 -D_SECURE_SCL=1 -Zi FLAGS += -MDd @@ -155,7 +152,6 @@ else FLAGS += -MD endif - ifeq ($(DEBUG),1) BUILD_DIR := $(BUILD_DIR)-debug endif @@ -170,7 +166,6 @@ ifneq ($(V), 1) Q := @ endif - ifeq ($(GRIFFIN_BUILD), 1) OBJ := griffin/griffin.o griffin/griffin_cpp.o DEFINES += -DHAVE_GRIFFIN -DUSE_MATH_DEFINES @@ -188,9 +183,6 @@ OBJ := $(patsubst %rarch.o,%rarch.res,$(OBJ)) OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ)) OBJ := $(OBJ:.o=.obj) - - - LDFLAGS += -WX -SUBSYSTEM:WINDOWS -ENTRY:mainCRTStartup DEFINES := $(patsubst -f%,,$(DEFINES)) @@ -198,7 +190,6 @@ LDFLAGS := $(patsubst -l%,%.lib,$(LDFLAGS)) LIBS := $(filter-out -lm,$(LIBS)) LIBS := $(patsubst -l%,%.lib,$(LIBS)) - #$(info INCLUDE_DIRS : $(INCLUDE_DIRS)) #$(info DEFINES : $(DEFINES)) #$(info CFLAGS : $(CFLAGS)) diff --git a/Makefile.orbis b/Makefile.orbis index be1e90ca10..ee0e5a8a44 100644 --- a/Makefile.orbis +++ b/Makefile.orbis @@ -29,7 +29,7 @@ else HAVE_RJPEG := 1 HAVE_RBMP := 1 HAVE_RTGA := 1 - HAVE_ZLIB := 0 + HAVE_ZLIB := 1 HAVE_OVERLAY := 1 HAVE_7ZIP := 1 HAVE_EGL := 1 @@ -55,16 +55,16 @@ else endif include Makefile.common + CFLAGS += $(DEF_FLAGS) BLACKLIST := OBJ := $(filter-out $(BLACKLIST),$(OBJ)) - #OBJ += input/drivers/psp_input.o - #OBJ += input/drivers_joypad/psp_joypad.o - #OBJ += audio/drivers/psp_audio.o + OBJ += input/drivers/ps4_input.o + OBJ += input/drivers_joypad/ps4_joypad.o + OBJ += audio/drivers/psp_audio.o #OBJ += frontend/drivers/platform_orbis.o endif - ifeq ($(strip $(PS4SDK)),) $(error "Please set PS4SDK in your environment. export PS4SDK=ps4sdk") endif @@ -120,10 +120,9 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1) endif CXXFLAGS := $(CFLAGS) -PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \ +PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \ -lPs4_extension_kernel_call_standard -lPs4_extension_kernel_execute_dynlib_prepare_dlclose -lPs4_common_kernel -lPs4_common_user -lPs4_common_generic -lPs4LibCInternalAdaptive_stub -lPs4LibKernelAdaptive_stub -lSceLibcInternal_stub -lkernel_stub -lps4Kernel_stub -lPs4_base_stub_resolve_minimal -lPs4_base_kernel_dlsym_standard -lPs4_base_kernel_seek_elf_address_standard -lPs4_base_assembler_register_parameter_standard -lPs4_base_assembler_system_call_standard - LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS) TARGETS := $(TARGET).elf @@ -131,7 +130,6 @@ TARGETS := $(TARGET).elf DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend POSTCOMPILE = mv -f $*.Tdepend $*.depend - all: $(TARGETS) %.o: %.cpp @@ -144,7 +142,6 @@ all: $(TARGETS) $(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS) $(POSTCOMPILE) - %.o: %.S %.o: %.S %.depend $(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) @@ -167,4 +164,4 @@ clean: .PHONY: clean all .PRECIOUS: %.depend --include $(OBJ:.o=.depend) \ No newline at end of file +-include $(OBJ:.o=.depend) diff --git a/Makefile.pandora b/Makefile.pandora index 5c6da85a7f..33ed75bd69 100644 --- a/Makefile.pandora +++ b/Makefile.pandora @@ -52,4 +52,3 @@ clean: rm -f $(BINDIR)/retroarch-joyconfig rm -f $(PNDDIR)/readme.html rm -f retroarch - diff --git a/Makefile.ps2 b/Makefile.ps2 index 369a66198d..094536e00c 100644 --- a/Makefile.ps2 +++ b/Makefile.ps2 @@ -2,11 +2,11 @@ BUILD_PRX = 0 DEBUG = 0 HAVE_KERNEL_PRX = 0 HAVE_LOGGER = 0 -HAVE_FILE_LOGGER = 1 +HAVE_FILE_LOGGER = 0 HAVE_THREADS = 0 BIG_STACK = 0 -WHOLE_ARCHIVE_LINK = 0 -PS2_IP = 192.168.2.150 +MUTE_WARNINGS = 0 +PS2_IP = 192.168.1.150 #Configuration for IRX EE_BIN2O = bin2o @@ -20,31 +20,30 @@ ifeq ($(DEBUG), 1) RARCH_DEFINES += -DDEBUG else OPTIMIZE_LV := -O2 + LDFLAGS := -s endif -ifeq ($(WHOLE_ARCHIVE_LINK), 1) - WHOLE_START := -Wl,--whole-archive - WHOLE_END := -Wl,--no-whole-archive +ifeq ($(MUTE_WARNINGS), 1) + DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses endif INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper GPVAL = -G0 -CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant +CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant ASFLAGS = $(CFLAGS) RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_IMAGEVIEWER -DHAVE_7ZIP -DHAVE_CC_RESAMPLER +RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER LIBDIR = -LDFLAGS = -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L. -s -LIBS += $(WHOLE_START) -lretro_ps2 $(WHOLE_END) -LIBS += -lgskit -ldmakit -lpad -lmc -lhdd -lsdl -lc -lfileXio -lpatches -lpoweroff -ldebug -lc +LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L. +LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff #IRX modules # IRX modules - modules have to be in IRX_DIR -IRX = iomanX.irx fileXio.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx +IRX = iomanX.irx fileXio.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx IRX_OBJ = $(IRX:.irx=.o) EE_OBJS += $(IRX_OBJ) @@ -67,12 +66,13 @@ endif CFLAGS += $(RARCH_DEFINES) # Missing objecst on the PS2SDK -EE_OBJS += ps2/compat_ctype.o +EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o #EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o EE_OBJS += griffin/griffin.o EE_CFLAGS = $(CFLAGS) +EE_CXXFLAGS = $(CFLAGS) EE_LDFLAGS = $(LDFLAGS) EE_LIBS = $(LIBS) EE_ASFLAGS = $(ASFLAGS) @@ -108,10 +108,7 @@ $(EE_IRX_OBJ): include $(PS2SDK)/samples/Makefile.pref include $(PS2SDK)/samples/Makefile.eeglobal - +#Linking with C++ $(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o $(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \ -o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS) - - - \ No newline at end of file diff --git a/Makefile.ps3.salamander b/Makefile.ps3.salamander index c769ff105c..37778bf6f4 100644 --- a/Makefile.ps3.salamander +++ b/Makefile.ps3.salamander @@ -55,6 +55,7 @@ PPU_SRCS = frontend/frontend_salamander.c \ libretro-common/encodings/encoding_utf.c \ libretro-common/compat/compat_strl.c \ libretro-common/compat/compat_strcasestr.c \ + libretro-common/compat/fopen_utf8.c \ libretro-common/streams/file_stream.c \ libretro-common/vfs/vfs_implementation.c \ libretro-common/file/config_file.c \ diff --git a/Makefile.psl1ght b/Makefile.psl1ght index 2676bac26d..16e06e4cb0 100644 --- a/Makefile.psl1ght +++ b/Makefile.psl1ght @@ -128,4 +128,3 @@ clean: rm -f $(OBJ) .PHONY: clean - diff --git a/Makefile.psp1 b/Makefile.psp1 index be0ae8e25a..e239278e3c 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -49,7 +49,6 @@ endif CFLAGS += $(RARCH_DEFINES) - EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = RetroArch PSP1 diff --git a/Makefile.psp1.salamander b/Makefile.psp1.salamander index 7bcc29a0e8..525d2a1ac6 100644 --- a/Makefile.psp1.salamander +++ b/Makefile.psp1.salamander @@ -42,6 +42,7 @@ OBJS = frontend/frontend_salamander.o \ libretro-common/lists/dir_list.o \ libretro-common/file/retro_dirent.o \ libretro-common/encodings/encoding_utf.o \ + libretro-common/compat/fopen_utf8.o \ libretro-common/compat/compat_strl.o \ libretro-common/compat/compat_strcasestr.o \ libretro-common/file/config_file.o \ diff --git a/Makefile.switch b/Makefile.switch index 0e12f5a448..fb27990459 100644 --- a/Makefile.switch +++ b/Makefile.switch @@ -34,13 +34,13 @@ else HAVE_DYNAMIC = 1 include Makefile.common - BLACKLIST := + CFLAGS += $(DEF_FLAGS) + BLACKLIST := BLACKLIST += input/input_overlay.o - BLACKLIST += tasks/task_overlay.o + BLACKLIST += tasks/task_overlay.o OBJ := $(filter-out $(BLACKLIST),$(OBJ)) endif - ifeq ($(strip $(LIBTRANSISTOR_HOME)),) $(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=") endif diff --git a/Makefile.vita b/Makefile.vita index 5645c9cabd..abc953ccec 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -55,6 +55,7 @@ else endif include Makefile.common + CFLAGS += $(DEF_FLAGS) BLACKLIST := OBJ := $(filter-out $(BLACKLIST),$(OBJ)) @@ -64,7 +65,6 @@ else OBJ += frontend/drivers/platform_psp.o endif - ifeq ($(strip $(VITASDK)),) $(error "Please set VITASDK in your environment. export VITASDK=vitasdk") endif @@ -127,7 +127,6 @@ TARGETS := $(TARGET).vpk DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend POSTCOMPILE = mv -f $*.Tdepend $*.depend - all: $(TARGETS) %.o: %.cpp @@ -140,7 +139,6 @@ all: $(TARGETS) $(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS) $(POSTCOMPILE) - %.o: %.S %.o: %.S %.depend $(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) diff --git a/Makefile.vita.salamander b/Makefile.vita.salamander index a443c2c0f7..20160de36e 100644 --- a/Makefile.vita.salamander +++ b/Makefile.vita.salamander @@ -44,6 +44,7 @@ OBJS = frontend/frontend_salamander.o \ libretro-common/encodings/encoding_utf.o \ libretro-common/compat/compat_strl.o \ libretro-common/compat/compat_strcasestr.o \ + libretro-common/compat/fopen_utf8.o \ libretro-common/file/config_file.o \ libretro-common/streams/file_stream.o \ libretro-common/vfs/vfs_implementation.o \ diff --git a/Makefile.wii.salamander b/Makefile.wii.salamander index dc5249f832..9003714261 100644 --- a/Makefile.wii.salamander +++ b/Makefile.wii.salamander @@ -67,6 +67,7 @@ OBJ = frontend/frontend_salamander.o \ libretro-common/encodings/encoding_utf.o \ libretro-common/compat/compat_strl.o \ libretro-common/compat/compat_strcasestr.o \ + libretro-common/compat/fopen_utf8.o \ libretro-common/file/config_file.o \ file_path_str.o \ verbosity.o \ diff --git a/Makefile.wiiu b/Makefile.wiiu index e77be12ea9..58412548df 100644 --- a/Makefile.wiiu +++ b/Makefile.wiiu @@ -64,6 +64,7 @@ ifeq ($(SALAMANDER_BUILD),1) OBJ += frontend/drivers/platform_null.o OBJ += libretro-common/encodings/encoding_utf.o OBJ += libretro-common/compat/compat_strcasestr.o + OBJ += libretro-common/compat/fopen_utf8.o OBJ += libretro-common/file/file_path.o OBJ += libretro-common/string/stdstring.o OBJ += libretro-common/lists/string_list.o @@ -115,6 +116,7 @@ endif HAVE_RPNG = 1 HAVE_RJPEG = 1 HAVE_RBMP = 1 + HAVE_MENU = 1 HAVE_RGUI = 1 HAVE_ZLIB = 1 HAVE_7ZIP = 1 @@ -241,7 +243,6 @@ ifneq ($(WANT_IOSUHAX), 1) LIBS += -liosuhax endif - RPX_OBJ = $(BUILD_DIR)/wiiu/system/stubs_rpl.o HBL_ELF_OBJ = $(BUILD_DIR)/wiiu/system/dynamic.o $(BUILD_DIR)/wiiu/system/stubs_elf.o @@ -263,13 +264,11 @@ endif DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.depend - all: $(TARGETS) %: $(BUILD_DIR)/% cp $< $@ - $(BUILD_DIR)/%.o: %.cpp %.depend @$(if $(Q), echo CXX $<,) @mkdir -p $(dir $@) diff --git a/Makefile.win b/Makefile.win index 02d70bde7f..bdab1a775b 100644 --- a/Makefile.win +++ b/Makefile.win @@ -12,6 +12,7 @@ HAVE_NETPLAYDISCOVERY = 1 HAVE_STDIN_CMD = 1 HAVE_COMMAND = 1 HAVE_THREADS = 1 +HAVE_MENU = 1 HAVE_RGUI = 1 HAVE_MATERIALUI = 1 HAVE_7ZIP = 1 @@ -102,7 +103,6 @@ else WINDRES = windres endif - libretro ?= -lretro ifeq ($(DYNAMIC), 1) @@ -123,7 +123,7 @@ else CXXFLAGS += -O3 -ffast-math endif -CFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps +CFLAGS += $(DEF_FLAGS) -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps CXXFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps -std=c++98 -D__STDC_CONSTANT_MACROS ifeq ($(CXX_BUILD), 1) CFLAGS += -std=c++98 -xc++ -D__STDC_CONSTANT_MACROS @@ -172,4 +172,3 @@ clean: rm -f *.d .PHONY: all install uninstall clean - diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 4baaf7b753..9290dc41b1 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -119,9 +119,12 @@ static const audio_driver_t *audio_drivers[] = { #ifdef EMSCRIPTEN &audio_rwebaudio, #endif -#if defined(PSP) || defined(VITA) +#if defined(PSP) || defined(VITA) || defined(ORBIS) &audio_psp, #endif +#if defined(PS2) + &audio_ps2, +#endif #ifdef _3DS &audio_ctr_csnd, &audio_ctr_dsp, @@ -134,7 +137,7 @@ static const audio_driver_t *audio_drivers[] = { NULL, }; -static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_STREAMS] = {{0}}; +static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_SYSTEM_STREAMS] = {{0}}; static size_t audio_driver_chunk_size = 0; static size_t audio_driver_chunk_nonblock_size = 0; @@ -200,14 +203,14 @@ enum resampler_quality audio_driver_get_resampler_quality(void) audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i) { - if (i > (AUDIO_MIXER_MAX_STREAMS-1)) + if (i > (AUDIO_MIXER_MAX_SYSTEM_STREAMS-1)) return NULL; return &audio_mixer_streams[i]; } const char *audio_driver_mixer_get_stream_name(unsigned i) { - if (i > (AUDIO_MIXER_MAX_STREAMS-1)) + if (i > (AUDIO_MIXER_MAX_SYSTEM_STREAMS-1)) return "N/A"; if (!string_is_empty(audio_mixer_streams[i].name)) return audio_mixer_streams[i].name; @@ -389,12 +392,11 @@ static bool audio_driver_deinit_internal(void) return true; } -static void audio_driver_mixer_init(unsigned out_rate) +static void audio_driver_mixer_init(unsigned audio_out_rate) { - audio_mixer_init(out_rate); + audio_mixer_init(audio_out_rate); } - static bool audio_driver_init_internal(bool audio_cb_inited) { unsigned new_rate = 0; @@ -633,7 +635,6 @@ static void audio_driver_flush(const int16_t *data, size_t samples) src_data.data_in = audio_driver_input_data; src_data.input_frames = samples >> 1; - if (audio_driver_dsp) { struct retro_dsp_data dsp_data; @@ -1052,7 +1053,7 @@ static int audio_mixer_find_index(audio_mixer_sound_t *sound) { unsigned i; - for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++) + for (i = 0; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++) { audio_mixer_sound_t *handle = audio_mixer_streams[i].handle; if (handle == sound) @@ -1111,6 +1112,11 @@ static void audio_mixer_play_stop_sequential_cb( if (!string_is_empty(audio_mixer_streams[i].name)) free(audio_mixer_streams[i].name); + if (i < AUDIO_MIXER_MAX_STREAMS) + audio_mixer_streams[i].type = AUDIO_STREAM_TYPE_USER; + else + audio_mixer_streams[i].type = AUDIO_STREAM_TYPE_SYSTEM; + audio_mixer_streams[i].name = NULL; audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE; audio_mixer_streams[i].volume = 0.0f; @@ -1121,7 +1127,7 @@ static void audio_mixer_play_stop_sequential_cb( i++; - for (; i < AUDIO_MIXER_MAX_STREAMS; i++) + for (; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++) { if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_STOPPED) { @@ -1138,10 +1144,11 @@ static void audio_mixer_play_stop_sequential_cb( } } -bool audio_driver_mixer_get_free_stream_slot(unsigned *id) +static bool audio_driver_mixer_get_free_stream_slot(unsigned *id, enum audio_mixer_stream_type type) { - unsigned i; - for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++) + unsigned i = (type == AUDIO_STREAM_TYPE_USER) ? 0 : AUDIO_MIXER_MAX_STREAMS; + unsigned count = (type == AUDIO_STREAM_TYPE_USER) ? AUDIO_MIXER_MAX_STREAMS : AUDIO_MIXER_MAX_SYSTEM_STREAMS; + for (; i < count; i++) { if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_NONE) { @@ -1161,9 +1168,22 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params) audio_mixer_stop_cb_t stop_cb = audio_mixer_play_stop_cb; bool looped = false; void *buf = NULL; - - if (!audio_driver_mixer_get_free_stream_slot(&free_slot)) + + if (params->stream_type == AUDIO_STREAM_TYPE_NONE) return false; + + switch (params->slot_selection_type) + { + case AUDIO_MIXER_SLOT_SELECTION_MANUAL: + free_slot = params->slot_selection_idx; + break; + case AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC: + default: + if (!audio_driver_mixer_get_free_stream_slot( + &free_slot, params->stream_type)) + return false; + break; + } if (params->state == AUDIO_STREAM_STATE_NONE) return false; @@ -1229,6 +1249,7 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params) audio_mixer_streams[free_slot].buf = buf; audio_mixer_streams[free_slot].handle = handle; audio_mixer_streams[free_slot].voice = voice; + audio_mixer_streams[free_slot].type = params->stream_type; audio_mixer_streams[free_slot].state = params->state; audio_mixer_streams[free_slot].volume = params->volume; audio_mixer_streams[free_slot].stop_cb = stop_cb; @@ -1238,7 +1259,7 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params) enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i) { - if (i >= AUDIO_MIXER_MAX_STREAMS) + if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return AUDIO_STREAM_STATE_NONE; return audio_mixer_streams[i].state; @@ -1248,7 +1269,7 @@ static void audio_driver_mixer_play_stream_internal(unsigned i, unsigned type) { bool set_state = false; - if (i >= AUDIO_MIXER_MAX_STREAMS) + if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return; switch (audio_mixer_streams[i].state) @@ -1290,7 +1311,7 @@ void audio_driver_mixer_play_stream_sequential(unsigned i) float audio_driver_mixer_get_stream_volume(unsigned i) { - if (i >= AUDIO_MIXER_MAX_STREAMS) + if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return 0.0f; return audio_mixer_streams[i].volume; @@ -1300,7 +1321,7 @@ void audio_driver_mixer_set_stream_volume(unsigned i, float vol) { audio_mixer_voice_t *voice = NULL; - if (i >= AUDIO_MIXER_MAX_STREAMS) + if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return; audio_mixer_streams[i].volume = vol; @@ -1315,7 +1336,7 @@ void audio_driver_mixer_stop_stream(unsigned i) { bool set_state = false; - if (i >= AUDIO_MIXER_MAX_STREAMS) + if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return; switch (audio_mixer_streams[i].state) @@ -1345,7 +1366,7 @@ void audio_driver_mixer_remove_stream(unsigned i) { bool destroy = false; - if (i >= AUDIO_MIXER_MAX_STREAMS) + if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return; switch (audio_mixer_streams[i].state) @@ -1387,7 +1408,7 @@ static void audio_driver_mixer_deinit(void) audio_mixer_active = false; - for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++) + for (i = 0; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++) { audio_driver_mixer_stop_stream(i); audio_driver_mixer_remove_stream(i); @@ -1501,7 +1522,6 @@ error: return false; } - bool audio_driver_stop(void) { if (!current_audio || !current_audio->stop @@ -1591,7 +1611,6 @@ void audio_set_bool(enum audio_action action, bool val) } } - void audio_set_float(enum audio_action action, float val) { switch (action) diff --git a/audio/audio_driver.h b/audio/audio_driver.h index de77f750d3..2e1f59e344 100644 --- a/audio/audio_driver.h +++ b/audio/audio_driver.h @@ -37,6 +37,8 @@ RETRO_BEGIN_DECLS #define AUDIO_MIXER_MAX_STREAMS 16 +#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS+4) + enum audio_action { AUDIO_ACTION_NONE = 0, @@ -48,6 +50,19 @@ enum audio_action AUDIO_ACTION_MIXER }; +enum audio_mixer_slot_selection_type +{ + AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC = 0, + AUDIO_MIXER_SLOT_SELECTION_MANUAL +}; + +enum audio_mixer_stream_type +{ + AUDIO_STREAM_TYPE_NONE = 0, + AUDIO_STREAM_TYPE_USER, + AUDIO_STREAM_TYPE_SYSTEM +}; + enum audio_mixer_state { AUDIO_STREAM_STATE_NONE = 0, @@ -62,6 +77,8 @@ typedef struct audio_mixer_stream audio_mixer_sound_t *handle; audio_mixer_voice_t *voice; audio_mixer_stop_cb_t stop_cb; + enum audio_mixer_stream_type stream_type; + enum audio_mixer_type type; enum audio_mixer_state state; float volume; void *buf; @@ -163,6 +180,9 @@ typedef struct audio_driver typedef struct audio_mixer_stream_params { float volume; + enum audio_mixer_slot_selection_type slot_selection_type; + unsigned slot_selection_idx; + enum audio_mixer_stream_type stream_type; enum audio_mixer_type type; enum audio_mixer_state state; void *buf; diff --git a/audio/audio_thread_wrapper.h b/audio/audio_thread_wrapper.h index fcb2e0d028..11fee2d566 100644 --- a/audio/audio_thread_wrapper.h +++ b/audio/audio_thread_wrapper.h @@ -43,4 +43,3 @@ bool audio_init_thread(const audio_driver_t **out_driver, void **out_data, const audio_driver_t *driver); #endif - diff --git a/audio/drivers/alsa_qsa.c b/audio/drivers/alsa_qsa.c index 76d442db98..ddabe907a3 100644 --- a/audio/drivers/alsa_qsa.c +++ b/audio/drivers/alsa_qsa.c @@ -219,7 +219,6 @@ static int check_pcm_status(void *data, int channel_type) return ret; } - static ssize_t alsa_qsa_write(void *data, const void *buf, size_t size) { alsa_t *alsa = (alsa_t*)data; @@ -328,7 +327,6 @@ static void alsa_qsa_set_nonblock_state(void *data, bool state) alsa->nonblock = state; } - static bool alsa_qsa_use_float(void *data) { alsa_t *alsa = (alsa_t*)data; diff --git a/audio/drivers/coreaudio.c b/audio/drivers/coreaudio.c index 6f255bbc5b..30d6f7c1ca 100644 --- a/audio/drivers/coreaudio.c +++ b/audio/drivers/coreaudio.c @@ -15,7 +15,6 @@ */ #include - #if TARGET_OS_IPHONE #include #else diff --git a/audio/drivers/ctr_csnd_audio.c b/audio/drivers/ctr_csnd_audio.c index 8731706c32..019dd8a040 100644 --- a/audio/drivers/ctr_csnd_audio.c +++ b/audio/drivers/ctr_csnd_audio.c @@ -56,7 +56,6 @@ static void ctr_csnd_audio_update_playpos(ctr_csnd_audio_t* ctr) ctr->cpu_ticks_last += samples_played * CTR_CSND_CPU_TICKS_PER_SAMPLE; } - Result csndPlaySound_custom(int chn, u32 flags, float vol, float pan, void* data0, void* data1, u32 size) { @@ -289,7 +288,6 @@ static size_t ctr_csnd_audio_buffer_size(void *data) return CTR_CSND_AUDIO_COUNT; } - audio_driver_t audio_ctr_csnd = { ctr_csnd_audio_init, ctr_csnd_audio_write, diff --git a/audio/drivers/ctr_dsp_audio.c b/audio/drivers/ctr_dsp_audio.c index 1e0e83c5b4..afed352ab4 100644 --- a/audio/drivers/ctr_dsp_audio.c +++ b/audio/drivers/ctr_dsp_audio.c @@ -195,7 +195,6 @@ static size_t ctr_dsp_audio_buffer_size(void *data) return CTR_DSP_AUDIO_COUNT; } - audio_driver_t audio_ctr_dsp = { ctr_dsp_audio_init, ctr_dsp_audio_write, @@ -211,4 +210,3 @@ audio_driver_t audio_ctr_dsp = { ctr_dsp_audio_write_avail, ctr_dsp_audio_buffer_size }; - diff --git a/audio/drivers/dsound.c b/audio/drivers/dsound.c index 396ff8a332..d74c0a2c0d 100644 --- a/audio/drivers/dsound.c +++ b/audio/drivers/dsound.c @@ -51,7 +51,6 @@ #pragma comment(lib, "dxguid") #endif - typedef struct dsound { LPDIRECTSOUND ds; @@ -174,7 +173,6 @@ static DWORD CALLBACK dsound_thread(PVOID data) /* No space to write, or we don't have data in our fifo, * but we can wait some time before it underruns ... */ - /* We could opt for using the notification interface, * but it is not guaranteed to work, so use high * priority sleeping patterns. diff --git a/audio/drivers/opensl.c b/audio/drivers/opensl.c index d1ae7446a5..c683fecd5c 100644 --- a/audio/drivers/opensl.c +++ b/audio/drivers/opensl.c @@ -232,7 +232,6 @@ static bool sl_start(void *data, bool is_shutdown) return sl->is_paused ? false : true; } - static ssize_t sl_write(void *data, const void *buf_, size_t size) { sl_t *sl = (sl_t*)data; diff --git a/audio/drivers/ps2_audio.c b/audio/drivers/ps2_audio.c new file mode 100644 index 0000000000..efae072a6a --- /dev/null +++ b/audio/drivers/ps2_audio.c @@ -0,0 +1,293 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2014-2017 - Francisco Javier Trujillo Mata + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include +#include + +#include +#include + +#include "../audio_driver.h" + +typedef struct ps2_audio +{ + fifo_buffer_t* buffer; + bool nonblocking; + volatile bool running; + int worker_thread; + int lock; + int cond_lock; + +} ps2_audio_t; + +static ps2_audio_t *backup_ps2; +static u8 audioThreadStack[4 * 1024] __attribute__ ((aligned(16))); + +#define AUDIO_OUT_BUFFER 2 * 1024 +#define AUDIO_BUFFER 64 * 1024 +#define AUDIO_CHANNELS 2 +#define AUDIO_BITS 16 +#define AUDIO_PRIORITY 0x7F /* LOWER VALUE GRATHER PRIORITY*/ + +static void audioMainLoop(void *data) +{ + char out_tmp[AUDIO_OUT_BUFFER]; + ps2_audio_t* ps2 = backup_ps2; + + while (ps2->running) + { + size_t size; + + WaitSema(ps2->lock); + size = MIN(fifo_read_avail(ps2->buffer), sizeof(out_tmp)); + fifo_read(ps2->buffer, out_tmp, size); + iSignalSema(ps2->lock); + iSignalSema(ps2->cond_lock); + + audsrv_wait_audio(size); + audsrv_play_audio(out_tmp, size); + } + + audsrv_stop_audio(); + ExitDeleteThread(); +} + +static void audioCreateThread(ps2_audio_t *ps2) +{ + int ret; + ee_thread_t thread; + + thread.func=&audioMainLoop; + thread.stack=audioThreadStack; + thread.stack_size=sizeof(audioThreadStack); + thread.gp_reg=&_gp; + thread.initial_priority=AUDIO_PRIORITY; + thread.attr=thread.option=0; + + /*Backup the PS2 content to be used in the thread */ + backup_ps2 = ps2; + + ps2->running = true; + ps2->worker_thread = CreateThread(&thread); + + if (ps2->worker_thread >= 0) { + ret = StartThread(ps2->worker_thread, NULL); + if (ret < 0) { + printf("sound_init: StartThread returned %d\n", ret); + } + } else { + printf("CreateThread failed: %d\n", ps2->worker_thread); + } +} + +static void audioStopNDeleteThread(ps2_audio_t *ps2) +{ + ps2->running = false; + if (ps2->worker_thread) { + ps2->worker_thread = 0; + } +} + +static void audioConfigure(ps2_audio_t *ps2, unsigned rate) +{ + int err; + struct audsrv_fmt_t format; + + format.bits = AUDIO_BITS; + format.freq = rate; + format.channels = AUDIO_CHANNELS; + + err = audsrv_set_format(&format); + + if (err){ + printf("set format returned %d\n", err); + printf("audsrv returned error string: %s\n", audsrv_get_error_string()); + } + + audsrv_set_volume(MAX_VOLUME); +} + +static void audioCreateSemas(ps2_audio_t *ps2) +{ + ee_sema_t lock_info; + ee_sema_t cond_lock_info; + + lock_info.max_count = 1; + lock_info.init_count = 1; + lock_info.option = 0; + ps2->lock = CreateSema(&lock_info); + + cond_lock_info.init_count = 1; + cond_lock_info.max_count = 1; + cond_lock_info.option = 0; + + ps2->cond_lock = CreateSema(&cond_lock_info); +} + +static void *ps2_audio_init(const char *device, + unsigned rate, unsigned latency, + unsigned block_frames, + unsigned *new_rate) +{ + ps2_audio_t *ps2 = (ps2_audio_t*)calloc(1, sizeof(ps2_audio_t)); + + if (!ps2) + return NULL; + + ps2->buffer = fifo_new(AUDIO_BUFFER); + audioConfigure(ps2, rate); + audioCreateSemas(ps2); + audioCreateThread(ps2); + + return ps2; +} + +static void ps2_audio_free(void *data) +{ + ps2_audio_t* ps2 = (ps2_audio_t*)data; + if(!ps2) + return; + + if(ps2->running){ + audioStopNDeleteThread(ps2); + + if (ps2->lock){ + iDeleteSema(ps2->lock); + ps2->lock = 0; + } + + if (ps2->cond_lock){ + iDeleteSema(ps2->cond_lock); + ps2->cond_lock = 0; + } + + } + fifo_free(ps2->buffer); + free(ps2); +} + +static ssize_t ps2_audio_write(void *data, const void *buf, size_t size) +{ + ps2_audio_t* ps2 = (ps2_audio_t*)data; + + if (!ps2->running) + return -1; + + if (ps2->nonblocking){ + if (fifo_write_avail(ps2->buffer) < size) + return 0; + } + + while (fifo_write_avail(ps2->buffer) < size) { + WaitSema(ps2->cond_lock); + } + + WaitSema(ps2->lock); + fifo_write(ps2->buffer, buf, size); + iSignalSema(ps2->lock); + + return size; +} + +static bool ps2_audio_alive(void *data) +{ + bool alive = false; + + ps2_audio_t* ps2 = (ps2_audio_t*)data; + if (ps2) { + alive = ps2->running; + } + + return alive; +} + +static bool ps2_audio_stop(void *data) +{ + bool stop = true; + ps2_audio_t* ps2 = (ps2_audio_t*)data; + + if (ps2) { + audioStopNDeleteThread(ps2); + audsrv_stop_audio(); + } + + return stop; +} + +static bool ps2_audio_start(void *data, bool is_shutdown) +{ + ps2_audio_t* ps2 = (ps2_audio_t*)data; + bool start = true; + + if (ps2) { + if (!ps2->running && !ps2->worker_thread) { + audioCreateThread(ps2); + } + } + + return start; +} + +static void ps2_audio_set_nonblock_state(void *data, bool toggle) +{ + ps2_audio_t* ps2 = (ps2_audio_t*)data; + + if (ps2) { + ps2->nonblocking = toggle; + } +} + +static bool ps2_audio_use_float(void *data) +{ + return false; +} + +static size_t ps2_audio_write_avail(void *data) +{ + ps2_audio_t* ps2 = (ps2_audio_t*)data; + + if (ps2 && ps2->running) { + size_t size; + WaitSema(ps2->lock); + size = AUDIO_BUFFER - fifo_read_avail(ps2->buffer); + iSignalSema(ps2->lock); + return size; + } + + return 0; +} + +static size_t ps2_audio_buffer_size(void *data) +{ + return AUDIO_BUFFER; +} + +audio_driver_t audio_ps2 = { + ps2_audio_init, + ps2_audio_write, + ps2_audio_stop, + ps2_audio_start, + ps2_audio_alive, + ps2_audio_set_nonblock_state, + ps2_audio_free, + ps2_audio_use_float, + "ps2", + NULL, + NULL, + ps2_audio_write_avail, + ps2_audio_buffer_size +}; diff --git a/audio/drivers/psp_audio.c b/audio/drivers/psp_audio.c index ec0bfb43b2..54e6d84a75 100644 --- a/audio/drivers/psp_audio.c +++ b/audio/drivers/psp_audio.c @@ -16,21 +16,28 @@ */ #include +#if defined(VITA) || defined(PSP) #include +#endif #include #include #include #include -#ifdef VITA +#if defined(VITA) #include #include #include #include -#else +#elif defined(PSP) #include #include +#elif defined(ORBIS) +#include +#define SCE_AUDIO_OUT_PORT_TYPE_MAIN 0 +#define SCE_AUDIO_OUT_MODE_STEREO 1 +#define SceUID uint32_t #endif #include "../audio_driver.h" @@ -64,10 +71,14 @@ static void audioMainLoop(void *data) { psp_audio_t* psp = (psp_audio_t*)data; -#ifdef VITA +#if defined(VITA) int port = sceAudioOutOpenPort( SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT, psp->rate, SCE_AUDIO_OUT_MODE_STEREO); +#elif defined(ORBIS) + int port = sceAudioOutOpen(0xff, + SCE_AUDIO_OUT_PORT_TYPE_MAIN, 0, AUDIO_OUT_COUNT, + psp->rate, SCE_AUDIO_OUT_MODE_STEREO); #else sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2); #endif @@ -95,7 +106,7 @@ static void audioMainLoop(void *data) scond_signal(psp->cond); slock_unlock(psp->cond_lock); -#ifdef VITA +#if defined(VITA) || defined(ORBIS) sceAudioOutOutput(port, cond ? (psp->zeroBuffer) : (psp->buffer + read_pos_2)); @@ -105,8 +116,10 @@ static void audioMainLoop(void *data) #endif } -#ifdef VITA +#if defined(VITA) sceAudioOutReleasePort(port); +#elif defined(ORBIS) + sceAudioOutClose(port); #else sceAudioSRCChRelease(); #endif @@ -127,12 +140,23 @@ static void *psp_audio_init(const char *device, (void)device; (void)latency; +#ifdef ORBIS + psp->buffer = (uint32_t*) + malloc(AUDIO_BUFFER_SIZE * sizeof(uint32_t)); +#else /* Cache aligned, not necessary but helpful. */ psp->buffer = (uint32_t*) memalign(64, AUDIO_BUFFER_SIZE * sizeof(uint32_t)); +#endif memset(psp->buffer, 0, AUDIO_BUFFER_SIZE * sizeof(uint32_t)); + +#ifdef ORBIS + psp->zeroBuffer = (uint32_t*) + malloc(AUDIO_OUT_COUNT * sizeof(uint32_t)); +#else psp->zeroBuffer = (uint32_t*) memalign(64, AUDIO_OUT_COUNT * sizeof(uint32_t)); +#endif memset(psp->zeroBuffer, 0, AUDIO_OUT_COUNT * sizeof(uint32_t)); psp->read_pos = 0; @@ -228,7 +252,6 @@ static bool psp_audio_alive(void *data) return psp->running; } - static bool psp_audio_stop(void *data) { psp_audio_t* psp = (psp_audio_t*)data; @@ -294,7 +317,6 @@ static size_t psp_buffer_size(void *data) return AUDIO_BUFFER_SIZE /** sizeof(uint32_t)*/; } - audio_driver_t audio_psp = { psp_audio_init, psp_audio_write, @@ -304,8 +326,10 @@ audio_driver_t audio_psp = { psp_audio_set_nonblock_state, psp_audio_free, psp_audio_use_float, -#ifdef VITA +#if defined(VITA) "vita", +#elif defined(ORBIS) + "orbis", #else "psp", #endif diff --git a/audio/drivers/switch_thread_audio.c b/audio/drivers/switch_thread_audio.c index 797bf77e6b..756a69ae90 100644 --- a/audio/drivers/switch_thread_audio.c +++ b/audio/drivers/switch_thread_audio.c @@ -80,7 +80,6 @@ static void mainLoop(void* data) RARCH_LOG("[Audio]: start mainLoop cpu %u tid %u\n", svcGetCurrentProcessorNumber(), swa->thread.handle); - while (swa->running) { size_t buf_avail, avail, to_write; diff --git a/audio/drivers/tinyalsa.c b/audio/drivers/tinyalsa.c index 50d66693d9..3443f049bf 100644 --- a/audio/drivers/tinyalsa.c +++ b/audio/drivers/tinyalsa.c @@ -296,7 +296,6 @@ #define SNDRV_PCM_MMAP_OFFSET_STATUS 0x80000000 #define SNDRV_PCM_MMAP_OFFSET_CONTROL 0x81000000 - /** Audio sample format of a PCM. * The first letter specifiers whether the sample is signed or unsigned. * The letter 'S' means signed. The letter 'U' means unsigned. diff --git a/audio/drivers/wasapi.c b/audio/drivers/wasapi.c index d711fd7141..8348256af8 100644 --- a/audio/drivers/wasapi.c +++ b/audio/drivers/wasapi.c @@ -30,16 +30,12 @@ #include #ifdef _MSC_VER -/* IID_IAudioClient 1CB9AD4C-DBFA-4c32-B178-C2F568A703B2 */ -static const GUID IID_IAudioClient = { 0x1CB9AD4C, 0xDBFA, 0xB178, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2 }; -/* IID_IAudioRenderClient F294ACFC-3146-4483-A7BF-ADDCA7C260E2 */ -static const GUID IID_IAudioRenderClient = { 0xF294ACFC, 0x3146, 0x4483, 0xA7BF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2 }; -/* IID_IMMDeviceEnumerator A95664D2-9614-4F35-A746-DE8DB63617E6 */ -static const GUID IID_IMMDeviceEnumerator = { 0xA95664D2, 0x9614, 0x4F35, 0xA746, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6 }; -/* CLSID_MMDeviceEnumerator BCDE0395-E52F-467C-8E3D-C4579291692E */ -static const GUID CLSID_MMDeviceEnumerator = { 0xBCDE0395, 0xE52F, 0x467C, 0x8E3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E }; -/* KSDATAFORMAT_SUBTYPE_IEEE_FLOAT 00000003-0000-0010-8000-00aa00389b71 */ -static const GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010, 0x8000, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }; +DEFINE_GUID(IID_IAudioClient, 0x1CB9AD4C, 0xDBFA, 0x4C32, 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2); +DEFINE_GUID(IID_IAudioRenderClient, 0xF294ACFC, 0x3146, 0x4483, 0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2); +DEFINE_GUID(IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6); +DEFINE_GUID(CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E); +#undef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT +DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); #endif #include @@ -593,7 +589,6 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency, unsigned u1, unsigned *u2) { HRESULT hr; - bool com_initialized = false; UINT32 frame_count = 0; REFERENCE_TIME dev_period = 0; BYTE *dest = NULL; @@ -605,11 +600,6 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency, WASAPI_CHECK(w, "Out of memory", return NULL); - hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - WASAPI_HR_CHECK(hr, "CoInitializeEx", goto error); - - com_initialized = true; - w->device = wasapi_init_device(dev_id); if (!w->device && dev_id) w->device = wasapi_init_device(NULL); @@ -689,8 +679,6 @@ error: if (w->buffer) fifo_free(w->buffer); free(w); - if (com_initialized) - CoUninitialize(); return NULL; } @@ -902,7 +890,6 @@ static void wasapi_free(void *wh) _IAudioClient_Stop(w->client); WASAPI_RELEASE(w->client); WASAPI_RELEASE(w->device); - CoUninitialize(); if (w->buffer) fifo_free(w->buffer); free(w); diff --git a/audio/drivers/wiiu_audio.c b/audio/drivers/wiiu_audio.c index 0ea9106206..c13d7cf9bb 100644 --- a/audio/drivers/wiiu_audio.c +++ b/audio/drivers/wiiu_audio.c @@ -318,7 +318,6 @@ static size_t ax_audio_buffer_size(void* data) return AX_AUDIO_COUNT; } - audio_driver_t audio_ax = { ax_audio_init, diff --git a/audio/drivers/xaudio.c b/audio/drivers/xaudio.c index 594d3124d4..4549a5f8d4 100644 --- a/audio/drivers/xaudio.c +++ b/audio/drivers/xaudio.c @@ -201,11 +201,6 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels, { xaudio2_t *handle = NULL; WAVEFORMATEX wfx = {0}; -#if !defined(_XBOX) && !defined(__WINRT__) - HRESULT hr = CoInitialize(NULL); - if (FAILED(hr)) - return NULL; -#endif #if defined(__cplusplus) && !defined(CINTERFACE) handle = new xaudio2; @@ -256,9 +251,6 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels, error: xaudio2_free(handle); -#if !defined(_XBOX) && !defined(__WINRT__) - CoUninitialize(); -#endif return NULL; } @@ -408,10 +400,6 @@ static void xa_free(void *data) if (xa->xa) xaudio2_free(xa->xa); free(xa); - -#if !defined(_XBOX) && !defined(__WINRT__) - CoUninitialize(); -#endif } static size_t xa_write_avail(void *data) diff --git a/audio/drivers/xaudio27.h b/audio/drivers/xaudio27.h index 788fe16789..2db9fdd372 100644 --- a/audio/drivers/xaudio27.h +++ b/audio/drivers/xaudio27.h @@ -169,7 +169,6 @@ typedef OPAQUE IXAudio2EngineCallback IXAudio2EngineCallback; typedef OPAQUE IXAudio2SubmixVoice IXAudio2SubmixVoice; #endif - typedef struct XAUDIO2_BUFFER { UINT32 Flags; @@ -361,4 +360,3 @@ static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32 flags, XAUDIO2_ #pragma pack(pop) #endif - diff --git a/audio/drivers_resampler/cc_resampler.c b/audio/drivers_resampler/cc_resampler.c index 02e62a57be..b1136f1a16 100644 --- a/audio/drivers_resampler/cc_resampler.c +++ b/audio/drivers_resampler/cc_resampler.c @@ -55,7 +55,6 @@ typedef struct rarch_CC_resampler void (*process)(void *re, struct resampler_data *data); } rarch_CC_resampler_t; - #ifdef _MIPS_ARCH_ALLEGREX static void resampler_CC_process(void *re_, struct resampler_data *data) { @@ -115,7 +114,6 @@ static void resampler_CC_process(void *re_, struct resampler_data *data) "vadd.q c720, c720, c620 \n" - "vadd.s s730, s730, s730[1] \n" "mfv %0, s730 \n" @@ -216,7 +214,6 @@ static void resampler_CC_downsample(void *re_, struct resampler_data *data) vec_ww1 = _mm_mul_ps(vec_w1, vec_w1); vec_ww2 = _mm_mul_ps(vec_w2, vec_w2); - vec_ww1 = _mm_mul_ps(vec_ww1, _mm_sub_ps(_mm_set_ps1(3.0),vec_ww1)); vec_ww2 = _mm_mul_ps(vec_ww2, _mm_sub_ps(_mm_set_ps1(3.0),vec_ww2)); @@ -307,7 +304,6 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data) vec_ww1 = _mm_mul_ps(vec_w1, vec_w1); vec_ww2 = _mm_mul_ps(vec_w2, vec_w2); - vec_ww1 = _mm_mul_ps(vec_ww1,_mm_sub_ps(_mm_set_ps1(3.0),vec_ww1)); vec_ww2 = _mm_mul_ps(vec_ww2,_mm_sub_ps(_mm_set_ps1(3.0),vec_ww2)); @@ -349,7 +345,6 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data) data->output_frames = outp - (audio_frame_float_t*)data->data_out; } - #elif defined (__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS) #define CC_RESAMPLER_IDENT "NEON" @@ -492,7 +487,6 @@ static void resampler_CC_process(void *re_, struct resampler_data *data) re->process(re_, data); } - static void *resampler_CC_init(const struct resampler_config *config, double bandwidth_mod, enum resampler_quality quality, diff --git a/audio/librsound.c b/audio/librsound.c index da2aaeaa86..df01eb24de 100644 --- a/audio/librsound.c +++ b/audio/librsound.c @@ -46,7 +46,6 @@ #define NETWORK_COMPAT_HEADERS 1 #endif - #ifdef NETWORK_COMPAT_HEADERS #include #include @@ -158,7 +157,6 @@ static int rsnd_poll(struct pollfd *fd, int numfd, int timeout); static void rsnd_cb_thread(void *thread_data); static void rsnd_thread(void *thread_data); - /* Determine whether we're running big- or little endian */ static INLINE int rsnd_is_little_endian(void) { @@ -242,7 +240,6 @@ static int rsnd_connect_server( rsound_t *rd ) rd->conn_type = RSD_CONN_TCP; - rd->conn.socket = net_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if ( rd->conn.socket < 0 ) goto error; @@ -312,7 +309,6 @@ static int rsnd_send_header_info(rsound_t *rd) #define FRAMESIZE 34 #define FORMAT 42 - uint32_t temp_rate = rd->rate; uint16_t temp_channels = rd->channels; @@ -980,7 +976,6 @@ static int rsnd_close_ctl(rsound_t *rd) return 0; } - // Sends delay info request to server on the ctl socket. This code section isn't critical, and will work if it works. // It will never block. static int rsnd_send_info_query(rsound_t *rd) @@ -1296,7 +1291,6 @@ static int rsnd_reset(rsound_t *rd) return 0; } - int rsd_stop(rsound_t *rd) { retro_assert(rd != NULL); @@ -1403,7 +1397,6 @@ int rsd_exec(rsound_t *rsound) return fd; } - /* ioctl()-ish param setting :D */ int rsd_set_param(rsound_t *rd, enum rsd_settings option, void* param) { @@ -1493,7 +1486,6 @@ void rsd_delay_wait(rsound_t *rd) /* Latency of stream in ms */ int latency_ms = rsd_delay_ms(rd); - /* Should we sleep for a while to keep the latency low? */ if ( rd->max_latency < latency_ms ) { diff --git a/bootstrap/vita/sbrk.c b/bootstrap/vita/sbrk.c index 051cae86b7..013ba9503d 100644 --- a/bootstrap/vita/sbrk.c +++ b/bootstrap/vita/sbrk.c @@ -46,7 +46,6 @@ void _init_vita_heap(void) { _newlib_vm_memblock = 0; } - // Create a mutex to use inside _sbrk_r if (sceKernelCreateLwMutex((struct SceKernelLwMutexWork*)_newlib_sbrk_mutex, "sbrk mutex", 0, 0, 0) < 0) { goto failure; diff --git a/cheevos/cheevos.c b/cheevos/cheevos.c index 916606adcc..04dd23b153 100644 --- a/cheevos/cheevos.c +++ b/cheevos/cheevos.c @@ -2081,7 +2081,7 @@ void cheevos_populate_menu(void *data) cheevo_t *cheevo = cheevos_locals.core.cheevos; end = cheevo + cheevos_locals.core.count; - if(settings->bools.cheevos_enable && settings->bools.cheevos_hardcore_mode_enable + if(settings->bools.cheevos_enable && settings->bools.cheevos_hardcore_mode_enable && cheevos_loaded) { if (!cheevos_hardcore_paused) @@ -2571,10 +2571,11 @@ enum static int cheevos_iterate(coro_t *coro) { - ssize_t num_read = 0; - size_t to_read = 4096; - uint8_t *buffer = NULL; - const char *end = NULL; + const int SNES_HEADER_LEN = 0x200; + ssize_t num_read = 0; + size_t to_read = 4096; + uint8_t *buffer = NULL; + const char *end = NULL; static const uint32_t genesis_exts[] = { @@ -2612,18 +2613,16 @@ static int cheevos_iterate(coro_t *coro) static cheevos_finder_t finders[] = { - {SNES_MD5, "SNES (8Mb padding)", snes_exts}, + {SNES_MD5, "SNES (discards header)", snes_exts}, {GENESIS_MD5, "Genesis (6Mb padding)", genesis_exts}, {LYNX_MD5, "Atari Lynx (only first 512 bytes)", lynx_exts}, - {NES_MD5, "NES (discards VROM)", NULL}, + {NES_MD5, "NES (discards header)", NULL}, {GENERIC_MD5, "Generic (plain content)", NULL}, {FILENAME_MD5, "Generic (filename)", NULL} }; CORO_ENTER(); - - cheevos_locals.addrs_patched = false; coro->settings = config_get_ptr(); @@ -2902,30 +2901,21 @@ found: MD5_Init(&coro->md5); - coro->offset = 0; + /* Checks for the existence of a headered SNES file. + Unheadered files fall back to GENERIC_MD5. */ + + if (coro->len < 0x2000 || coro->len % 0x2000 != SNES_HEADER_LEN) + { + coro->gameid = 0; + CORO_RET(); + } + + coro->offset = 512; coro->count = 0; CORO_GOSUB(EVAL_MD5); - - if (coro->count == 0) - { - MD5_Final(coro->hash, &coro->md5); - coro->gameid = 0; - CORO_RET(); - } - - if (coro->count < size_in_megabytes(8)) - { - /* - * Inputs: CHEEVOS_VAR_MD5, CHEEVOS_VAR_OFFSET, CHEEVOS_VAR_COUNT - * Outputs: CHEEVOS_VAR_MD5 - */ - coro->offset = 0; - coro->count = size_in_megabytes(8) - coro->count; - CORO_GOSUB(FILL_MD5); - } - MD5_Final(coro->hash, &coro->md5); + CORO_GOTO(GET_GAMEID); /************************************************************************** @@ -2987,12 +2977,8 @@ found: *************************************************************************/ CORO_SUB(NES_MD5) - /* Note about the references to the FCEU emulator below. There is no - * core-specific code in this function, it's rather Retro Achievements - * specific code that must be followed to the letter so we compute - * the correct ROM hash. Retro Achievements does indeed use some - * FCEU related method to compute the hash, since its NES emulator - * is based on it. */ + /* Checks for the existence of a headered NES file. + Unheadered files fall back to GENERIC_MD5. */ if (coro->len < sizeof(coro->header)) { @@ -3012,37 +2998,11 @@ found: CORO_RET(); } - { - size_t romsize = 256; - /* from FCEU core - compute size using the cart mapper */ - int mapper = (coro->header.rom_type >> 4) | (coro->header.rom_type2 & 0xF0); - - if (coro->header.rom_size) - romsize = next_pow2(coro->header.rom_size); - - /* for games not to the power of 2, so we just read enough - * PRG rom from it, but we have to keep ROM_size to the power of 2 - * since PRGCartMapping wants ROM_size to be to the power of 2 - * so instead if not to power of 2, we just use head.ROM_size when - * we use FCEU_read. */ - coro->round = mapper != 53 && mapper != 198 && mapper != 228; - coro->bytes = coro->round ? romsize : coro->header.rom_size; - } - - /* from FCEU core - check if Trainer included in ROM data */ MD5_Init(&coro->md5); - coro->offset = sizeof(coro->header) + (coro->header.rom_type & 4 - ? sizeof(coro->header) : 0); - coro->count = 0x4000 * coro->bytes; + coro->offset = sizeof(coro->header); + coro->count = coro->len - coro->offset; CORO_GOSUB(EVAL_MD5); - if (coro->count < 0x4000 * coro->bytes) - { - coro->offset = 0xff; - coro->count = 0x4000 * coro->bytes - coro->count; - CORO_GOSUB(FILL_MD5); - } - MD5_Final(coro->hash, &coro->md5); CORO_GOTO(GET_GAMEID); diff --git a/command.c b/command.c index 0f0ad1969d..7d97477708 100644 --- a/command.c +++ b/command.c @@ -42,7 +42,7 @@ #ifdef HAVE_CHEEVOS #include "cheevos/cheevos.h" #ifdef HAVE_NEW_CHEEVOS -#include "cheevos/fixup.h" +#include "cheevos-new/fixup.h" #else #include "cheevos/var.h" #endif @@ -244,8 +244,6 @@ static const struct cmd_map map[] = { }; #endif - - bool command_set_shader(const char *arg) { char msg[256]; @@ -273,7 +271,6 @@ bool command_set_shader(const char *arg) #endif } - #if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS) #define SMY_CMD_STR "READ_CORE_RAM" static bool command_read_ram(const char *arg) @@ -426,7 +423,6 @@ static bool command_network_init(command_t *handle, uint16_t port) msg_hash_to_str(MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT), (unsigned short)port); - if (fd < 0) goto error; @@ -1150,7 +1146,6 @@ static void command_event_init_cheats(void) cheat_manager_alloc_if_empty() ; cheat_manager_load_game_specific_cheats() ; - if (settings != NULL && settings->bools.apply_cheats_after_load) cheat_manager_apply_cheats(); } @@ -1347,7 +1342,6 @@ static bool command_event_init_core(enum rarch_core_type *data) if(settings->bools.auto_shaders_enable) config_load_shader_preset(); - /* reset video format to libretro's default */ video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555); @@ -1370,7 +1364,6 @@ static bool command_event_init_core(enum rarch_core_type *data) if (!core_load(settings->uints.input_poll_type_behavior)) return false; - rarch_ctl(RARCH_CTL_SET_FRAME_LIMIT, NULL); return true; } @@ -1634,7 +1627,6 @@ static void command_event_save_current_config(enum override_type type) break; } - if (!string_is_empty(msg)) runloop_msg_queue_push(msg, 1, 180, true); } @@ -1834,9 +1826,6 @@ void command_playlist_update_write( **/ bool command_event(enum event_command cmd, void *data) { -#ifdef HAVE_DISCORD - static bool discord_inited = false; -#endif bool boolean = false; switch (cmd) @@ -2031,9 +2020,6 @@ bool command_event(enum event_command cmd, void *data) path_clear(RARCH_PATH_CORE); rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL); #endif - core_unload_game(); - if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) - core_unload(); #ifdef HAVE_DISCORD if (discord_is_inited) { @@ -2986,26 +2972,24 @@ TODO: Add a setting for these tweaks */ if (!settings->bools.discord_enable) return false; - if (discord_inited) + if (discord_is_ready()) return true; discord_init(); - discord_inited = true; } #endif break; case CMD_EVENT_DISCORD_DEINIT: #ifdef HAVE_DISCORD - if (!discord_inited) + if (!discord_is_ready()) return false; discord_shutdown(); - discord_inited = false; #endif break; case CMD_EVENT_DISCORD_UPDATE: #ifdef HAVE_DISCORD - if (!data || !discord_inited) + if (!data || !discord_is_ready()) return false; { diff --git a/config.def.h b/config.def.h index 7ab919da62..98c1c33740 100644 --- a/config.def.h +++ b/config.def.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -302,6 +302,7 @@ static bool quick_menu_show_save_content_dir_overrides = true; static bool kiosk_mode_enable = false; +static bool menu_horizontal_animation = true; static bool menu_show_online_updater = true; static bool menu_show_load_core = true; static bool menu_show_load_content = true; @@ -379,6 +380,7 @@ static const uint32_t menu_bg_dark_color = 0xc0202020; static const uint32_t menu_bg_light_color = 0xc0404040; static const uint32_t menu_border_dark_color = 0xc0204020; static const uint32_t menu_border_light_color = 0xc0408040; +static unsigned rgui_color_theme = RGUI_THEME_CUSTOM; #else static bool default_block_config_read = false; @@ -400,9 +402,11 @@ static bool default_screenshots_in_content_dir = false; #if defined(__CELLOS_LV2__) || defined(_XBOX1) || defined(_XBOX360) static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L3_R3; +#elif defined(PS2) +static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_HOLD_START; #elif defined(VITA) static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L1_R1_START_SELECT; -#elif defined(SWITCH) +#elif defined(SWITCH) || defined(ORBIS) static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_START_SELECT; #else static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_NONE; @@ -685,6 +689,9 @@ static const uint16_t network_remote_base_port = 55400; /* Number of entries that will be kept in content history playlist file. */ static const unsigned default_content_history_size = 100; +/* File format to use when writing playlists to disk */ +static const bool playlist_use_old_format = false; + /* Show Menu start-up screen on boot. */ static const bool default_menu_show_start_screen = true; diff --git a/configuration.c b/configuration.c index d159e75c29..c0532f4c43 100644 --- a/configuration.c +++ b/configuration.c @@ -3,7 +3,7 @@ * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2014-2017 - Jean-André Santoni * Copyright (C) 2015-2017 - Andrés Suárez - * Copyright (C) 2016-2017 - Brad Parker + * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -218,6 +218,7 @@ enum input_driver_enum INPUT_X, INPUT_WAYLAND, INPUT_DINPUT, + INPUT_PS4, INPUT_PS3, INPUT_PSP, INPUT_PS2, @@ -244,6 +245,7 @@ enum joypad_driver_enum JOYPAD_GX, JOYPAD_WIIU, JOYPAD_XDK, + JOYPAD_PS4, JOYPAD_PSP, JOYPAD_PS2, JOYPAD_CTR, @@ -371,7 +373,7 @@ static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_XENON360; static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WII; #elif defined(WIIU) static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WIIU; -#elif defined(PSP) || defined(VITA) +#elif defined(PSP) || defined(VITA) || defined(ORBIS) static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PSP; #elif defined(PS2) static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PS2; @@ -453,6 +455,8 @@ static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_SDL2; static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_RWEBINPUT; #elif defined(_WIN32) static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_DINPUT; +#elif defined(ORBIS) +static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS4; #elif defined(__CELLOS_LV2__) static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS3; #elif defined(PSP) || defined(VITA) @@ -499,6 +503,8 @@ static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_GX; static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_WIIU; #elif defined(_XBOX) static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_XDK; +#elif defined(ORBIS) +static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_PS4; #elif defined(PSP) || defined(VITA) static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_PSP; #elif defined(PS2) @@ -687,8 +693,10 @@ const char *config_get_default_audio(void) case AUDIO_WIIU: return "AX"; case AUDIO_PSP: -#ifdef VITA +#if defined(VITA) return "vita"; +#elif defined(ORBIS) + return "orbis"; #else return "psp"; #endif @@ -843,6 +851,8 @@ const char *config_get_default_input(void) { case INPUT_ANDROID: return "android"; + case INPUT_PS4: + return "ps4"; case INPUT_PS3: return "ps3"; case INPUT_PSP: @@ -909,6 +919,8 @@ const char *config_get_default_joypad(void) switch (default_driver) { + case JOYPAD_PS4: + return "ps4"; case JOYPAD_PS3: return "ps3"; case JOYPAD_XINPUT: @@ -962,7 +974,6 @@ const char *config_get_default_joypad(void) return "null"; } - /** * config_get_default_camera: * @@ -1122,6 +1133,9 @@ static struct config_array_setting *populate_settings_array(settings_t *settings unsigned count = 0; struct config_array_setting *tmp = (struct config_array_setting*)calloc(1, (*size + 1) * sizeof(struct config_array_setting)); + if (!tmp) + return NULL; + /* Arrays */ SETTING_ARRAY("playlist_names", settings->arrays.playlist_names, false, NULL, true); SETTING_ARRAY("playlist_cores", settings->arrays.playlist_cores, false, NULL, true); @@ -1167,6 +1181,9 @@ static struct config_path_setting *populate_settings_path(settings_t *settings, global_t *global = global_get_ptr(); struct config_path_setting *tmp = (struct config_path_setting*)calloc(1, (*size + 1) * sizeof(struct config_path_setting)); + if (!tmp) + return NULL; + /* Paths */ #ifdef HAVE_XMB SETTING_PATH("xmb_font", settings->paths.path_menu_xmb_font, false, NULL, true); @@ -1395,11 +1412,11 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, #ifdef GEKKO SETTING_BOOL("video_vfilter", &settings->bools.video_vfilter, true, video_vfilter, false); #endif -#ifdef HAVE_MENU - SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false); #ifdef HAVE_THREADS SETTING_BOOL("threaded_data_runloop_enable", &settings->bools.threaded_data_runloop_enable, true, threaded_data_runloop_enable, false); #endif +#ifdef HAVE_MENU + SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false); SETTING_BOOL("menu_throttle_framerate", &settings->bools.menu_throttle_framerate, true, true, false); SETTING_BOOL("menu_linear_filter", &settings->bools.menu_linear_filter, true, true, false); SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, true, false); @@ -1545,6 +1562,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("video_3ds_lcd_bottom", &settings->bools.video_3ds_lcd_bottom, true, video_3ds_lcd_bottom, false); #endif + SETTING_BOOL("playlist_use_old_format", &settings->bools.playlist_use_old_format, true, playlist_use_old_format, false); + *size = count; return tmp; @@ -1555,6 +1574,9 @@ static struct config_float_setting *populate_settings_float(settings_t *settings unsigned count = 0; struct config_float_setting *tmp = (struct config_float_setting*)calloc(1, (*size + 1) * sizeof(struct config_float_setting)); + if (!tmp) + return NULL; + SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, aspect_ratio, false); SETTING_FLOAT("video_scale", &settings->floats.video_scale, false, 0.0f, false); SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, crt_refresh_rate, false); @@ -1591,6 +1613,9 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings, unsigned count = 0; struct config_uint_setting *tmp = (struct config_uint_setting*)malloc((*size + 1) * sizeof(struct config_uint_setting)); + if (!tmp) + return NULL; + #ifdef HAVE_NETWORKING SETTING_UINT("streaming_mode", &settings->uints.streaming_mode, true, STREAMING_MODE_TWITCH, false); #endif @@ -1627,6 +1652,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings, SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false); SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false); SETTING_UINT("menu_timedate_style", &settings->uints.menu_timedate_style, true, menu_timedate_style, false); + SETTING_UINT("rgui_menu_color_theme", &settings->uints.menu_rgui_color_theme, true, rgui_color_theme, false); #ifdef HAVE_LIBNX SETTING_UINT("split_joycon_p1", &settings->uints.input_split_joycon[0], true, 0, false); SETTING_UINT("split_joycon_p2", &settings->uints.input_split_joycon[1], true, 0, false); @@ -1715,6 +1741,9 @@ static struct config_size_setting *populate_settings_size(settings_t *settings, unsigned count = 0; struct config_size_setting *tmp = (struct config_size_setting*)calloc((*size + 1), sizeof(struct config_size_setting)); + if (!tmp) + return NULL; + SETTING_SIZE("rewind_buffer_size", &settings->sizes.rewind_buffer_size, true, rewind_buffer_size, false); *size = count; @@ -1727,6 +1756,9 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in unsigned count = 0; struct config_int_setting *tmp = (struct config_int_setting*)calloc((*size + 1), sizeof(struct config_int_setting)); + if (!tmp) + return NULL; + SETTING_INT("state_slot", &settings->ints.state_slot, false, 0 /* TODO */, false); #ifdef HAVE_NETWORKING SETTING_INT("netplay_check_frames", &settings->ints.netplay_check_frames, true, netplay_check_frames, false); @@ -2267,7 +2299,6 @@ static config_file_t *open_default_config_file(void) /* Try to create a new config file. */ conf = config_file_new(NULL); - if (conf) { /* Since this is a clean config file, we can @@ -2275,7 +2306,7 @@ static config_file_t *open_default_config_file(void) fill_pathname_resolve_relative(conf_path, app_path, file_path_str(FILE_PATH_MAIN_CONFIG), path_size); config_set_bool(conf, "config_save_on_exit", true); - saved = config_file_write(conf, conf_path); + saved = config_file_write(conf, conf_path, true); } if (!saved) @@ -2311,7 +2342,7 @@ static config_file_t *open_default_config_file(void) if (conf) { config_set_bool(conf, "config_save_on_exit", true); - saved = config_file_write(conf, conf_path); + saved = config_file_write(conf, conf_path, true); } if (!saved) @@ -2386,7 +2417,7 @@ static config_file_t *open_default_config_file(void) { /* Since this is a clean config file, we can safely use config_save_on_exit. */ config_set_bool(conf, "config_save_on_exit", true); - saved = config_file_write(conf, conf_path); + saved = config_file_write(conf, conf_path, true); } if (!saved) @@ -2633,7 +2664,6 @@ static void config_get_hex_base(config_file_t *conf, } #endif - /** * config_load: * @path : path to be read from. @@ -2708,11 +2738,11 @@ static bool config_load_file(const char *path, bool set_defaults, while (extra_path) { - bool ret = config_append_file(conf, extra_path); + bool result = config_append_file(conf, extra_path); RARCH_LOG("Config: appending config \"%s\"\n", extra_path); - if (!ret) + if (!result) RARCH_ERR("Config: failed to append config \"%s\"\n", extra_path); extra_path = strtok_r(NULL, "|", &save); } @@ -2840,7 +2870,6 @@ static bool config_load_file(const char *path, bool set_defaults, CONFIG_GET_INT_BASE(conf, settings, uints.led_map[i], buf); } - /* Hexadecimal settings */ if (config_get_hex(conf, "video_message_color", &msg_color)) @@ -3024,7 +3053,6 @@ static bool config_load_file(const char *path, bool set_defaults, } } - if (!string_is_empty(settings->paths.directory_screenshot)) { if (string_is_equal(settings->paths.directory_screenshot, "default")) @@ -3091,7 +3119,6 @@ static bool config_load_file(const char *path, bool set_defaults, if (settings->floats.fastforward_ratio < 0.0f) configuration_set_float(settings, settings->floats.fastforward_ratio, 0.0f); - #ifdef HAVE_LAKKA settings->bools.ssh_enable = filestream_exists(LAKKA_SSH_PATH); settings->bools.samba_enable = filestream_exists(LAKKA_SAMBA_PATH); @@ -3187,7 +3214,6 @@ static bool config_load_file(const char *path, bool set_defaults, ret = true; - end: if (conf) config_file_free(conf); @@ -3498,7 +3524,6 @@ bool config_load_remap(void) malloc(PATH_MAX_LENGTH * sizeof(char)); remap_directory[0] = core_path[0] = game_path[0] = '\0'; - strlcpy(remap_directory, settings->paths.directory_input_remapping, path_size); @@ -3565,7 +3590,6 @@ bool config_load_remap(void) input_remapping_set_defaults(false); } - /* Create a new config file from core_path */ new_conf = config_file_new(core_path); @@ -3791,8 +3815,6 @@ static void parse_config_file(void) path_get(RARCH_PATH_CONFIG)); } - - static void save_keybind_key(config_file_t *conf, const char *prefix, const char *base, const struct retro_keybind *bind) { @@ -4046,13 +4068,12 @@ static bool config_save_keybinds_file(const char *path) for (i = 0; i < MAX_USERS; i++) save_keybinds_user(conf, i); - ret = config_file_write(conf, path); + ret = config_file_write(conf, path, true); config_file_free(conf); return ret; } #endif - /** * config_save_autoconf_profile: * @path : Path that shall be written to. @@ -4155,7 +4176,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user) &input_config_binds[user][i], false, false); } - ret = config_file_write(conf, autoconf_file); + ret = config_file_write(conf, autoconf_file, false); config_file_free(conf); free(buf); @@ -4170,7 +4191,6 @@ error: return false; } - /** * config_save_file: * @path : Path that shall be written to. @@ -4378,7 +4398,6 @@ bool config_save_file(const char *path) settings->uints.menu_border_light_color); #endif - video_driver_save_settings(conf); #ifdef HAVE_LAKKA @@ -4405,7 +4424,7 @@ bool config_save_file(const char *path) for (i = 0; i < MAX_USERS; i++) save_keybinds_user(conf, i); - ret = config_file_write(conf, path); + ret = config_file_write(conf, path, true); config_file_free(conf); return ret; @@ -4651,7 +4670,6 @@ bool config_save_overrides(int override_type) config_set_int(conf, cfg, overrides->uints.input_joypad_map[i]); } - /* blacklist these since they are handled by remaps */ /* to-do: add setting to control blacklisting if (settings->uints.input_libretro_device[i] @@ -4677,17 +4695,17 @@ bool config_save_overrides(int override_type) case OVERRIDE_CORE: /* Create a new config file from core_path */ RARCH_LOG ("[overrides] path %s\n", core_path); - ret = config_file_write(conf, core_path); + ret = config_file_write(conf, core_path, true); break; case OVERRIDE_GAME: /* Create a new config file from core_path */ RARCH_LOG ("[overrides] path %s\n", game_path); - ret = config_file_write(conf, game_path); + ret = config_file_write(conf, game_path, true); break; case OVERRIDE_CONTENT_DIR: /* Create a new config file from content_path */ RARCH_LOG ("[overrides] path %s\n", content_path); - ret = config_file_write(conf, content_path); + ret = config_file_write(conf, content_path, true); break; default: break; @@ -4736,7 +4754,7 @@ bool config_save_overrides(int override_type) /* Replaces currently loaded configuration file with * another one. Will load a dummy core to flush state * properly. */ -bool config_replace(bool config_save_on_exit, char *path) +bool config_replace(bool config_replace_save_on_exit, char *path) { content_ctx_info_t content_info = {0}; @@ -4748,7 +4766,7 @@ bool config_replace(bool config_save_on_exit, char *path) if (string_is_equal(path, path_get(RARCH_PATH_CONFIG))) return false; - if (config_save_on_exit && !path_is_empty(RARCH_PATH_CONFIG)) + if (config_replace_save_on_exit && !path_is_empty(RARCH_PATH_CONFIG)) config_save_file(path_get(RARCH_PATH_CONFIG)); path_set(RARCH_PATH_CONFIG, path); diff --git a/configuration.h b/configuration.h index 85953e18c2..464885a58f 100644 --- a/configuration.h +++ b/configuration.h @@ -2,7 +2,7 @@ * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2016 - Daniel De Matteis * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -300,6 +300,7 @@ typedef struct settings bool video_window_save_positions; bool sustained_performance_mode; + bool playlist_use_old_format; } bools; struct @@ -410,6 +411,7 @@ typedef struct settings unsigned menu_bg_light_color; unsigned menu_border_dark_color; unsigned menu_border_light_color; + unsigned menu_rgui_color_theme; unsigned menu_xmb_layout; unsigned menu_xmb_shader_pipeline; unsigned menu_xmb_scale_factor; diff --git a/configure b/configure index 1bdac87b51..5d7a948491 100755 --- a/configure +++ b/configure @@ -11,3 +11,7 @@ cat /dev/null > config.log . qb/qb.comp.sh . qb/qb.libs.sh + +. qb/qb.moc.sh + +. qb/qb.make.sh diff --git a/content.h b/content.h index 6f2997358a..5734bb789b 100644 --- a/content.h +++ b/content.h @@ -82,10 +82,13 @@ bool content_reset_savestate_backups(void); bool content_undo_load_buf_is_empty(void); bool content_undo_save_buf_is_empty(void); -/* Clears the pending subsystem rom buffer*/ +/* Checks if launched from the commandline */ +bool content_launched_from_cli(void); + +/* Clears the pending subsystem rom buffer */ bool content_is_subsystem_pending_load(void); -/* Clears the pending subsystem rom buffer*/ +/* Clears the pending subsystem rom buffer */ void content_clear_subsystem(void); /* Set the current subsystem*/ @@ -106,6 +109,9 @@ void content_set_subsystem_info(void); /* Get the path to the last selected subsystem rom */ char* content_get_subsystem_rom(unsigned index); +/* Sets the subsystem by name */ +bool content_set_subsystem_by_name(const char* subsystem_name); + RETRO_END_DECLS #endif diff --git a/core_impl.c b/core_impl.c index a8a5acb949..01caeab3a9 100644 --- a/core_impl.c +++ b/core_impl.c @@ -134,7 +134,6 @@ bool core_set_default_callbacks(struct retro_callbacks *cbs) return true; } - bool core_deinit(void *data) { struct retro_callbacks *cbs = (struct retro_callbacks*)data; @@ -402,7 +401,6 @@ bool core_unload(void) return true; } - bool core_unload_game(void) { video_driver_free_hw_context(); diff --git a/core_info.c b/core_info.c index 5a33e9f107..1576df9aec 100644 --- a/core_info.c +++ b/core_info.c @@ -201,7 +201,7 @@ static bool core_info_list_iterate( if (!current_path) return false; - info_path_base = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + info_path_base = (char*)malloc(info_path_base_size); info_path_base[0] = '\0'; @@ -230,17 +230,15 @@ static bool core_info_list_iterate( static core_info_list_t *core_info_list_new(const char *path, const char *libretro_info_dir, const char *exts, - bool show_hidden_files) + bool dir_show_hidden_files) { size_t i; core_info_t *core_info = NULL; core_info_list_t *core_info_list = NULL; const char *path_basedir = libretro_info_dir; struct string_list *contents = string_list_new(); - bool ok; - - ok = dir_list_append(contents, path, exts, - false, show_hidden_files, false, false); + bool ok = dir_list_append(contents, path, exts, + false, dir_show_hidden_files, false, false); #if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP /* UWP: browse the optional packages for additional cores */ @@ -249,7 +247,7 @@ static core_info_list_t *core_info_list_new(const char *path, for (i = 0; i < core_packages->size; i++) { dir_list_append(contents, core_packages->elems[i].data, exts, - false, show_hidden_files, false, false); + false, dir_show_hidden_files, false, false); } string_list_free(core_packages); #else @@ -574,7 +572,11 @@ static bool core_info_list_update_missing_firmware_internal( if (!info) return false; - path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + path = (char*)malloc(path_size); + + if (!path) + return false; + path[0] = '\0'; for (i = 0; i < info->firmware_count; i++) @@ -676,12 +678,12 @@ void core_info_deinit_list(void) } bool core_info_init_list(const char *path_info, const char *dir_cores, - const char *exts, bool show_hidden_files) + const char *exts, bool dir_show_hidden_files) { if (!(core_info_curr_list = core_info_list_new(dir_cores, !string_is_empty(path_info) ? path_info : dir_cores, exts, - show_hidden_files))) + dir_show_hidden_files))) return false; return true; } @@ -797,13 +799,13 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list, void core_info_get_name(const char *path, char *s, size_t len, const char *path_info, const char *dir_cores, - const char *exts, bool show_hidden_files) + const char *exts, bool dir_show_hidden_files) { size_t i; const char *path_basedir = !string_is_empty(path_info) ? path_info : dir_cores; struct string_list *contents = dir_list_new( - dir_cores, exts, false, show_hidden_files, false, false); + dir_cores, exts, false, dir_show_hidden_files, false, false); if (!contents) return; diff --git a/core_type.h b/core_type.h index e8933de6bd..40b2d8b16e 100644 --- a/core_type.h +++ b/core_type.h @@ -24,7 +24,8 @@ enum rarch_core_type CORE_TYPE_MPV, CORE_TYPE_IMAGEVIEWER, CORE_TYPE_NETRETROPAD, - CORE_TYPE_VIDEO_PROCESSOR + CORE_TYPE_VIDEO_PROCESSOR, + CORE_TYPE_GONG }; #endif diff --git a/cores/dynamic_dummy.c b/cores/dynamic_dummy.c index 21b8014a85..2aba2f5fd2 100644 --- a/cores/dynamic_dummy.c +++ b/cores/dynamic_dummy.c @@ -223,5 +223,3 @@ void libretro_dummy_retro_cheat_set(unsigned idx, (void)enabled; (void)code; } - - diff --git a/cores/internal_cores.h b/cores/internal_cores.h index 08e916d63e..ff20a5180a 100644 --- a/cores/internal_cores.h +++ b/cores/internal_cores.h @@ -360,6 +360,62 @@ size_t libretro_videoprocessor_retro_get_memory_size(unsigned id); #endif +#ifdef HAVE_EASTEREGG +/* Internal gong core. */ + +void libretro_gong_retro_init(void); + +void libretro_gong_retro_deinit(void); + +unsigned libretro_gong_retro_api_version(void); + +void libretro_gong_retro_get_system_info(struct retro_system_info *info); + +void libretro_gong_retro_get_system_av_info(struct retro_system_av_info *info); + +void libretro_gong_retro_set_environment(retro_environment_t cb); + +void libretro_gong_retro_set_video_refresh(retro_video_refresh_t cb); + +void libretro_gong_retro_set_audio_sample(retro_audio_sample_t cb); + +void libretro_gong_retro_set_audio_sample_batch(retro_audio_sample_batch_t cb); + +void libretro_gong_retro_set_input_poll(retro_input_poll_t cb); + +void libretro_gong_retro_set_input_state(retro_input_state_t cb); + +void libretro_gong_retro_set_controller_port_device(unsigned port, unsigned device); + +void libretro_gong_retro_reset(void); + +void libretro_gong_retro_run(void); + +size_t libretro_gong_retro_serialize_size(void); + +bool libretro_gong_retro_serialize(void *data, size_t size); + +bool libretro_gong_retro_unserialize(const void *data, size_t size); + +void libretro_gong_retro_cheat_reset(void); + +void libretro_gong_retro_cheat_set(unsigned index, bool enabled, const char *code); + +bool libretro_gong_retro_load_game(const struct retro_game_info *game); + +bool libretro_gong_retro_load_game_special(unsigned game_type, + const struct retro_game_info *info, size_t num_info); + +void libretro_gong_retro_unload_game(void); + +unsigned libretro_gong_retro_get_region(void); + +void *libretro_gong_retro_get_memory_data(unsigned id); + +size_t libretro_gong_retro_get_memory_size(unsigned id); + +#endif + RETRO_END_DECLS #endif diff --git a/cores/libretro-ffmpeg/Makefile b/cores/libretro-ffmpeg/Makefile index 6971ec6586..a998c64971 100644 --- a/cores/libretro-ffmpeg/Makefile +++ b/cores/libretro-ffmpeg/Makefile @@ -195,7 +195,7 @@ CFLAGS += -D__LIBRETRO__ include Makefile.common -CFLAGS += $(DEFINES) $(INCFLAGS) $(GLFLAGS) +CFLAGS += $(DEFINES) $(INCFLAGS) $(GLFLAGS) $(DEF_FLAGS) CFLAGS += -Wall $(fpic) ifeq ($(DEBUG), 1) @@ -226,4 +226,3 @@ clean: rm -f $(TARGET) .PHONY: clean - diff --git a/cores/libretro-ffmpeg/Makefile.common b/cores/libretro-ffmpeg/Makefile.common index 6a71b58fe3..15b62b40e2 100644 --- a/cores/libretro-ffmpeg/Makefile.common +++ b/cores/libretro-ffmpeg/Makefile.common @@ -16,7 +16,6 @@ AVUTIL_DIR := $(BASE_DIR)/libavutil SWSCALE_DIR := $(BASE_DIR)/libswscale SWRESAMPLE_DIR := $(BASE_DIR)/libswresample - INCFLAGS += -I$(BASE_DIR) -I$(CORE_DIR) -I$(LIBRETRO_COMM_DIR)/include -I$(LIBRETRO_COMM_DIR)/include/compat LIBRETRO_SOURCE += $(CORE_DIR)/ffmpeg_core.c \ diff --git a/cores/libretro-ffmpeg/Makefile.ffmpeg b/cores/libretro-ffmpeg/Makefile.ffmpeg index 2ed09c31dd..c319cb8d26 100644 --- a/cores/libretro-ffmpeg/Makefile.ffmpeg +++ b/cores/libretro-ffmpeg/Makefile.ffmpeg @@ -134,7 +134,6 @@ endif LIBS += -lm - ifeq ($(HAVE_NEON),1) DEFINES += -DHAVE_NEON=1 else @@ -163,7 +162,6 @@ CPUOPTS += -DARCH_BFIN=0 #We can reasonably assume MMX will be there on all x86 CPUs from 1997 and up at least #SSE2 can be assumed from Pentium 4 and up - can be switched on or off with the switch HAVE_SSE2 - ifeq ($(ARCH_X86),1) CPUOPTS += -DHAVE_AMD3DNOW_INLINE=0 CPUOPTS += -DHAVE_AMD3DNOWEXT_EXTERNAL=0 @@ -756,7 +754,6 @@ else DEFINES += -DCONFIG_LIBSPEEX_ENCODER=0 endif - ifeq ($(HAVE_LIBOPUS),1) DEFINES += -DCONFIG_LIBOPUS_ENCODER=1 \ -DCONFIG_OPUS_PARSER=1 \ @@ -1265,7 +1262,6 @@ DEFINES += -DCONFIG_LIBOPUS_DECODER=0 DEFINES += -DCONFIG_OPUS_MUXER=0 endif - #libavutil ifeq ($(INTERNAL_LIBAVUTIL),1) DEFINES += -DHAVE_AV_CONFIG_H @@ -1336,7 +1332,6 @@ ifeq ($(ARCH_ARM),1) LIBAVUTIL_SOURCE += $(filter-out $(AVUTIL_BLACKLIST),$(wildcard $(AVUTIL_DIR)/arm/*.c)) endif - ifeq ($(ARCH_PPC),1) LIBAVUTIL_SOURCE += $(AVUTIL_DIR)/ppc/cpu.c \ $(AVUTIL_DIR)/ppc/float_dsp_init.c @@ -1468,7 +1463,6 @@ else DEFINES += -DCONFIG_XVMC=0 endif - AVCODEC_BLACKLIST := \ $(AVCODEC_DIR)/arm/neontest.c \ $(AVCODEC_DIR)/vda.c \ diff --git a/cores/libretro-ffmpeg/ffmpeg_core.c b/cores/libretro-ffmpeg/ffmpeg_core.c index d5c66667da..3a117c8566 100644 --- a/cores/libretro-ffmpeg/ffmpeg_core.c +++ b/cores/libretro-ffmpeg/ffmpeg_core.c @@ -693,7 +693,6 @@ void CORE_PREFIX(retro_run)(void) glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, frames[0].tex); - glBindBuffer(GL_ARRAY_BUFFER, vbo); glVertexAttribPointer(vertex_loc, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(GLfloat), (const GLvoid*)(0 * sizeof(GLfloat))); @@ -1664,7 +1663,6 @@ error: return false; } - unsigned CORE_PREFIX(retro_get_region)(void) { return RETRO_REGION_NTSC; diff --git a/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.frag.h b/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.frag.h index e5c3929ca0..eb196323fd 100644 --- a/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.frag.h +++ b/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.frag.h @@ -10,4 +10,3 @@ static const char *fragment_source = GLSL( gl_FragColor = vec4(pow(mix(pow(texture2D(sTex0, vTex).rgb, vec3(2.2)), pow(texture2D(sTex1, vTex).rgb, vec3(2.2)), uMix), vec3(1.0 / 2.2)), 1.0); } ); - diff --git a/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.vert.h b/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.vert.h index 996ee1fe9d..df8af7fc89 100644 --- a/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.vert.h +++ b/cores/libretro-ffmpeg/gl_shaders/ffmpeg.glsl.vert.h @@ -9,4 +9,3 @@ static const char *vertex_source = GLSL( gl_Position = vec4(aVertex, 0.0, 1.0); vTex = aTexCoord; } ); - diff --git a/cores/libretro-ffmpeg/gl_shaders/ffmpeg_es.glsl.frag.h b/cores/libretro-ffmpeg/gl_shaders/ffmpeg_es.glsl.frag.h index 012a5c7ff0..34f405df28 100644 --- a/cores/libretro-ffmpeg/gl_shaders/ffmpeg_es.glsl.frag.h +++ b/cores/libretro-ffmpeg/gl_shaders/ffmpeg_es.glsl.frag.h @@ -10,4 +10,3 @@ static const char *fragment_source = GLSL( gl_FragColor = vec4(pow(mix(pow(texture2D(sTex0, vTex).bgr, vec3(2.2)), pow(texture2D(sTex1, vTex).bgr, vec3(2.2)), uMix), vec3(1.0 / 2.2)), 1.0); } ); - diff --git a/cores/libretro-ffmpeg/link.T b/cores/libretro-ffmpeg/link.T index b0c262db9e..9e82b5dd3f 100644 --- a/cores/libretro-ffmpeg/link.T +++ b/cores/libretro-ffmpeg/link.T @@ -2,4 +2,3 @@ global: retro_*; local: *; }; - diff --git a/cores/libretro-gong/gong.c b/cores/libretro-gong/gong.c new file mode 100644 index 0000000000..8c354e460e --- /dev/null +++ b/cores/libretro-gong/gong.c @@ -0,0 +1,696 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2018 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +/* Libretro port by Brad Parker, + Original source code by Dan Zaidan: https://danzaidan.itch.io/ + Original license: + "You can do whatever you want with the code, but I am providing it as is without any warranty whatsoever." + */ + +#include +#include +#include +#include + +#ifdef RARCH_INTERNAL +#include "internal_cores.h" +#define GONG_CORE_PREFIX(s) libretro_gong_##s +#else +#define GONG_CORE_PREFIX(s) s +#endif + +#define WIDTH 356 +#define HEIGHT 200 +#define FPS (60000.0f / 1000.0f) + +static retro_log_printf_t GONG_CORE_PREFIX(log_cb); +static retro_video_refresh_t GONG_CORE_PREFIX(video_cb); +static retro_input_poll_t GONG_CORE_PREFIX(input_poll_cb); +static retro_input_state_t GONG_CORE_PREFIX(input_state_cb); +static retro_audio_sample_t GONG_CORE_PREFIX(audio_cb); +static retro_audio_sample_batch_t GONG_CORE_PREFIX(audio_batch_cb); +static retro_environment_t GONG_CORE_PREFIX(environ_cb); + +static const char *GONG_CORE_PREFIX(valid_extensions) = "gong"; + +static float player1_py = 0.0f; +static float player1_dpy = 0.0f; +static float player2_py = 0.0f; +static float player2_dpy = 0.0f; +static float player2_speed = 0.0f; +static float ball_px = 0.0f; +static float ball_py = 0.0f; +static float ball_dpx = 0.0f; +static float ball_dpy = 0.0f; +static float ball_speed = 0.0f; +static bool is_initialized = 0; +static unsigned player1_score = 0; +static unsigned player2_score = 0; +static float current_play_points = 0.0f; + +static unsigned char *video_buf = NULL; + +enum +{ + B_MOVE_UP, + B_MOVE_DOWN, + B_SPEED_UP, + B_COUNT /* This should always be in the bottom */ +}; + +typedef struct +{ + int half_transition_count; + bool ended_down; +} Game_Button_State; + +typedef struct +{ + Game_Button_State buttons[B_COUNT]; + float last_dt; +} Game_Input; + +static Game_Input g_input = {0}; + +typedef struct +{ + /* Pixels are always 32-bit wide, memory order XX BB GG RR */ + int width; + int height; + int pitch; + void *memory; +} Game_Offscreen_Buffer; + +static Game_Offscreen_Buffer game_buffer = {0}; + +static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *draw_buffer); + +static const struct retro_controller_description pads[] = { + { "Joypad", RETRO_DEVICE_JOYPAD }, + { NULL, 0 }, +}; + +static const struct retro_controller_info ports[] = { + { pads, 1 }, + { 0 }, +}; + +struct retro_input_descriptor desc[] = { + { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP, "D-Pad Up" }, + { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN, "D-Pad Down" }, + { 0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y, "Left Analog Y" }, + { 0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y, "Right Analog Y" }, + + { 0 }, +}; + +static INLINE bool pressed(Game_Button_State state) +{ + return state.half_transition_count > 1 || + (state.half_transition_count == 1 && state.ended_down); +} + +static INLINE bool is_down(Game_Button_State state) +{ + return state.ended_down; +} + +void GONG_CORE_PREFIX(retro_get_system_info)(struct retro_system_info *info) +{ + info->library_name = "gong"; + info->library_version = "v1.0"; + info->need_fullpath = false; + info->block_extract = false; + info->valid_extensions = GONG_CORE_PREFIX(valid_extensions); +} + +void GONG_CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *info) +{ + info->geometry.base_width = WIDTH; + info->geometry.base_height = HEIGHT; + info->geometry.max_width = WIDTH; + info->geometry.max_height = HEIGHT; + info->geometry.aspect_ratio = 16.0f / 9.0f; + info->timing.fps = FPS; + info->timing.sample_rate = 44100.0; +} + +void GONG_CORE_PREFIX(retro_init)(void) +{ + struct retro_log_callback log; + + if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log)) + GONG_CORE_PREFIX(log_cb) = log.log; + else + GONG_CORE_PREFIX(log_cb) = NULL; + + video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned)); + + game_buffer.width = WIDTH; + game_buffer.height = HEIGHT; + game_buffer.pitch = WIDTH * sizeof(unsigned); + game_buffer.memory = video_buf; + + g_input.last_dt = 1.0f / FPS; +} + +void GONG_CORE_PREFIX(retro_deinit)(void) +{ + if (video_buf) + free(video_buf); + + video_buf = NULL; + game_buffer.memory = NULL; +} + +void GONG_CORE_PREFIX(retro_set_environment)(retro_environment_t cb) +{ + bool no_content = true; + + static const struct retro_variable vars[] = { + { NULL, NULL }, + }; + + GONG_CORE_PREFIX(environ_cb) = cb; + + cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_content); + cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars); + cb(RETRO_ENVIRONMENT_SET_CONTROLLER_INFO, (void*)ports); +} + +void GONG_CORE_PREFIX(retro_set_video_refresh)(retro_video_refresh_t cb) +{ + GONG_CORE_PREFIX(video_cb) = cb; +} + +void GONG_CORE_PREFIX(retro_set_audio_sample)(retro_audio_sample_t cb) +{ + GONG_CORE_PREFIX(audio_cb) = cb; +} + +void GONG_CORE_PREFIX(retro_set_audio_sample_batch)(retro_audio_sample_batch_t cb) +{ + GONG_CORE_PREFIX(audio_batch_cb) = cb; +} + +void GONG_CORE_PREFIX(retro_set_input_poll)(retro_input_poll_t cb) +{ + GONG_CORE_PREFIX(input_poll_cb) = cb; +} + +void GONG_CORE_PREFIX(retro_set_input_state)(retro_input_state_t cb) +{ + GONG_CORE_PREFIX(input_state_cb) = cb; +} + +void GONG_CORE_PREFIX(retro_set_controller_port_device)(unsigned a, unsigned b) +{ +} + +void GONG_CORE_PREFIX(retro_reset)(void) +{ + player1_py = 0.0f; + player1_dpy = 0.0f; + player2_py = 0.0f; + player2_dpy = 0.0f; + player2_speed = 0.0f; + player1_score = 0; + player2_score = 0; + is_initialized = 0; +} + +size_t GONG_CORE_PREFIX(retro_serialize_size)(void) +{ + return 0; +} + +bool GONG_CORE_PREFIX(retro_serialize)(void *data, size_t size) +{ + (void)data; + (void)size; + return false; +} + +bool GONG_CORE_PREFIX(retro_unserialize)(const void *data, size_t size) +{ + (void)data; + (void)size; + return false; +} + +void GONG_CORE_PREFIX(retro_cheat_reset)(void) +{ +} + +void GONG_CORE_PREFIX(retro_cheat_set)(unsigned a, bool b, const char * c) +{ +} + +bool GONG_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info) +{ + enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888; + + if (!GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt)) + { + if (GONG_CORE_PREFIX(log_cb)) + GONG_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "XRGB8888 is not supported.\n"); + return false; + } + + return true; +} + +bool GONG_CORE_PREFIX(retro_load_game_special)(unsigned a, const struct retro_game_info *b, size_t c) +{ + return false; +} + +void GONG_CORE_PREFIX(retro_unload_game)(void) +{ +} + +unsigned GONG_CORE_PREFIX(retro_get_region)(void) +{ + return RETRO_REGION_NTSC; +} + +void* GONG_CORE_PREFIX(retro_get_memory_data)(unsigned id) +{ + return NULL; +} + +size_t GONG_CORE_PREFIX(retro_get_memory_size)(unsigned id) +{ + return 0; +} + +static void process_joypad(Game_Button_State *new_state, bool is_down) +{ + if (new_state->ended_down != is_down) + { + new_state->ended_down = is_down; + new_state->half_transition_count += 1; + } +} + +static bool is_key_up_or_down(int16_t input, int16_t not_input, int key) +{ + if (input & (1 << key) || not_input & (1 << key)) + return true; + + return false; +} + +void GONG_CORE_PREFIX(retro_run)(void) +{ + uint16_t input = 0; + uint16_t not_input = 0; + static uint16_t previnput = 0; + uint16_t realinput = 0; + int i = 0; + int16_t analogYLeft1 = 0; + int16_t analogYRight1 = 0; + + GONG_CORE_PREFIX(input_poll_cb)(); + + for (i = 0; i < 16; i++) + { + if (GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, i)) + { + realinput |= 1 << i; + } + } + + analogYLeft1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f; + analogYRight1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f; + + if (analogYLeft1 > 0) + realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN); + else if (analogYRight1 > 0) + realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN); + + if (analogYLeft1 < 0) + realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP); + else if (analogYRight1 < 0) + realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP); + + input = realinput & ~previnput; + not_input = previnput & ~realinput; + + if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_UP)) + process_joypad(&g_input.buttons[B_MOVE_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_UP)); + else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN)) + process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN)); + else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN)) + process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN)); + + if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_A)) + process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_A)); + else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_B)) + process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_B)); + else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_X)) + process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_X)); + else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_Y)) + process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_Y)); + + previnput = realinput; + + game_update_and_render(&g_input, &game_buffer); + + GONG_CORE_PREFIX(video_cb)(video_buf, WIDTH, HEIGHT, WIDTH * sizeof(uint32_t)); +} + +unsigned GONG_CORE_PREFIX(retro_api_version)(void) +{ + return RETRO_API_VERSION; +} + +static void draw_rect_in_pixels(Game_Offscreen_Buffer *buffer, unsigned color, int min_x, int min_y, int max_x, int max_y) +{ + int y; + + min_x = MAX(min_x, 0); + min_y = MAX(min_y, 0); + max_x = MIN(max_x, buffer->width); + max_y = MIN(max_y, buffer->height); + + for (y = min_y; y < max_y; y++) + { + int x; + + for (x = min_x; x < max_x; x++) + { + unsigned *pixel = (unsigned*)((unsigned char*)buffer->memory + ((buffer->width * (buffer->height - y - 1) + x) * sizeof(unsigned))); + + *pixel++ = color; + } + } +} + +static void clear(Game_Offscreen_Buffer *buffer, unsigned color) +{ + draw_rect_in_pixels(buffer, color, 0, 0, buffer->width, buffer->height); +} + +static void draw_rect(Game_Offscreen_Buffer *buffer, unsigned color, float x, float y, float half_size_x, float half_size_y) +{ + /* @Hardcoded to always keep the playing field area on screen, no matter the aspect ratio */ + float scale = .01f; + float relative_axis = (float)buffer->height; + int min_x, min_y, max_x, max_y; + + if ((float)buffer->width / (float)buffer->height < 1.77f) + { + relative_axis = (float)buffer->width; + scale = .0056f; + } + + half_size_x *= relative_axis * scale; + half_size_y *= relative_axis * scale; + x *= relative_axis * scale; + y *= relative_axis * scale; + + x = x + buffer->width / 2; + y = y + buffer->height / 2; + + min_x = (unsigned)(x - half_size_x); + min_y = (unsigned)(y - half_size_y); + max_x = (unsigned)(x + half_size_x); + max_y = (unsigned)(y + half_size_y); + + draw_rect_in_pixels(buffer, color, min_x, min_y, max_x, max_y); +} + +static void draw_number(Game_Offscreen_Buffer *buffer, unsigned number, unsigned color, float x, float y) +{ + float at_x = x; + + do { + unsigned alg = number % 10; + + number /= 10; + + switch (alg) + { + case 0: + { + draw_rect(buffer, color, at_x - 2.f, y, .5f, 4.f); + draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f); + break; + } + + case 1: + { + draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f); + break; + } + + case 2: + { + draw_rect(buffer, color, at_x - 2.f, y - 2.f, .5f, 2.f); + draw_rect(buffer, color, at_x + 2.f, y + 2.f, .5f, 2.f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y, 2.5f, .5f); + draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f); + break; + } + + case 3: + { + draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y, 2.5f, .5f); + draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f); + break; + }; + + case 4: + { + draw_rect(buffer, color, at_x, y, 2.5f, .5f); + draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f); + draw_rect(buffer, color, at_x - 2.f, y+2.5f, .5f, 2.f); + break; + }; + + case 5: + { + draw_rect(buffer, color, at_x + 2.f, y-2.f, .5f, 2.f); + draw_rect(buffer, color, at_x - 2.f, y+2.f, .5f, 2.f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y, 2.5f, .5f); + draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f); + break; + }; + + case 6: + { + draw_rect(buffer, color, at_x + 2.f, y-2.f, .5f, 2.f); + draw_rect(buffer, color, at_x - 2.f, y, .5f, 4.f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y, 2.5f, .5f); + draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f); + break; + }; + + case 7: + { + draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + break; + }; + + case 8: + { + draw_rect(buffer, color, at_x - 2.f, y, .5f, 4.f); + draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y, 2.5f, .5f); + break; + }; + + case 9: + { + draw_rect(buffer, color, at_x - 2.f, y + 2.f, .5f, 2.f); + draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f); + draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f); + draw_rect(buffer, color, at_x, y, 2.5f, .5f); + draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f); + break; + }; + + default: + break; + } + + at_x -= 7.f; + } while(number > 0); +} + +static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *draw_buffer) +{ + const float initial_ball_speed = 80.f; + float playing_field_x = 85.f; + float playing_field_y = 48.f; + float player_size_x = 2.5f; + float player_size_y = 10.f; + + if (!is_initialized) + { + is_initialized = 1; + ball_px = 0; + ball_py = 0; + ball_dpx = initial_ball_speed; + ball_dpy = 0; + current_play_points = 10.f; + player2_speed = 80.f; + } + + { + float speed = 80.f; + player1_dpy = 0.f; + + if (is_down(input->buttons[B_SPEED_UP])) + speed = 150.f; + + if (is_down(input->buttons[B_MOVE_UP])) + { + if (player1_py < playing_field_y - player_size_y) + { + player1_dpy = speed; + } + + if (player1_py < -playing_field_y + player_size_y) + { + player1_py = -playing_field_y + player_size_y; + player1_dpy = 0.f; + } + } + if (is_down(input->buttons[B_MOVE_DOWN])) + { + if (player1_py > -playing_field_y + player_size_y) + { + player1_dpy = -speed; + } + + if (player1_py < -playing_field_y + player_size_y) + { + player1_py = -playing_field_y + player_size_y; + player1_dpy = 0.f; + } + } + + player1_py += player1_dpy * input->last_dt; + } + + { + player2_dpy = (ball_py - player2_py) * 100.f; + player2_dpy = MIN(player2_dpy, player2_speed); + player2_dpy = MAX(player2_dpy, -player2_speed); + player2_py += player2_dpy * input->last_dt; + + if (player2_py < -playing_field_y + player_size_y) + { + player2_py = -playing_field_y + player_size_y; + player2_dpy = 0.f; + } + + if (player2_py > playing_field_y - player_size_y) + { + player2_py = playing_field_y - player_size_y; + player2_dpy = 0.f; + } + } + + ball_px += ball_dpx * input->last_dt; + + if (ball_dpx > 0) + { + ball_dpx += 10.f * input->last_dt; + } + else + { + ball_dpx -= 10.f * input->last_dt; + } + + ball_py += ball_dpy * input->last_dt; + + if (ball_py > playing_field_y - 1.f) + { + ball_py = playing_field_y - 1.f; + ball_dpy *= -1.f; + } + else if (ball_py < -playing_field_y + 1) + { + ball_py = -playing_field_y + 1.f; + ball_dpy *= -1; + } + + if (ball_px > 80.f - 2.5f - 1.f) /* @Hardcoded */ + { + if ((ball_py >= (player2_py - 10.f)) && (ball_py <= (player2_py + 10.f))) + { + ball_dpx *= -1.f; + ball_px = 80.f - 2.5f - 1.f; /* @Hardcoded */ + ball_dpy = (ball_py - player2_py) + player2_dpy; + ++current_play_points; + } + else if (ball_px >= playing_field_x - 1) + { + ball_px = 0; + ball_py = 0; + ball_dpy = 0; + ball_dpx = -initial_ball_speed; + player2_score += (unsigned)current_play_points; + current_play_points = 10.f; + } + } + else if (ball_px < -80 + 2.5f + 1.f) /* @Hardcoded */ + { + if ((ball_py >= (player1_py - 10.f)) && (ball_py <= (player1_py + 10.f))) + { + ball_dpx *= -1.f; + ball_px = -80 + 2.5f + 1.f; /* @Hardcoded */ + ball_dpy = (ball_py - player1_py) + player1_dpy; + ++current_play_points; + } + else if (ball_px <= -playing_field_x + 1) + { + ball_px = 0; + ball_py = 0; + ball_dpy = 0; + ball_dpx = initial_ball_speed; + player1_score += (unsigned)current_play_points; + current_play_points = 10.f; + player2_speed += current_play_points * 0.01f; + } + } + + clear(draw_buffer, 0x021077); + draw_rect(draw_buffer, 0x000530, 0.f, 0.f, playing_field_x, playing_field_y); + + draw_rect(draw_buffer, 0x00ffff, -80.f, player1_py, player_size_x, player_size_y); + draw_rect(draw_buffer, 0x00ffff, 80.f, player2_py, player_size_x, player_size_y); + + draw_rect(draw_buffer, 0xffff00, ball_px, ball_py, 1.f, 1.f); + + draw_number(draw_buffer, (unsigned)current_play_points, 0xaaaaaa, 0.f, 38.f); + draw_number(draw_buffer, player1_score, 0xff6611, 20.f, 38.f); + draw_number(draw_buffer, player2_score, 0xff6611, -20.f, 38.f); +} diff --git a/cores/libretro-gong/internal_cores.h b/cores/libretro-gong/internal_cores.h new file mode 100644 index 0000000000..7e1a2aab98 --- /dev/null +++ b/cores/libretro-gong/internal_cores.h @@ -0,0 +1 @@ +#include "../internal_cores.h" diff --git a/cores/libretro-gong/link.T b/cores/libretro-gong/link.T new file mode 100644 index 0000000000..9e82b5dd3f --- /dev/null +++ b/cores/libretro-gong/link.T @@ -0,0 +1,4 @@ +{ + global: retro_*; + local: *; +}; diff --git a/cores/libretro-imageviewer/image_core.c b/cores/libretro-imageviewer/image_core.c index 761ffe5ecf..3150b13b81 100644 --- a/cores/libretro-imageviewer/image_core.c +++ b/cores/libretro-imageviewer/image_core.c @@ -275,7 +275,6 @@ static bool imageviewer_load(const char *path, int image_index) process_new_image = true; - return true; } @@ -293,7 +292,6 @@ bool IMAGE_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info) dir_list_sort(file_list, false); free(dir); - if (!IMAGE_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt)) { if (IMAGE_CORE_PREFIX(log_cb)) @@ -312,7 +310,6 @@ bool IMAGE_CORE_PREFIX(retro_load_game_special)(unsigned a, const struct retro_g return false; } - void IMAGE_CORE_PREFIX(retro_unload_game)(void) { imageviewer_free_image(); @@ -335,7 +332,6 @@ size_t IMAGE_CORE_PREFIX(retro_get_memory_size)(unsigned id) return 0; } - void IMAGE_CORE_PREFIX(retro_run)(void) { bool first_image = false; diff --git a/cores/libretro-net-retropad/Makefile b/cores/libretro-net-retropad/Makefile index fc620c28be..5b8fa35955 100644 --- a/cores/libretro-net-retropad/Makefile +++ b/cores/libretro-net-retropad/Makefile @@ -103,7 +103,6 @@ else SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T -Wl,--no-undefined endif - LDFLAGS += $(LIBM) ifeq ($(platform), win) @@ -146,4 +145,3 @@ clean: rm -f $(OBJECTS) $(TARGET) .PHONY: clean - diff --git a/cores/libretro-net-retropad/link.T b/cores/libretro-net-retropad/link.T index b0c262db9e..9e82b5dd3f 100644 --- a/cores/libretro-net-retropad/link.T +++ b/cores/libretro-net-retropad/link.T @@ -2,4 +2,3 @@ global: retro_*; local: *; }; - diff --git a/cores/libretro-net-retropad/net_retropad_core.c b/cores/libretro-net-retropad/net_retropad_core.c index 4962367861..bedf072ad0 100644 --- a/cores/libretro-net-retropad/net_retropad_core.c +++ b/cores/libretro-net-retropad/net_retropad_core.c @@ -276,7 +276,6 @@ void NETRETROPAD_CORE_PREFIX(retro_set_environment)(retro_environment_t cb) enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565; cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars); - NETRETROPAD_CORE_PREFIX(environ_cb) = cb; bool no_content = true; cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_content); @@ -379,7 +378,6 @@ void NETRETROPAD_CORE_PREFIX(retro_run)(void) pixel += 65; } - NETRETROPAD_CORE_PREFIX(video_cb)(frame_buf, 320, 240, 640); retro_sleep(4); diff --git a/cores/libretro-video-processor/Makefile b/cores/libretro-video-processor/Makefile index 319723a941..a5973a36b2 100644 --- a/cores/libretro-video-processor/Makefile +++ b/cores/libretro-video-processor/Makefile @@ -144,4 +144,3 @@ clean: rm -f $(OBJECTS) $(TARGET) .PHONY: clean - diff --git a/cores/libretro-video-processor/link.T b/cores/libretro-video-processor/link.T index b0c262db9e..9e82b5dd3f 100644 --- a/cores/libretro-video-processor/link.T +++ b/cores/libretro-video-processor/link.T @@ -2,4 +2,3 @@ global: retro_*; local: *; }; - diff --git a/cores/libretro-video-processor/video_processor_v4l2.c b/cores/libretro-video-processor/video_processor_v4l2.c index 15cbe0d02b..1d9012c11c 100644 --- a/cores/libretro-video-processor/video_processor_v4l2.c +++ b/cores/libretro-video-processor/video_processor_v4l2.c @@ -102,7 +102,6 @@ static uint32_t *frame_prev2; static uint32_t *frame_prev3; static uint32_t *frame_curr; - // Frametime debug messages struct timeval ft_prevtime = { 0 }, ft_prevtime2 = { 0 }; char *ft_info = NULL, *ft_info2 = NULL; @@ -660,7 +659,6 @@ void source_v4l2_normal(int width, int height) { v4l2_frame_times(bufcp); } - void source_v4l2_alternate_hack(int width, int height) { struct v4l2_buffer bufcp; struct v4l2_format fmt; diff --git a/ctr/3dsx_custom.specs b/ctr/3dsx_custom.specs index 3fe7418dbb..9ccabed06a 100644 --- a/ctr/3dsx_custom.specs +++ b/ctr/3dsx_custom.specs @@ -5,4 +5,3 @@ *startfile: ctr/3dsx_custom_crt0%O%s crti%O%s crtbegin%O%s - diff --git a/ctr/3dsx_custom_crt0.s b/ctr/3dsx_custom_crt0.s index 3fe8e929a9..34cc8bc582 100644 --- a/ctr/3dsx_custom_crt0.s +++ b/ctr/3dsx_custom_crt0.s @@ -72,4 +72,3 @@ ClrLoop: bne ClrLoop bx lr - diff --git a/ctr/ctr_linear.cpp b/ctr/ctr_linear.cpp index 86b56301f6..8a6e661553 100644 --- a/ctr/ctr_linear.cpp +++ b/ctr/ctr_linear.cpp @@ -1,7 +1,6 @@ /* from https://github.com/smealum/ctrulib * modified to allow reducing __linear_heap_size at runtime */ - #include <3ds.h> #include #include <3ds/util/rbtree.h> @@ -245,7 +244,6 @@ extern "C" u32 ctr_get_linear_unused(void) return __linear_heap + __linear_heap_size - sLinearPool_maxaddr; } - extern "C" void ctr_linear_free_pages(u32 pages) { if(sLinearPool.last->base + sLinearPool.last->size != (u8*)__linear_heap + __linear_heap_size) diff --git a/ctr/ctr_svchax.c b/ctr/ctr_svchax.c index b02fccf1d4..eb32183a36 100644 --- a/ctr/ctr_svchax.c +++ b/ctr/ctr_svchax.c @@ -379,7 +379,6 @@ static void do_memchunkhax2(void) APT_SetAppCpuTimeLimit(mch2.old_cpu_time_limit); } - static void gspwn(u32 dst, u32 src, u32 size, u8* flush_buffer) { extern Handle gspEvents[GSPGPU_EVENT_MAX]; diff --git a/ctr/ctr_system.c b/ctr/ctr_system.c index 9126ba009e..632898fc91 100644 --- a/ctr/ctr_system.c +++ b/ctr/ctr_system.c @@ -93,7 +93,6 @@ void __attribute__((weak)) __libctru_init(void (*retAddr)(void)) __system_allocateHeaps(); } - Result __sync_fini(void) __attribute__((weak)); extern char** __system_argv; @@ -299,7 +298,6 @@ void wait_for_input(void) } } - long sysconf(int name) { switch (name) @@ -310,4 +308,3 @@ long sysconf(int name) return -1; } - diff --git a/ctr/exec-3dsx/exec_3dsx.c b/ctr/exec-3dsx/exec_3dsx.c index 7de5b374e6..cdc95852b2 100644 --- a/ctr/exec-3dsx/exec_3dsx.c +++ b/ctr/exec-3dsx/exec_3dsx.c @@ -5,14 +5,12 @@ #include "mini-hb-menu/common.h" - extern const loaderFuncs_s loader_Ninjhax1; extern const loaderFuncs_s loader_Ninjhax2; extern const loaderFuncs_s loader_Rosalina; static void (*launch_3dsx)(const char* path, argData_s* args, executableMetadata_s* em); - static int exec_3dsx_actual(const char* path, const char** args, bool appendPath){ struct stat sBuff; argData_s newProgramArgs; diff --git a/ctr/exec-3dsx/exec_cia.c b/ctr/exec-3dsx/exec_cia.c index 7c4c19551d..79c7a537a5 100644 --- a/ctr/exec-3dsx/exec_cia.c +++ b/ctr/exec-3dsx/exec_cia.c @@ -4,16 +4,13 @@ #include #include <3ds.h> - #define FILE_CHUNK_SIZE 4096 - typedef struct{ u32 argc; char args[0x300 - 0x4]; }ciaParam; - char argvHmac[0x20] = {0x1d, 0x78, 0xff, 0xb9, 0xc5, 0xbc, 0x78, 0xb7, 0xac, 0x29, 0x1d, 0x3e, 0x16, 0xd0, 0xcf, 0x53, 0xef, 0x12, 0x58, 0x83, 0xb6, 0x9e, 0x2f, 0x79, 0x47, 0xf9, 0x35, 0x61, 0xeb, 0x50, 0xd7, 0x67}; diff --git a/ctr/gpu_old.c b/ctr/gpu_old.c index b8e117e685..b9c2b86d74 100644 --- a/ctr/gpu_old.c +++ b/ctr/gpu_old.c @@ -35,7 +35,6 @@ void GPU_SetFloatUniform(GPU_SHADER_TYPE type, u32 startreg, u32* data, u32 numr GPUCMD_AddWrites(GPUREG_VSH_FLOATUNIFORM_DATA+regOffset, data, numreg*4); } - //takes PAs as arguments void GPU_SetViewport(u32* depthBuffer, u32* colorBuffer, u32 x, u32 y, u32 w, u32 h) { @@ -307,7 +306,6 @@ void GPU_FinishDrawing() GPUCMD_AddWrite(GPUREG_EARLYDEPTH_CLEAR, 0x00000001); } - void GPU_Finalize(void) { GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 0x8, 0x00000000); diff --git a/database_info.c b/database_info.c index 96da1c48a9..36ea9049b8 100644 --- a/database_info.c +++ b/database_info.c @@ -148,7 +148,6 @@ char *bin_to_hex_alloc(const uint8_t *data, size_t len) return ret; } - static int database_cursor_iterate(libretrodb_cursor_t *cur, database_info_t *db_info) { diff --git a/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs b/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs index dec1ade0f5..af82c1c231 100644 --- a/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs +++ b/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs @@ -129,20 +129,20 @@ public class DiscordRpc FreeMem(); } - _presence.state = StrToPtr(state, 128); - _presence.details = StrToPtr(details, 128); + _presence.state = StrToPtr(state); + _presence.details = StrToPtr(details); _presence.startTimestamp = startTimestamp; _presence.endTimestamp = endTimestamp; - _presence.largeImageKey = StrToPtr(largeImageKey, 32); - _presence.largeImageText = StrToPtr(largeImageText, 128); - _presence.smallImageKey = StrToPtr(smallImageKey, 32); - _presence.smallImageText = StrToPtr(smallImageText, 128); - _presence.partyId = StrToPtr(partyId, 128); + _presence.largeImageKey = StrToPtr(largeImageKey); + _presence.largeImageText = StrToPtr(largeImageText); + _presence.smallImageKey = StrToPtr(smallImageKey); + _presence.smallImageText = StrToPtr(smallImageText); + _presence.partyId = StrToPtr(partyId); _presence.partySize = partySize; _presence.partyMax = partyMax; - _presence.matchSecret = StrToPtr(matchSecret, 128); - _presence.joinSecret = StrToPtr(joinSecret, 128); - _presence.spectateSecret = StrToPtr(spectateSecret, 128); + _presence.matchSecret = StrToPtr(matchSecret); + _presence.joinSecret = StrToPtr(joinSecret); + _presence.spectateSecret = StrToPtr(spectateSecret); _presence.instance = instance; return _presence; @@ -152,16 +152,18 @@ public class DiscordRpc /// Returns a pointer to a representation of the given string with a size of maxbytes /// /// String to convert - /// Max number of bytes to use /// Pointer to the UTF-8 representation of - private IntPtr StrToPtr(string input, int maxbytes) + private IntPtr StrToPtr(string input) { if (string.IsNullOrEmpty(input)) return IntPtr.Zero; - var convstr = StrClampBytes(input, maxbytes); - var convbytecnt = Encoding.UTF8.GetByteCount(convstr); - var buffer = Marshal.AllocHGlobal(convbytecnt); + var convbytecnt = Encoding.UTF8.GetByteCount(input); + var buffer = Marshal.AllocHGlobal(convbytecnt + 1); + for (int i = 0; i < convbytecnt + 1; i++) + { + Marshal.WriteByte(buffer, i , 0); + } _buffers.Add(buffer); - Marshal.Copy(Encoding.UTF8.GetBytes(convstr), 0, buffer, convbytecnt); + Marshal.Copy(Encoding.UTF8.GetBytes(input), 0, buffer, convbytecnt); return buffer; } @@ -181,30 +183,6 @@ public class DiscordRpc return Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(str)); } - /// - /// Clamp the string to the given byte length preserving null termination - /// - /// string to clamp - /// max bytes the resulting string should have (including null termination) - /// null terminated string with a byte length less or equal to - private static string StrClampBytes(string toclamp, int maxbytes) - { - var str = StrToUtf8NullTerm(toclamp); - var strbytes = Encoding.UTF8.GetBytes(str); - - if (strbytes.Length <= maxbytes) - { - return str; - } - - var newstrbytes = new byte[] { }; - Array.Copy(strbytes, 0, newstrbytes, 0, maxbytes - 1); - newstrbytes[newstrbytes.Length - 1] = 0; - newstrbytes[newstrbytes.Length - 2] = 0; - - return Encoding.UTF8.GetString(newstrbytes); - } - /// /// Free the allocated memory for conversion to /// diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpcBlueprint.h b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpcBlueprint.h index 2d6521124b..17e2f9b29e 100644 --- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpcBlueprint.h +++ b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpcBlueprint.h @@ -24,6 +24,16 @@ struct FDiscordUserData { FString avatar; }; +/** +* Valid response codes for Respond function +*/ +UENUM(BlueprintType) +enum class EDiscordJoinResponseCodes : uint8 +{ + DISCORD_REPLY_NO UMETA(DisplayName="No"), + DISCORD_REPLY_YES UMETA(DisplayName="Yes"), + DISCORD_REPLY_IGNORE UMETA(DisplayName="Ignore") +}; DECLARE_LOG_CATEGORY_EXTERN(Discord, Log, All); diff --git a/deps/discord-rpc/src/discord_register_linux.cpp b/deps/discord-rpc/src/discord_register_linux.cpp index b10f96db66..09911dcc6c 100644 --- a/deps/discord-rpc/src/discord_register_linux.cpp +++ b/deps/discord-rpc/src/discord_register_linux.cpp @@ -33,9 +33,11 @@ extern "C" DISCORD_EXPORT void Discord_Register(const char* applicationId, const char exePath[1024]; if (!command || !command[0]) { - if (readlink("/proc/self/exe", exePath, sizeof(exePath)) <= 0) { + ssize_t size = readlink("/proc/self/exe", exePath, sizeof(exePath)); + if (size <= 0 || size >= (ssize_t)sizeof(exePath)) { return; } + exePath[size] = '\0'; command = exePath; } diff --git a/deps/discord-rpc/src/discord_rpc.cpp b/deps/discord-rpc/src/discord_rpc.cpp index dedb3f1539..2e44c939ce 100644 --- a/deps/discord-rpc/src/discord_rpc.cpp +++ b/deps/discord-rpc/src/discord_rpc.cpp @@ -89,10 +89,11 @@ public: keepRunning.store(true); ioThread = std::thread([&]() { const std::chrono::duration maxWait{500LL}; + Discord_UpdateConnection(); while (keepRunning.load()) { - Discord_UpdateConnection(); std::unique_lock lock(waitForIOMutex); waitForIOActivity.wait_for(lock, maxWait); + Discord_UpdateConnection(); } }); } diff --git a/deps/mbedtls/dhm.c b/deps/mbedtls/dhm.c index c82926c713..241e0590ae 100644 --- a/deps/mbedtls/dhm.c +++ b/deps/mbedtls/dhm.c @@ -530,7 +530,7 @@ static int load_file( const char *path, unsigned char **buf, size_t *n ) *n = (size_t) size; if( *n + 1 == 0 || - ( *buf = mbedtls_calloc( 1, *n + 1 ) ) == NULL ) + ( *buf = (unsigned char*)mbedtls_calloc( 1, *n + 1 ) ) == NULL ) { fclose( f ); return( MBEDTLS_ERR_DHM_ALLOC_FAILED ); diff --git a/deps/mbedtls/ecp.c b/deps/mbedtls/ecp.c index 92df13da57..da49ad20d6 100644 --- a/deps/mbedtls/ecp.c +++ b/deps/mbedtls/ecp.c @@ -811,7 +811,7 @@ static int ecp_normalize_jac_many( const mbedtls_ecp_group *grp, } #endif - if( ( c = mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL ) + if( ( c = (mbedtls_mpi*)mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL ) return( MBEDTLS_ERR_ECP_ALLOC_FAILED ); mbedtls_mpi_init( &u ); mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi ); @@ -1406,7 +1406,7 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, if( T == NULL ) { - T = mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) ); + T = (mbedtls_ecp_point*)mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) ); if( T == NULL ) { ret = MBEDTLS_ERR_ECP_ALLOC_FAILED; diff --git a/deps/mbedtls/net_sockets.c b/deps/mbedtls/net_sockets.c index 60a307fbb1..9e319f40ad 100644 --- a/deps/mbedtls/net_sockets.c +++ b/deps/mbedtls/net_sockets.c @@ -578,7 +578,7 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len ) if( ret < 0 ) { - if( net_would_block( ctx ) != 0 ) + if( net_would_block((const mbedtls_net_context*)ctx) != 0 ) return( MBEDTLS_ERR_SSL_WANT_WRITE ); #if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ diff --git a/dirs.c b/dirs.c index 8b3e26831a..aa253ceb8e 100644 --- a/dirs.c +++ b/dirs.c @@ -25,7 +25,6 @@ #include "dirs.h" #include "command.h" #include "configuration.h" -#include "command.h" #include "defaults.h" #include "list_special.h" #include "file_path_special.h" @@ -289,6 +288,10 @@ void dir_set(enum rarch_dir_type type, const char *path) static void check_defaults_dir_create_dir(const char *path) { char *new_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + + if (!new_path) + return; + new_path[0] = '\0'; fill_pathname_expand_special(new_path, path, @@ -309,7 +312,11 @@ void dir_check_defaults(void) /* early return for people with a custom folder setup so it doesn't create unnecessary directories */ +#ifdef ORBIS + if (filestream_exists("host0:app/custom.ini")) +#else if (filestream_exists("custom.ini")) +#endif return; for (i = 0; i < DEFAULT_DIR_LAST; i++) diff --git a/discord/discord.c b/discord/discord.c index 0efe85e036..80a74c96e7 100644 --- a/discord/discord.c +++ b/discord/discord.c @@ -37,25 +37,116 @@ #include "../cheevos/cheevos.h" #endif -static int FrustrationLevel = 0; +#ifdef HAVE_MENU +#include "../../menu/widgets/menu_input_dialog.h" +#include "../../menu/menu_cbs.h" +#endif + +#include +#include "../network/net_http_special.h" +#include "../tasks/tasks_internal.h" +#include +#include +#include "../file_path_special.h" static int64_t start_time = 0; static int64_t pause_time = 0; static int64_t ellapsed_time = 0; static bool discord_ready = false; +static bool discord_avatar_ready = false; static unsigned discord_status = 0; struct netplay_room *room; +static char user_id[128]; +static char user_name[128]; +static char party_name[128]; +static char user_avatar[PATH_MAX_LENGTH]; + +static char cdn_url[] = "https://cdn.discordapp.com/avatars"; + DiscordRichPresence discord_presence; +char* discord_get_own_username(void) +{ + return user_name; +} + +char* discord_get_own_avatar(void) +{ + return user_avatar; +} + +bool discord_avatar_is_ready(void) +{ + /*To-Do: fix-me, prevent lockups in ozone due to unfinished code*/ + return false; +} + +void discord_avatar_set_ready(bool ready) +{ + discord_avatar_ready = ready; +} + +bool discord_is_ready(void) +{ + return discord_ready; +} + +#ifdef HAVE_MENU +static bool discord_download_avatar( + const char* user_id, const char* avatar_id) +{ + static char url[PATH_MAX_LENGTH]; + static char url_encoded[PATH_MAX_LENGTH]; + static char full_path[PATH_MAX_LENGTH]; + + static char buf[PATH_MAX_LENGTH]; + + file_transfer_t *transf = NULL; + + fill_pathname_application_special(buf, + sizeof(buf), + APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS); + fill_pathname_join(full_path, buf, avatar_id, sizeof(full_path)); + strlcpy(user_avatar, avatar_id, sizeof(user_avatar)); + + if(filestream_exists(full_path)) + return true; + + if (string_is_empty(avatar_id)) + return false; + + snprintf(url, sizeof(url), "%s/%s/%s.png", cdn_url, user_id, avatar_id); + net_http_urlencode_full(url_encoded, url, sizeof(url_encoded)); + snprintf(buf, sizeof(buf), "%s.png", avatar_id); + + transf = (file_transfer_t*)calloc(1, sizeof(*transf)); + transf->enum_idx = MENU_ENUM_LABEL_CB_DISCORD_AVATAR; + strlcpy(transf->path, buf, sizeof(transf->path)); + + RARCH_LOG("[Discord] downloading avatar from: %s\n", url_encoded); + task_push_http_transfer(url_encoded, true, NULL, cb_generic_download, transf); + + return false; +} +#endif + static void handle_discord_ready(const DiscordUser* connectedUser) { + strlcpy(user_name, connectedUser->username, sizeof(user_name)); + strlcpy(party_name, connectedUser->username, sizeof(user_name)); + strlcat(party_name, "|", sizeof(party_name)); + strlcat(party_name, connectedUser->discriminator, sizeof(party_name)); + RARCH_LOG("[Discord] connected to user: %s#%s - avatar id: %s\n", connectedUser->username, connectedUser->discriminator, connectedUser->userId); +#ifdef HAVE_MENU + discord_download_avatar(connectedUser->userId, connectedUser->avatar); +#endif } static void handle_discord_disconnected(int errcode, const char* message) @@ -68,24 +159,71 @@ static void handle_discord_error(int errcode, const char* message) RARCH_LOG("[Discord] error (%d: %s)\n", errcode, message); } +static void handle_discord_join_cb(void *task_data, void *user_data, const char *err) +{ + struct netplay_room *room; + char tmp_hostname[32]; + + http_transfer_data_t *data = (http_transfer_data_t*)task_data; + + if (!data || err) + goto finish; + + data->data = (char*)realloc(data->data, data->len + 1); + data->data[data->len] = '\0'; + + netplay_rooms_parse(data->data); + room = netplay_room_get(0); + + if (room) + { + if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) + deinit_netplay(); + netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); + + snprintf(tmp_hostname, sizeof(tmp_hostname), "%s|%d", + room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_address : room->address, + room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_port : room->port); + + RARCH_LOG("[Discord] joining lobby at: %s\n", tmp_hostname); + task_push_netplay_crc_scan(room->gamecrc, + room->gamename, tmp_hostname, room->corename, room->subsystem_name); + } + +finish: + + if (err) + RARCH_ERR("%s: %s\n", msg_hash_to_str(MSG_DOWNLOAD_FAILED), err); + + if (data) + { + if (data->data) + free(data->data); + free(data); + } + + if (user_data) + free(user_data); +} + static void handle_discord_join(const char* secret) { - RARCH_LOG("[Discord] join (%s)\n", secret); + char url [2048] = "http://lobby.libretro.com/"; + char tmp_hostname[32]; static struct string_list *list = NULL; + + RARCH_LOG("[Discord] join secret: (%s)\n", secret); list = string_split(secret, "|"); - char tmp_hostname[32]; + strlcat(url, list->elems[0].data, sizeof(url)); + strlcat(url, "/", sizeof(url)); + RARCH_LOG("[Discord] querying lobby id: %s at %s\n", list->elems[0].data, url); + snprintf(tmp_hostname, sizeof(tmp_hostname), "%s|%s", list->elems[0].data, list->elems[1].data); - if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) - deinit_netplay(); - netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); - - task_push_netplay_crc_scan(atoi(list->elems[3].data), - list->elems[2].data, - tmp_hostname, list->elems[4].data); + task_push_http_transfer(url, true, NULL, handle_discord_join_cb, NULL); } static void handle_discord_spectate(const char* secret) @@ -93,14 +231,54 @@ static void handle_discord_spectate(const char* secret) RARCH_LOG("[Discord] spectate (%s)\n", secret); } +static void handle_discord_join_response(void *ignore, const char *line) +{ + /* To-Do: needs in-game widgets + if (strstr(line, "yes")) + Discord_Respond(user_id, DISCORD_REPLY_YES); + +#ifdef HAVE_MENU + menu_input_dialog_end(); + rarch_menu_running_finished(); +#endif +*/ +} + static void handle_discord_join_request(const DiscordUser* request) { - int response = -1; - char yn[4]; - RARCH_LOG("[Discord] join request from %s#%s - %s\n", + static char url[PATH_MAX_LENGTH]; + static char url_encoded[PATH_MAX_LENGTH]; + static char filename[PATH_MAX_LENGTH]; + char buf[PATH_MAX_LENGTH]; +#ifdef HAVE_MENU + menu_input_ctx_line_t line; +#endif + + RARCH_LOG("[Discord] join request from %s#%s - %s %s\n", request->username, request->discriminator, - request->userId); + request->userId, + request->avatar); + +#ifdef HAVE_MENU + discord_download_avatar(request->userId, request->avatar); + /* To-Do: needs in-game widgets + rarch_menu_running(); + */ + + memset(&line, 0, sizeof(line)); + snprintf(buf, sizeof(buf), "%s %s?", msg_hash_to_str(MSG_DISCORD_CONNECTION_REQUEST), request->username); + line.label = buf; + line.label_setting = "no_setting"; + line.cb = handle_discord_join_response; + + /* To-Do: needs in-game widgets + To-Do: bespoke dialog, should show while in-game and have a hotkey to accept + To-Do: show avatar of the user connecting + if (!menu_input_dialog_start(&line)) + return; + */ +#endif } void discord_update(enum discord_presence presence) @@ -121,8 +299,8 @@ void discord_update(enum discord_presence presence) switch (presence) { case DISCORD_PRESENCE_MENU: - discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU); - discord_presence.largeImageKey = "base"; + discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU); + discord_presence.largeImageKey = "base"; discord_presence.largeImageText = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORE); discord_presence.instance = 0; break; @@ -137,9 +315,9 @@ void discord_update(enum discord_presence presence) case DISCORD_PRESENCE_GAME: if (core_info) { - const char *system_id = core_info->system_id ? core_info->system_id : "core"; - - char *label = NULL; + const char *system_id = core_info->system_id + ? core_info->system_id : "core"; + char *label = NULL; playlist_t *current_playlist = playlist_get_cached(); if (current_playlist) @@ -164,13 +342,13 @@ void discord_update(enum discord_presence presence) pause_time = 0; ellapsed_time = 0; - discord_presence.smallImageKey = "playing"; + discord_presence.smallImageKey = "playing"; discord_presence.smallImageText = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING); discord_presence.startTimestamp = start_time; - discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME); + discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME); - discord_presence.state = label; - discord_presence.instance = 0; + discord_presence.state = label; + discord_presence.instance = 0; } break; case DISCORD_PRESENCE_NETPLAY_HOSTING: @@ -183,19 +361,18 @@ void discord_update(enum discord_presence presence) room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_address : room->address, room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_port : room->port); - char party_id[128]; - snprintf(party_id, sizeof(party_id), "%d|%s", room->id, room->nickname); - char join_secret[128]; - snprintf(join_secret, sizeof(join_secret), "%s|%d|%s|%u|%s", - room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_address : room->address, - room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_port : room->port, - room->gamename, room->gamecrc, room->corename); - RARCH_LOG("%s\n", join_secret); - discord_presence.joinSecret = strdup(join_secret); - discord_presence.spectateSecret = "SPECSPECSPEC"; - discord_presence.partyId = party_id; - discord_presence.partyMax = 0; - discord_presence.partySize = 0; + { + char join_secret[128]; + snprintf(join_secret, sizeof(join_secret), "%d|%s", room->id, room->nickname); + discord_presence.joinSecret = strdup(join_secret); + /* discord_presence.spectateSecret = "SPECSPECSPEC"; */ + discord_presence.partyId = strdup(party_name); + discord_presence.partyMax = 0; + discord_presence.partySize = 0; + + RARCH_LOG("[Discord] join secret: %s\n", join_secret); + RARCH_LOG("[Discord] party id: %s\n", party_name); + } break; case DISCORD_PRESENCE_NETPLAY_HOSTING_STOPPED: case DISCORD_PRESENCE_NETPLAY_CLIENT: @@ -212,7 +389,9 @@ void discord_update(enum discord_presence presence) void discord_init(void) { + char command[PATH_MAX_LENGTH]; settings_t *settings = config_get_ptr(); + DiscordEventHandlers handlers; RARCH_LOG("[Discord] initializing ..\n"); @@ -226,13 +405,13 @@ void discord_init(void) handlers.spectateGame = handle_discord_spectate; handlers.joinRequest = handle_discord_join_request; - /* To-Do: Add the arguments RetroArch was started with to the register URI*/ - const char command[256] = "retroarch"; - Discord_Initialize(settings->arrays.discord_app_id, &handlers, 0, NULL); - Discord_Register(settings->arrays.discord_app_id, NULL); - discord_ready = true; + strlcpy(command, get_retroarch_launch_arguments(), sizeof(command)); + + RARCH_LOG("[Discord] registering startup command: %s\n", command); + Discord_Register(settings->arrays.discord_app_id, command); + discord_ready = true; } void discord_shutdown(void) @@ -243,7 +422,7 @@ void discord_shutdown(void) discord_ready = false; } -void discord_run_callbacks() +void discord_run_callbacks(void) { Discord_RunCallbacks(); -} \ No newline at end of file +} diff --git a/discord/discord.h b/discord/discord.h index 8148482d54..34505dae59 100644 --- a/discord/discord.h +++ b/discord/discord.h @@ -55,4 +55,14 @@ void discord_update(enum discord_presence presence); void discord_run_callbacks(); +bool discord_is_ready(); + +void discord_avatar_set_ready(bool ready); + +bool discord_avatar_is_ready(); + +char* discord_get_own_username(void); + +char* discord_get_own_avatar(void); + #endif /* __RARCH_DISCORD_H */ diff --git a/dist-scripts/wiiu-new-cores.sh b/dist-scripts/wiiu-new-cores.sh index 6aaf07eb9d..e02231e2b6 100755 --- a/dist-scripts/wiiu-new-cores.sh +++ b/dist-scripts/wiiu-new-cores.sh @@ -192,4 +192,3 @@ fi for core in $cores; do buildCore $core done - diff --git a/driver.c b/driver.c index 7e7d609955..3877683bfd 100644 --- a/driver.c +++ b/driver.c @@ -35,6 +35,7 @@ #include "wifi/wifi_driver.h" #include "led/led_driver.h" #include "midi/midi_driver.h" +#include "command.h" #include "configuration.h" #include "core_info.h" #include "driver.h" @@ -385,6 +386,10 @@ void drivers_init(int flags) if (flags & DRIVER_MENU_MASK) menu_driver_init(video_is_threaded); } +#else + /* Qt uses core info, even if the menu is disabled */ + command_event(CMD_EVENT_CORE_INFO_INIT, NULL); + command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL); #endif if (flags & (DRIVER_VIDEO_MASK | DRIVER_AUDIO_MASK)) @@ -403,7 +408,6 @@ void drivers_init(int flags) midi_driver_init(); } - /** * uninit_drivers: * @flags : Bitmask of drivers to deinitialize. diff --git a/dynamic.c b/dynamic.c index cbe706c79a..a6d3074013 100644 --- a/dynamic.c +++ b/dynamic.c @@ -108,10 +108,18 @@ static dylib_t lib_handle; #define SYMBOL_VIDEOPROCESSOR(x) current_core->x = libretro_videoprocessor_##x #endif +#ifdef HAVE_EASTEREGG +#define SYMBOL_GONG(x) current_core->x = libretro_gong_##x +#endif + static bool ignore_environment_cb = false; static bool core_set_shared_context = false; static bool *load_no_content_hook = NULL; +struct retro_subsystem_info subsystem_data[SUBSYSTEM_MAX_SUBSYSTEMS]; +struct retro_subsystem_rom_info subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS][SUBSYSTEM_MAX_SUBSYSTEM_ROMS]; +unsigned subsystem_current_count; + const struct retro_subsystem_info *libretro_find_subsystem_info( const struct retro_subsystem_info *info, unsigned num_info, const char *ident) @@ -173,7 +181,6 @@ void libretro_free_system_info(struct retro_system_info *info) memset(info, 0, sizeof(*info)); } - static bool environ_cb_get_system_info(unsigned cmd, void *data) { rarch_system_info_t *system = runloop_get_system_info(); @@ -236,7 +243,6 @@ static bool environ_cb_get_system_info(unsigned cmd, void *data) subsystem_data[i].roms = subsystem_data_roms[i]; } - subsystem_current_count = size <= SUBSYSTEM_MAX_SUBSYSTEMS ? size : SUBSYSTEM_MAX_SUBSYSTEMS; #if 0 RARCH_LOG("Subsystems: %d\n", subsystem_current_count); @@ -777,6 +783,43 @@ bool init_libretro_sym_custom(enum rarch_core_type type, struct retro_core_t *cu SYMBOL_VIDEOPROCESSOR(retro_get_region); SYMBOL_VIDEOPROCESSOR(retro_get_memory_data); SYMBOL_VIDEOPROCESSOR(retro_get_memory_size); +#endif + break; + case CORE_TYPE_GONG: +#ifdef HAVE_EASTEREGG + SYMBOL_GONG(retro_init); + SYMBOL_GONG(retro_deinit); + + SYMBOL_GONG(retro_api_version); + SYMBOL_GONG(retro_get_system_info); + SYMBOL_GONG(retro_get_system_av_info); + + SYMBOL_GONG(retro_set_environment); + SYMBOL_GONG(retro_set_video_refresh); + SYMBOL_GONG(retro_set_audio_sample); + SYMBOL_GONG(retro_set_audio_sample_batch); + SYMBOL_GONG(retro_set_input_poll); + SYMBOL_GONG(retro_set_input_state); + + SYMBOL_GONG(retro_set_controller_port_device); + + SYMBOL_GONG(retro_reset); + SYMBOL_GONG(retro_run); + + SYMBOL_GONG(retro_serialize_size); + SYMBOL_GONG(retro_serialize); + SYMBOL_GONG(retro_unserialize); + + SYMBOL_GONG(retro_cheat_reset); + SYMBOL_GONG(retro_cheat_set); + + SYMBOL_GONG(retro_load_game); + SYMBOL_GONG(retro_load_game_special); + + SYMBOL_GONG(retro_unload_game); + SYMBOL_GONG(retro_get_region); + SYMBOL_GONG(retro_get_memory_data); + SYMBOL_GONG(retro_get_memory_size); #endif break; } @@ -1884,9 +1927,10 @@ bool rarch_environment_cb(unsigned cmd, void *data) case RETRO_ENVIRONMENT_GET_VFS_INTERFACE: { - const uint32_t supported_vfs_version = 1; + const uint32_t supported_vfs_version = 3; static struct retro_vfs_interface vfs_iface = - { + { + /* VFS API v1 */ retro_vfs_file_get_path_impl, retro_vfs_file_open_impl, retro_vfs_file_close_impl, @@ -1896,15 +1940,32 @@ bool rarch_environment_cb(unsigned cmd, void *data) retro_vfs_file_read_impl, retro_vfs_file_write_impl, retro_vfs_file_flush_impl, - retro_vfs_file_remove_impl + retro_vfs_file_remove_impl, + retro_vfs_file_rename_impl, + /* VFS API v2 */ + retro_vfs_file_truncate_impl, + /* VFS API v3 */ + retro_vfs_stat_impl, + retro_vfs_mkdir_impl, + retro_vfs_opendir_impl, + retro_vfs_readdir_impl, + retro_vfs_dirent_get_name_impl, + retro_vfs_dirent_is_dir_impl, + retro_vfs_closedir_impl }; struct retro_vfs_interface_info *vfs_iface_info = (struct retro_vfs_interface_info *) data; if (vfs_iface_info->required_interface_version <= supported_vfs_version) { + RARCH_LOG("Core requested VFS version >= v%d, providing v%d\n", vfs_iface_info->required_interface_version, supported_vfs_version); vfs_iface_info->required_interface_version = supported_vfs_version; vfs_iface_info->iface = &vfs_iface; } + else + { + RARCH_WARN("Core requested VFS version v%d which is higher than what we support (v%d)\n", vfs_iface_info->required_interface_version, supported_vfs_version); + return false; + } break; } diff --git a/dynamic.h b/dynamic.h index 79b7d50fff..2138927f58 100644 --- a/dynamic.h +++ b/dynamic.h @@ -151,11 +151,10 @@ void uninit_libretro_sym(struct retro_core_t *core); /* Arbitrary 10 roms for each subsystem limit */ #define SUBSYSTEM_MAX_SUBSYSTEM_ROMS 10 -struct retro_subsystem_info subsystem_data[SUBSYSTEM_MAX_SUBSYSTEMS]; -struct retro_subsystem_rom_info subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS][SUBSYSTEM_MAX_SUBSYSTEM_ROMS]; -unsigned subsystem_current_count; +extern struct retro_subsystem_info subsystem_data[SUBSYSTEM_MAX_SUBSYSTEMS]; +extern struct retro_subsystem_rom_info subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS][SUBSYSTEM_MAX_SUBSYSTEM_ROMS]; +extern unsigned subsystem_current_count; RETRO_END_DECLS #endif - diff --git a/file_path_special.c b/file_path_special.c index fa6c3690a8..70769b97da 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -338,6 +338,31 @@ void fill_pathname_application_special(char *s, } #endif break; + case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS: + { + char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + settings_t *settings = config_get_ptr(); + + s1[0] = s2[0] = '\0'; + + fill_pathname_join(s1, + settings->paths.directory_thumbnails, + "discord", + len); + fill_pathname_join(s2, + s1, "avatars", + PATH_MAX_LENGTH * sizeof(char) + ); + fill_pathname_slash(s2, + PATH_MAX_LENGTH * sizeof(char) + ); + strlcpy(s, s2, len); + free(s1); + free(s2); + } + break; + case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES: { char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); diff --git a/file_path_special.h b/file_path_special.h index 16455f2486..d98a6b3971 100644 --- a/file_path_special.h +++ b/file_path_special.h @@ -111,7 +111,8 @@ enum application_special_type APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH, APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_FONT, APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_ICONS, - APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES + APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES, + APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS }; /** diff --git a/frontend/drivers/platform_orbis.c b/frontend/drivers/platform_orbis.c index 217dca1c04..66d3c02722 100644 --- a/frontend/drivers/platform_orbis.c +++ b/frontend/drivers/platform_orbis.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -81,7 +82,6 @@ int main(int argc, char *argv[]) sceSystemServiceHideSplashScreen(); - uintptr_t intptr=0; sscanf(argv[1],"%p",&intptr); myConf=(OrbisGlobalConf *)intptr; @@ -107,13 +107,32 @@ static void frontend_orbis_get_environment_settings(int *argc, char *argv[], #if defined(HAVE_LOGGER) logger_init(); #elif defined(HAVE_FILE_LOGGER) - retro_main_log_file_init("host0:/temp/retroarch-log.txt"); + retro_main_log_file_init("host0:app/temp/retroarch-log.txt"); #endif #endif - strlcpy(eboot_path, "host0:/", sizeof(eboot_path)); + int ret; + + sceSystemServiceHideSplashScreen(); + + + uintptr_t intptr=0; + sscanf(argv[1],"%p",&intptr); + argv[1] = NULL; + myConf=(OrbisGlobalConf *)intptr; + ret=ps4LinkInitWithConf(myConf->confLink); + if(!ret) + { + ps4LinkFinish(); + return; + } + orbisFileInit(); + orbisPadInitWithConf(myConf->confPad); + scePadClose(myConf->confPad->padHandle); + + strlcpy(eboot_path, "host0:app", sizeof(eboot_path)); strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT])); - strlcpy(user_path, "host0:/data/retroarch/", sizeof(user_path)); + strlcpy(user_path, "host0:app/data/retroarch/", sizeof(user_path)); RARCH_LOG("port dir: [%s]\n", g_defaults.dirs[DEFAULT_DIR_PORT]); @@ -160,7 +179,7 @@ static void frontend_orbis_get_environment_settings(int *argc, char *argv[], params = (struct rarch_main_wrap*)params_data; params->verbose = true; - if (!string_is_empty(argv[1])) + if (!string_is_empty(argv[2])) { static char path[PATH_MAX_LENGTH] = {0}; struct rarch_main_wrap *args = @@ -168,7 +187,7 @@ static void frontend_orbis_get_environment_settings(int *argc, char *argv[], if (args) { - strlcpy(path, argv[1], sizeof(path)); + strlcpy(path, argv[2], sizeof(path)); args->touched = true; args->no_content = false; @@ -183,7 +202,7 @@ static void frontend_orbis_get_environment_settings(int *argc, char *argv[], RARCH_LOG("argv[1]: %s\n", argv[1]); RARCH_LOG("argv[2]: %s\n", argv[2]); - RARCH_LOG("Auto-start game %s.\n", argv[1]); + RARCH_LOG("Auto-start game %s.\n", argv[2]); } } #endif @@ -215,7 +234,6 @@ static void frontend_orbis_shutdown(bool unused) return; } - static void frontend_orbis_init(void *data) { @@ -309,7 +327,7 @@ static int frontend_orbis_parse_drive_list(void *data, bool load_content) MSG_UNKNOWN; menu_entries_append_enum(list, - "app0", + "host0:app", msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR), enum_idx, FILE_TYPE_DIRECTORY, 0, 0); diff --git a/frontend/drivers/platform_ps2.c b/frontend/drivers/platform_ps2.c index ca7411bb45..0d69d7615c 100644 --- a/frontend/drivers/platform_ps2.c +++ b/frontend/drivers/platform_ps2.c @@ -20,13 +20,11 @@ #include #include #include -#include -#include #include #include #include -#include - +#include +#include enum BootDeviceIDs{ BOOT_DEVICE_UNKNOWN = -1, @@ -73,6 +71,12 @@ extern unsigned int usbd_irx_size; extern unsigned char usbhdfsd_irx_start[]; extern unsigned int usbhdfsd_irx_size; +extern unsigned char mcman_irx_start[]; +extern unsigned int mcman_irx_size; + +extern unsigned char mcserv_irx_start[]; +extern unsigned int mcserv_irx_size; + static unsigned char HDDModulesLoaded=0; char eboot_path[512]; @@ -80,30 +84,47 @@ char user_path[512]; static enum frontend_fork ps2_fork_mode = FRONTEND_FORK_NONE; -//Only paths residing on "basic" devices (devices that don't require mounting) -//can be specified here, since this system doesn't perform mounting based on the path. +/* Only paths residing on "basic" devices + * (devices that don't require mounting) + * can be specified here, since this system + * doesn't perform mounting based on the path. + */ #define DEFAULT_PATH "mass:" -static int getBootDeviceID(char *path) { - int result = BOOT_DEVICE_HOST; +static int getBootDeviceID(char *path) +{ + if (!strncmp(path, "mc0:", 4)) + return BOOT_DEVICE_MC0; + else if (!strncmp(path, "mc1:", 4)) + return BOOT_DEVICE_MC1; + else if (!strncmp(path, "cdrom0:", 7)) + return BOOT_DEVICE_CDROM; + else if (!strncmp(path, "mass:", 5) || !strncmp(path, "mass0:", 6)) + return BOOT_DEVICE_MASS; + else if (!strncmp(path, "hdd:", 4) || !strncmp(path, "hdd0:", 5)) + return BOOT_DEVICE_HDD; + else if (!strncmp(path, "host", 4) && ((path[4]>='0' && path[4]<='9') || path[4]==':')) + return BOOT_DEVICE_HOST; + else + return BOOT_DEVICE_UNKNOWN; - if(!strncmp(path, "mc0:", 4)) result=BOOT_DEVICE_MC0; - else if(!strncmp(path, "mc1:", 4)) result=BOOT_DEVICE_MC1; - else if(!strncmp(path, "cdrom0:", 7)) result=BOOT_DEVICE_CDROM; - else if(!strncmp(path, "mass:", 5) || !strncmp(path, "mass0:", 6)) result=BOOT_DEVICE_MASS; - else if(!strncmp(path, "hdd:", 4) || !strncmp(path, "hdd0:", 5)) result=BOOT_DEVICE_HDD; - else if(!strncmp(path, "host", 4) && ((path[4]>='0' && path[4]<='9') || path[4]==':')) result=BOOT_DEVICE_HOST; - else result=BOOT_DEVICE_UNKNOWN; - - return result; + return BOOT_DEVICE_HOST; } -//HACK! If booting from a USB device, keep trying to open this program again until it succeeds. This will ensure that the emulator will be able to load its files. -static void waitUntilDeviceIsReady(const char *path) { +/* HACK! If booting from a USB device, keep trying to + * open this program again until it succeeds. + * + * This will ensure that the emulator will be able to load its files. + */ + +static void waitUntilDeviceIsReady(const char *path) +{ FILE *file; - while((file=fopen(path, "rb"))==NULL){ - //Wait for a while first, or the IOP will get swamped by requests from the EE. + while((file=fopen(path, "rb"))==NULL) + { + /* Wait for a while first, or the IOP + * will get swamped by requests from the EE. */ nopdelay(); nopdelay(); nopdelay(); @@ -117,47 +138,54 @@ static void waitUntilDeviceIsReady(const char *path) { fclose(file); } -void setPWDOnPFS(const char *FullCWD_path) { - int i; - char *path; - - path=NULL; - for(i=strlen(FullCWD_path); i>=0; i--){ /* Try to seperate the CWD from the path to this ELF. */ - if(FullCWD_path[i]==':'){ - if((path=malloc(i+6+2))!=NULL){ - strcpy(path, "pfs0:/"); - strncat(path, FullCWD_path, i+1); - path[i+1+6]='\0'; - } - break; - } - else if((FullCWD_path[i]=='\\')||(FullCWD_path[i]=='/')){ - if((path=malloc(i+6+1))!=NULL){ - strcpy(path, "pfs0:/"); - strncat(path, FullCWD_path, i); - path[i+6]='\0'; - } - break; - } - } - - if(path!=NULL){ - chdir(path); - free(path); - } +void setPWDOnPFS(const char *FullCWD_path) +{ + int i; + char *path=NULL; + for (i=strlen(FullCWD_path); i>=0; i--) + { + /* Try to seperate the CWD from the path to this ELF. */ + if (FullCWD_path[i]==':') + { + if ((path=malloc(i+6+2))!=NULL) + { + strcpy(path, "pfs0:/"); + strncat(path, FullCWD_path, i+1); + path[i+1+6]='\0'; + } + break; + } + else if ((FullCWD_path[i]=='\\')||(FullCWD_path[i]=='/')) + { + if ((path=malloc(i+6+1))!=NULL) + { + strcpy(path, "pfs0:/"); + strncat(path, FullCWD_path, i); + path[i+6]='\0'; + } + break; + } + } + + if (path!=NULL) + { + chdir(path); + free(path); + } } -static const char *getMountParams(const char *command, char *BlockDevice) { - const char *MountPath; +static const char *getMountParams(const char *command, char *BlockDevice) +{ int BlockDeviceNameLen; + const char *MountPath=NULL; - MountPath=NULL; - if(strlen(command)>6 && (MountPath=strchr(&command[5], ':'))!=NULL){ + if (strlen(command)>6 && (MountPath=strchr(&command[5], ':'))!=NULL) + { BlockDeviceNameLen=(unsigned int)MountPath-(unsigned int)command; strncpy(BlockDevice, command, BlockDeviceNameLen); BlockDevice[BlockDeviceNameLen]='\0'; - - MountPath++; //This is the location of the mount path; + + MountPath++; /* This is the location of the mount path; */ } return MountPath; @@ -204,14 +232,16 @@ static void create_path_names(void) static void poweroffCallback(void *arg) { - //Close all files and unmount all partitions. - //close(fd); +#if 0 + /* Close all files and unmount all partitions. */ + close(fd); - //If you use PFS, close all files and unmount all partitions. - //fileXioDevctl("pfs:", PDIOC_CLOSEALL, NULL, 0, NULL, 0) + /* If you use PFS, close all files and unmount all partitions. */ + fileXioDevctl("pfs:", PDIOC_CLOSEALL, NULL, 0, NULL, 0) - //Shut down DEV9, if you used it. - //while(fileXioDevctl("dev9x:", DDIOC_OFF, NULL, 0, NULL, 0) < 0){}; + /* Shut down DEV9, if you used it. */ + while(fileXioDevctl("dev9x:", DDIOC_OFF, NULL, 0, NULL, 0) < 0){}; +#endif printf("Shutdown!"); poweroffShutdown(); @@ -226,34 +256,37 @@ static void frontend_ps2_get_environment_settings(int *argc, char *argv[], getcwd(cwd, sizeof(cwd)); bootDeviceID=getBootDeviceID(cwd); - //Mount the HDD partition, if required. - if(bootDeviceID==BOOT_DEVICE_HDD){ - /* Try not to adjust this unless you know what you are doing. The tricky part i keeping the NULL character in the middle of that argument list separated from the number 4. */ - static const char PS2HDD_args[]="-o\0""2"; - static const char PS2FS_args[]="-o\0""8"; - if(!HDDModulesLoaded){ - SifExecModuleBuffer(poweroff_irx_start, poweroff_irx_size, 0, NULL, NULL); - SifExecModuleBuffer(ps2dev9_irx_start, ps2dev9_irx_size, 0, NULL, NULL); - SifExecModuleBuffer(ps2atad_irx_start, ps2atad_irx_size, 0, NULL, NULL); - SifExecModuleBuffer(ps2hdd_irx_start, ps2hdd_irx_size, sizeof(PS2HDD_args), PS2HDD_args, NULL); - SifExecModuleBuffer(ps2fs_irx_start, ps2fs_irx_size, sizeof(PS2FS_args), PS2FS_args, NULL); - HDDModulesLoaded=1; - } - - //Attempt to mount the partition. - if((mountPoint=getMountParams(cwd, blockDevice))!=NULL && !strncmp(mountPoint, "pfs:", 4)){ + /* Mount the HDD partition, if required. */ + if (bootDeviceID==BOOT_DEVICE_HDD) + { + /* Try not to adjust this unless you know what you are doing. The tricky part i keeping the NULL character in the middle of that argument list separated from the number 4. */ + static const char PS2HDD_args[]="-o\0""2"; + static const char PS2FS_args[]="-o\0""8"; + + if (!HDDModulesLoaded) + { + SifExecModuleBuffer(poweroff_irx_start, poweroff_irx_size, 0, NULL, NULL); + SifExecModuleBuffer(ps2dev9_irx_start, ps2dev9_irx_size, 0, NULL, NULL); + SifExecModuleBuffer(ps2atad_irx_start, ps2atad_irx_size, 0, NULL, NULL); + SifExecModuleBuffer(ps2hdd_irx_start, ps2hdd_irx_size, sizeof(PS2HDD_args), PS2HDD_args, NULL); + SifExecModuleBuffer(ps2fs_irx_start, ps2fs_irx_size, sizeof(PS2FS_args), PS2FS_args, NULL); + HDDModulesLoaded=1; + } + + /* Attempt to mount the partition. */ + if ((mountPoint=getMountParams(cwd, blockDevice))!=NULL && !strncmp(mountPoint, "pfs:", 4)) + { fileXioMount("pfs0:", blockDevice, FIO_MT_RDWR); - + setPWDOnPFS(&mountPoint[4]); } - } else if(bootDeviceID==BOOT_DEVICE_CDROM){ - chdir(DEFAULT_PATH); - } else if(bootDeviceID==BOOT_DEVICE_MASS){ - waitUntilDeviceIsReady(argv[0]); - } else if (bootDeviceID==BOOT_DEVICE_UNKNOWN) { - } + else if (bootDeviceID==BOOT_DEVICE_CDROM) + chdir(DEFAULT_PATH); + else if (bootDeviceID==BOOT_DEVICE_MASS) + waitUntilDeviceIsReady(argv[0]); + else if (bootDeviceID==BOOT_DEVICE_UNKNOWN) { } create_path_names(); @@ -299,33 +332,44 @@ static void frontend_ps2_init(void *data) { SifInitRpc(0); #if !defined(DEBUG) - while(!SifIopReset(NULL, 0)){}; // Comment this line if you don't wanna debug the output + /* Comment this line if you don't wanna debug the output */ + while(!SifIopReset(NULL, 0)){}; #endif while(!SifIopSync()){}; SifInitRpc(0); sbv_patch_enable_lmb(); + /* Controllers */ + SifLoadModule("rom0:SIO2MAN", 0, NULL); + SifLoadModule("rom0:PADMAN", 0, NULL); + + /* I/O Files */ SifExecModuleBuffer(iomanX_irx_start, iomanX_irx_size, 0, NULL, NULL); SifExecModuleBuffer(fileXio_irx_start, fileXio_irx_size, 0, NULL, NULL); + + /* Memory Card */ + SifExecModuleBuffer(mcman_irx_start, mcman_irx_size, 0, NULL, NULL); + SifExecModuleBuffer(mcserv_irx_start, mcserv_irx_size, 0, NULL, NULL); - SifLoadModule("rom0:SIO2MAN", 0, NULL); - SifLoadModule("rom0:MCMAN", 0, NULL); - SifLoadModule("rom0:MCSERV", 0, NULL); - SifLoadModule("rom0:PADMAN", 0, NULL); - + /* USB */ SifExecModuleBuffer(usbd_irx_start, usbd_irx_size, 0, NULL, NULL); SifExecModuleBuffer(usbhdfsd_irx_start, usbhdfsd_irx_size, 0, NULL, NULL); + + /* Audio */ SifExecModuleBuffer(freesd_irx_start, freesd_irx_size, 0, NULL, NULL); SifExecModuleBuffer(audsrv_irx_start, audsrv_irx_size, 0, NULL, NULL); - fileXioInit(); - audsrv_init(); + /* Initializes audsrv library */ + if (audsrv_init()) { + RARCH_ERR("audsrv library not initalizated\n"); + } - SDL_Init(SDL_INIT_TIMER); - - -retro_sleep(100); + /* Initializes pad library + Must be init with 0 as parameter*/ + if (padInit(0) != 1) { + RARCH_ERR("padInit library not initalizated\n"); + } #if defined(HAVE_FILE_LOGGER) retro_main_log_file_init("retroarch.log"); @@ -343,6 +387,10 @@ static void frontend_ps2_deinit(void *data) #endif #endif + + padEnd(); + audsrv_quit(); + fileXioUmount("pfs0:"); fileXioExit(); @@ -368,7 +416,9 @@ static void frontend_ps2_exec(const char *path, bool should_load_game) #endif RARCH_LOG("Attempt to load executable: [%s].\n", path); - // exitspawn_kernel(path, args, argp); // I don't know what this is doing +#if 0 + exitspawn_kernel(path, args, argp); /* I don't know what this is doing */ +#endif #endif } @@ -423,7 +473,7 @@ static void frontend_ps2_exitspawn(char *core_path, size_t core_path_size) static void frontend_ps2_shutdown(bool unused) { poweroffInit(); - //Set callback function + /* Set callback function */ poweroffSetCallback(&poweroffCallback, NULL); } diff --git a/frontend/drivers/platform_switch.c b/frontend/drivers/platform_switch.c index 59e38b6d44..e0cb9b0b25 100644 --- a/frontend/drivers/platform_switch.c +++ b/frontend/drivers/platform_switch.c @@ -258,9 +258,6 @@ static void frontend_switch_deinit(void *data) if (psmInitialized) psmExit(); -#ifndef HAVE_OPENGL - gfxExit(); -#endif appletUnlockExit(); #endif } @@ -402,18 +399,24 @@ void frontend_switch_showsplash(void) { printf("[Splash] Showing splashScreen\n"); + NWindow *win = nwindowGetDefault(); + Framebuffer fb; + framebufferCreate(&fb, win, 1280, 720, PIXEL_FORMAT_RGBA_8888, 2); + framebufferMakeLinear(&fb); + if (splashData) { uint32_t width = 0; uint32_t height = 0; - uint32_t *frambuffer = (uint32_t *)gfxGetFramebuffer(&width, &height); + uint32_t stride; + uint32_t *frambuffer = (uint32_t *)framebufferBegin(&fb, &stride); - gfx_slow_swizzling_blit(frambuffer, splashData, width, height, 0, 0, false); + gfx_cpy_dsp_buf(frambuffer, splashData, width, height, stride, false); - gfxFlushBuffers(); - gfxSwapBuffers(); - gfxWaitForVsync(); + framebufferEnd(&fb); } + + framebufferClose(&fb); } /* From rpng_test.c */ @@ -656,7 +659,6 @@ static void frontend_switch_shutdown(bool unused) /* runloop_get_system_info isnt initialized that early.. */ extern void retro_get_system_info(struct retro_system_info *info); - static void frontend_switch_init(void *data) { @@ -670,16 +672,6 @@ static void frontend_switch_init(void *data) appletHook(&applet_hook_cookie, on_applet_hook, NULL); appletSetFocusHandlingMode(AppletFocusHandlingMode_NoSuspend); -#ifndef HAVE_OPENGL - /* Init Resolution before initDefault */ - gfxInitResolution(1280, 720); - - gfxInitDefault(); - gfxSetMode(GfxMode_TiledDouble); - - gfxConfigureTransform(0); -#endif /* HAVE_OPENGL */ - bool recording_supported = false; appletIsGamePlayRecordingSupported(&recording_supported); if(recording_supported) diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c index 440b336050..e916693663 100644 --- a/frontend/drivers/platform_unix.c +++ b/frontend/drivers/platform_unix.c @@ -1824,7 +1824,6 @@ static void frontend_unix_get_env(int *argc, else if (strstr(device_model, "JSS15J")) g_defaults.settings.video_refresh_rate = 59.65; - /* For gamepad-like/console devices: * * - Explicitly disable input overlay by default diff --git a/frontend/drivers/platform_unix.h b/frontend/drivers/platform_unix.h index 9c18c4c990..672f334d86 100644 --- a/frontend/drivers/platform_unix.h +++ b/frontend/drivers/platform_unix.h @@ -104,7 +104,6 @@ struct android_app * receive user input events. */ AInputQueue* inputQueue; - /* When non-NULL, this is the window surface that the app can draw in. */ ANativeWindow* window; @@ -165,7 +164,6 @@ struct android_app jmethodID setSustainedPerformanceMode; }; - enum { LOOPER_ID_MAIN = 1, diff --git a/frontend/drivers/platform_uwp.c b/frontend/drivers/platform_uwp.c new file mode 100644 index 0000000000..b6fa41002c --- /dev/null +++ b/frontend/drivers/platform_uwp.c @@ -0,0 +1,418 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + +#include "../frontend_driver.h" +#include "../../configuration.h" +#include "../../defaults.h" +#include "../../retroarch.h" +#include "../../verbosity.h" +#include "../../ui/drivers/ui_win32.h" + +#include "../../uwp/uwp_func.h" + +static void frontend_uwp_get_os(char *s, size_t len, int *major, int *minor) +{ + char buildStr[11] = {0}; + bool server = false; + const char *arch = ""; + +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 + /* Windows 2000 and later */ + SYSTEM_INFO si = {{0}}; + OSVERSIONINFOEX vi = {0}; + vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + + GetSystemInfo(&si); + + /* Available from NT 3.5 and Win95 */ + GetVersionEx((OSVERSIONINFO*)&vi); + + server = vi.wProductType != VER_NT_WORKSTATION; + + switch (si.wProcessorArchitecture) + { + case PROCESSOR_ARCHITECTURE_AMD64: + arch = "x64"; + break; + case PROCESSOR_ARCHITECTURE_INTEL: + arch = "x86"; + break; + case PROCESSOR_ARCHITECTURE_ARM: + arch = "ARM"; + break; + default: + break; + } +#else + OSVERSIONINFO vi = {0}; + vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + + /* Available from NT 3.5 and Win95 */ + GetVersionEx(&vi); +#endif + + if (major) + *major = vi.dwMajorVersion; + + if (minor) + *minor = vi.dwMinorVersion; + + if (vi.dwMajorVersion == 4 && vi.dwMinorVersion == 0) + snprintf(buildStr, sizeof(buildStr), "%lu", (DWORD)(LOWORD(vi.dwBuildNumber))); /* Windows 95 build number is in the low-order word only */ + else + snprintf(buildStr, sizeof(buildStr), "%lu", vi.dwBuildNumber); + + switch (vi.dwMajorVersion) + { + case 10: + if (server) + strlcpy(s, "Windows Server 2016", len); + else + strlcpy(s, "Windows 10", len); + break; + case 6: + switch (vi.dwMinorVersion) + { + case 3: + if (server) + strlcpy(s, "Windows Server 2012 R2", len); + else + strlcpy(s, "Windows 8.1", len); + break; + case 2: + if (server) + strlcpy(s, "Windows Server 2012", len); + else + strlcpy(s, "Windows 8", len); + break; + case 1: + if (server) + strlcpy(s, "Windows Server 2008 R2", len); + else + strlcpy(s, "Windows 7", len); + break; + case 0: + if (server) + strlcpy(s, "Windows Server 2008", len); + else + strlcpy(s, "Windows Vista", len); + break; + default: + break; + } + break; + case 5: + switch (vi.dwMinorVersion) + { + case 2: + if (server) + strlcpy(s, "Windows Server 2003", len); + else + { + /* Yes, XP Pro x64 is a higher version number than XP x86 */ + if (string_is_equal(arch, "x64")) + strlcpy(s, "Windows XP", len); + } + break; + case 1: + strlcpy(s, "Windows XP", len); + break; + case 0: + strlcpy(s, "Windows 2000", len); + break; + } + break; + case 4: + switch (vi.dwMinorVersion) + { + case 0: + if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) + strlcpy(s, "Windows 95", len); + else if (vi.dwPlatformId == VER_PLATFORM_WIN32_NT) + strlcpy(s, "Windows NT 4.0", len); + else + strlcpy(s, "Unknown", len); + break; + case 90: + strlcpy(s, "Windows ME", len); + break; + case 10: + strlcpy(s, "Windows 98", len); + break; + } + break; + default: + snprintf(s, len, "Windows %i.%i", *major, *minor); + break; + } + + if (!string_is_empty(arch)) + { + strlcat(s, " ", len); + strlcat(s, arch, len); + } + + strlcat(s, " Build ", len); + strlcat(s, buildStr, len); + + if (!string_is_empty(vi.szCSDVersion)) + { + strlcat(s, " ", len); + strlcat(s, vi.szCSDVersion, len); + } + + if (!string_is_empty(uwp_device_family)) + { + strlcat(s, " ", len); + strlcat(s, uwp_device_family, len); + } +} + +static void frontend_uwp_init(void *data) +{ +} + +enum frontend_powerstate frontend_uwp_get_powerstate( + int *seconds, int *percent) +{ + SYSTEM_POWER_STATUS status; + enum frontend_powerstate ret = FRONTEND_POWERSTATE_NONE; + + if (!GetSystemPowerStatus(&status)) + return ret; + + if (status.BatteryFlag == 0xFF) + ret = FRONTEND_POWERSTATE_NONE; + if (status.BatteryFlag & (1 << 7)) + ret = FRONTEND_POWERSTATE_NO_SOURCE; + else if (status.BatteryFlag & (1 << 3)) + ret = FRONTEND_POWERSTATE_CHARGING; + else if (status.ACLineStatus == 1) + ret = FRONTEND_POWERSTATE_CHARGED; + else + ret = FRONTEND_POWERSTATE_ON_POWER_SOURCE; + + *percent = (int)status.BatteryLifePercent; + *seconds = (int)status.BatteryLifeTime; + +#ifdef _WIN32 + if (*percent == 255) + *percent = 0; +#endif + return ret; +} + +enum frontend_architecture frontend_uwp_get_architecture(void) +{ +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 + /* Windows 2000 and later */ + SYSTEM_INFO si = {{0}}; + + GetSystemInfo(&si); + + switch (si.wProcessorArchitecture) + { + case PROCESSOR_ARCHITECTURE_AMD64: + return FRONTEND_ARCH_X86_64; + break; + case PROCESSOR_ARCHITECTURE_INTEL: + return FRONTEND_ARCH_X86; + break; + case PROCESSOR_ARCHITECTURE_ARM: + return FRONTEND_ARCH_ARM; + break; + default: + break; + } +#endif + + return FRONTEND_ARCH_NONE; +} + +static int frontend_uwp_parse_drive_list(void *data, bool load_content) +{ +#ifdef HAVE_MENU + file_list_t *list = (file_list_t*)data; + enum msg_hash_enums enum_idx = load_content ? + MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR : + MSG_UNKNOWN; + /* TODO (krzys_h): UWP storage sandboxing */ + char *home_dir = (char*)malloc( + PATH_MAX_LENGTH * sizeof(char)); + + fill_pathname_home_dir(home_dir, + PATH_MAX_LENGTH * sizeof(char)); + + menu_entries_append_enum(list, + home_dir, + msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR), + enum_idx, + FILE_TYPE_DIRECTORY, 0, 0); + + free(home_dir); +#endif + + return 0; +} + +static void frontend_uwp_environment_get(int *argc, char *argv[], + void *args, void *params_data) +{ + /* On UWP, we have to use the writable directory + * instead of the install directory. */ + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_ASSETS], + "~\\assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], + "~\\filters\\audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], + "~\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS], + "~\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE], + "~\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CURSOR], + "~\\database\\cursors", sizeof(g_defaults.dirs[DEFAULT_DIR_CURSOR])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_PLAYLIST], + "~\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG], + "~\\config\\record", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT], + "~\\recordings", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], + "~\\config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_REMAP], + "~\\config\\remaps", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS], + "~\\assets\\wallpapers", sizeof(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS], + "~\\thumbnails", sizeof(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_OVERLAY], + "~\\overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY])); + /* This one is an exception: cores have to be loaded from + * the install directory, + * since this is the only place UWP apps can take .dlls from */ + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE], + ":\\cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], + "~\\info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], + "~\\autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SHADER], + "~\\shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], + "~\\downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT], + "~\\screenshots", sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SRAM], + "~\\saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], + "~\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE])); + fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM], + "~\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM])); + +#ifdef HAVE_MENU +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) + snprintf(g_defaults.settings.menu, + sizeof(g_defaults.settings.menu), "xmb"); +#endif +#endif +} + +static uint64_t frontend_uwp_get_mem_total(void) +{ + /* OSes below 2000 don't have the Ex version, + * and non-Ex cannot work with >4GB RAM */ +#if _WIN32_WINNT >= 0x0500 + MEMORYSTATUSEX mem_info; + mem_info.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&mem_info); + return mem_info.ullTotalPhys; +#else + MEMORYSTATUS mem_info; + mem_info.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&mem_info); + return mem_info.dwTotalPhys; +#endif +} + +static uint64_t frontend_uwp_get_mem_used(void) +{ + /* OSes below 2000 don't have the Ex version, + * and non-Ex cannot work with >4GB RAM */ +#if _WIN32_WINNT >= 0x0500 + MEMORYSTATUSEX mem_info; + mem_info.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&mem_info); + return ((frontend_uwp_get_mem_total() - mem_info.ullAvailPhys)); +#else + MEMORYSTATUS mem_info; + mem_info.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&mem_info); + return ((frontend_uwp_get_mem_total() - mem_info.dwAvailPhys)); +#endif +} + +frontend_ctx_driver_t frontend_ctx_uwp = { + frontend_uwp_environment_get, + frontend_uwp_init, + NULL, /* deinit */ + NULL, /* exitspawn */ + NULL, /* process_args */ + NULL, /* exec */ + NULL, /* set_fork */ + NULL, /* shutdown */ + NULL, /* get_name */ + frontend_uwp_get_os, + NULL, /* get_rating */ + NULL, /* load_content */ + frontend_uwp_get_architecture, + frontend_uwp_get_powerstate, + frontend_uwp_parse_drive_list, + frontend_uwp_get_mem_total, + frontend_uwp_get_mem_used, + NULL, /* install_signal_handler */ + NULL, /* get_sighandler_state */ + NULL, /* set_sighandler_state */ + NULL, /* destroy_sighandler_state */ + NULL, /* attach_console */ + NULL, /* detach_console */ + NULL, /* watch_path_for_changes */ + NULL, /* check_for_path_changes */ + NULL, /* set_sustained_performance_mode */ + "uwp" +}; diff --git a/frontend/drivers/platform_wiiu.c b/frontend/drivers/platform_wiiu.c index 69e9ffc7c4..36097fdabf 100644 --- a/frontend/drivers/platform_wiiu.c +++ b/frontend/drivers/platform_wiiu.c @@ -133,7 +133,6 @@ static void frontend_wiiu_init(void *data) DEBUG_LINE(); } - static int frontend_wiiu_get_rating(void) { return 10; @@ -168,7 +167,6 @@ static int frontend_wiiu_parse_drive_list(void *data, bool load_content) return 0; } - static void frontend_wiiu_exec(const char *path, bool should_load_game) { @@ -269,7 +267,6 @@ static void frontend_wiiu_exitspawn(char *s, size_t len) frontend_wiiu_exec(s, should_load_game); } - frontend_ctx_driver_t frontend_ctx_wiiu = { frontend_wiiu_get_environment_settings, diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index c66cb3835f..afeecbeef5 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -43,12 +43,10 @@ #include "../../verbosity.h" #include "../../ui/drivers/ui_win32.h" -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -#include "../../uwp/uwp_func.h" +#ifndef SM_SERVERR2 +#define SM_SERVERR2 89 #endif -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -#else /* We only load this library once, so we let it be * unloaded at application shutdown, since unloading * it early seems to cause issues on some systems. @@ -151,7 +149,6 @@ static void gfx_set_dwm(void) RARCH_ERR("Failed to set composition state ...\n"); dwm_composition_disabled = settings->bools.video_disable_composition; } -#endif static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) { @@ -194,7 +191,6 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) GetVersionEx(&vi); #endif - if (major) *major = vi.dwMajorVersion; @@ -252,11 +248,8 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) if (server) { strlcpy(s, "Windows Server 2003", len); -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -#else if (GetSystemMetrics(SM_SERVERR2)) strlcat(s, " R2", len); -#endif } else { @@ -312,19 +305,10 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) strlcat(s, vi.szCSDVersion, len); } -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - if (!string_is_empty(uwp_device_family)) - { - strlcat(s, " ", len); - strlcat(s, uwp_device_family, len); - } -#endif } static void frontend_win32_init(void *data) { -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -#else typedef BOOL (WINAPI *isProcessDPIAwareProc)(); typedef BOOL (WINAPI *setProcessDPIAwareProc)(); #ifdef HAVE_DYNAMIC @@ -343,7 +327,6 @@ static void frontend_win32_init(void *data) if (!isDPIAwareProc()) if (setDPIAwareProc) setDPIAwareProc(); -#endif } enum frontend_powerstate frontend_win32_get_powerstate(int *seconds, int *percent) @@ -409,22 +392,6 @@ static int frontend_win32_parse_drive_list(void *data, bool load_content) enum msg_hash_enums enum_idx = load_content ? MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR : MSG_UNKNOWN; -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - /* TODO (krzys_h): UWP storage sandboxing */ - - char *home_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); - - fill_pathname_home_dir(home_dir, - PATH_MAX_LENGTH * sizeof(char)); - - menu_entries_append_enum(list, - home_dir, - msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR), - enum_idx, - FILE_TYPE_DIRECTORY, 0, 0); - - free(home_dir); -#else size_t i = 0; unsigned drives = GetLogicalDrives(); char drive[] = " :\\"; @@ -439,7 +406,6 @@ static int frontend_win32_parse_drive_list(void *data, bool load_content) enum_idx, FILE_TYPE_DIRECTORY, 0, 0); } -#endif #endif return 0; @@ -448,57 +414,6 @@ static int frontend_win32_parse_drive_list(void *data, bool load_content) static void frontend_win32_environment_get(int *argc, char *argv[], void *args, void *params_data) { -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - /* On UWP, we have to use the writable directory instead of the install directory */ - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_ASSETS], - "~\\assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], - "~\\filters\\audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], - "~\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS], - "~\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE], - "~\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CURSOR], - "~\\database\\cursors", sizeof(g_defaults.dirs[DEFAULT_DIR_CURSOR])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_PLAYLIST], - "~\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG], - "~\\config\\record", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT], - "~\\recordings", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], - "~\\config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_REMAP], - "~\\config\\remaps", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS], - "~\\assets\\wallpapers", sizeof(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS], - "~\\thumbnails", sizeof(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_OVERLAY], - "~\\overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY])); - /* This one is an exception: cores have to be loaded from the install directory, - * since this is the only place UWP apps can take .dlls from */ - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE], - ":\\cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], - "~\\info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], - "~\\autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SHADER], - "~\\shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], - "~\\downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT], - "~\\screenshots", sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SRAM], - "~\\saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], - "~\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE])); - fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM], - "~\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM])); -#else gfx_set_dwm(); fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_ASSETS], @@ -547,7 +462,6 @@ static void frontend_win32_environment_get(int *argc, char *argv[], ":\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE])); fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM], ":\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM])); -#endif #ifdef HAVE_MENU #if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) @@ -591,13 +505,10 @@ static uint64_t frontend_win32_get_mem_used(void) #endif } -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -#else static void frontend_win32_attach_console(void) { #ifdef _WIN32 #ifdef _WIN32_WINNT_WINXP - /* msys will start the process with FILE_TYPE_PIPE connected. * cmd will start the process with FILE_TYPE_UNKNOWN connected * (since this is subsystem windows application @@ -638,7 +549,6 @@ static void frontend_win32_detach_console(void) { #if defined(_WIN32) && !defined(_XBOX) #ifdef _WIN32_WINNT_WINXP - if(console_needs_free) { /* we don't reconnect stdout/stderr to anything here, @@ -647,11 +557,9 @@ static void frontend_win32_detach_console(void) FreeConsole(); console_needs_free = false; } - #endif #endif } -#endif frontend_ctx_driver_t frontend_ctx_win32 = { frontend_win32_environment_get, @@ -675,13 +583,8 @@ frontend_ctx_driver_t frontend_ctx_win32 = { NULL, /* get_sighandler_state */ NULL, /* set_sighandler_state */ NULL, /* destroy_sighandler_state */ -#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - NULL, - NULL, -#else frontend_win32_attach_console, /* attach_console */ frontend_win32_detach_console, /* detach_console */ -#endif NULL, /* watch_path_for_changes */ NULL, /* check_for_path_changes */ NULL, /* set_sustained_performance_mode */ diff --git a/frontend/frontend.c b/frontend/frontend.c index 8f96af7b44..c1e281228a 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -36,6 +36,11 @@ #include "../driver.h" #include "../paths.h" #include "../retroarch.h" +#include "../verbosity.h" + +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) +#include +#endif /* griffin hack */ #ifdef HAVE_QT @@ -44,10 +49,6 @@ #endif #endif -#ifndef HAVE_MAIN -#include "../retroarch.h" -#endif - /** * main_exit: * @@ -89,6 +90,10 @@ void main_exit(void *args) driver_ctl(RARCH_DRIVER_CTL_DEINIT, NULL); ui_companion_driver_free(); frontend_driver_free(); + +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) + CoUninitialize(); +#endif } /** @@ -109,6 +114,14 @@ int rarch_main(int argc, char *argv[], void *data) const ui_application_t *ui_application = NULL; #endif +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) + if (FAILED(CoInitialize(NULL))) + { + RARCH_ERR("FATAL: Failed to initialize the COM interface\n"); + return 1; + } +#endif + rarch_ctl(RARCH_CTL_PREINIT, NULL); frontend_driver_init_first(args); rarch_ctl(RARCH_CTL_INIT, NULL); @@ -161,7 +174,6 @@ int rarch_main(int argc, char *argv[], void *data) } #ifndef HAVE_MAIN -#ifndef ORBIS #ifdef __cplusplus extern "C" #endif @@ -170,4 +182,3 @@ int main(int argc, char *argv[]) return rarch_main(argc, argv, NULL); } #endif -#endif diff --git a/frontend/frontend_driver.c b/frontend/frontend_driver.c index b8ff69a442..0a9d3fc5d2 100644 --- a/frontend/frontend_driver.c +++ b/frontend/frontend_driver.c @@ -29,6 +29,12 @@ #include "frontend_driver.h" +#ifndef __WINRT__ +#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +#define __WINRT__ +#endif +#endif + static frontend_ctx_driver_t *frontend_ctx_drivers[] = { #if defined(EMSCRIPTEN) &frontend_ctx_emscripten, @@ -65,9 +71,12 @@ static frontend_ctx_driver_t *frontend_ctx_drivers[] = { #if defined(SWITCH) && defined(HAVE_LIBNX) &frontend_ctx_switch, #endif -#if defined(_WIN32) && !defined(_XBOX) +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) &frontend_ctx_win32, #endif +#if defined(__WINRT__) + &frontend_ctx_uwp, +#endif #ifdef XENON &frontend_ctx_xenon, #endif @@ -76,6 +85,9 @@ static frontend_ctx_driver_t *frontend_ctx_drivers[] = { #endif #ifdef SWITCH &frontend_ctx_switch, +#endif +#if defined(ORBIS) + &frontend_ctx_orbis, #endif &frontend_ctx_null, NULL diff --git a/frontend/frontend_driver.h b/frontend/frontend_driver.h index f5de976563..3920a660f4 100644 --- a/frontend/frontend_driver.h +++ b/frontend/frontend_driver.h @@ -124,10 +124,12 @@ extern frontend_ctx_driver_t frontend_ctx_ps2; extern frontend_ctx_driver_t frontend_ctx_ctr; extern frontend_ctx_driver_t frontend_ctx_switch; extern frontend_ctx_driver_t frontend_ctx_win32; +extern frontend_ctx_driver_t frontend_ctx_uwp; extern frontend_ctx_driver_t frontend_ctx_xenon; extern frontend_ctx_driver_t frontend_ctx_emscripten; extern frontend_ctx_driver_t frontend_ctx_dos; extern frontend_ctx_driver_t frontend_ctx_switch; +extern frontend_ctx_driver_t frontend_ctx_orbis; extern frontend_ctx_driver_t frontend_ctx_null; /** diff --git a/frontend/frontend_salamander.c b/frontend/frontend_salamander.c index 52868ec0c8..42bf3f38b6 100644 --- a/frontend/frontend_salamander.c +++ b/frontend/frontend_salamander.c @@ -162,7 +162,7 @@ static void salamander_init(char *s, size_t len) if (conf) { config_set_string(conf, "libretro_path", s); - config_file_write(conf, g_defaults.path.config); + config_file_write(conf, g_defaults.path.config, true); config_file_free(conf); } } diff --git a/gfx/common/ctr_common.h b/gfx/common/ctr_common.h index daf001c3b3..ff8e2236b5 100644 --- a/gfx/common/ctr_common.h +++ b/gfx/common/ctr_common.h @@ -138,5 +138,4 @@ static INLINE void ctr_set_scale_vector(ctr_scale_vector_t* vec, vec->v = -1.0 / texture_height; } - #endif // CTR_COMMON_H__ diff --git a/gfx/common/d3d10_common.h b/gfx/common/d3d10_common.h index ee8373ca57..112fdd4b41 100644 --- a/gfx/common/d3d10_common.h +++ b/gfx/common/d3d10_common.h @@ -54,7 +54,6 @@ typedef ID3D10Debug* D3D10Debug; typedef ID3D10SwitchToRef* D3D10SwitchToRef; typedef ID3D10InfoQueue* D3D10InfoQueue; - #if !defined(__cplusplus) || defined(CINTERFACE) static INLINE void D3D10SetResourceEvictionPriority(D3D10Resource resource, UINT eviction_priority) { diff --git a/gfx/common/d3d8_common.c b/gfx/common/d3d8_common.c index f05ab1a18a..2da33c8eb6 100644 --- a/gfx/common/d3d8_common.c +++ b/gfx/common/d3d8_common.c @@ -75,7 +75,6 @@ typedef HRESULT (__stdcall LPD3DXFONT* ppFont); #endif - #ifdef HAVE_D3DX static D3DXCreateFontIndirect_t D3DCreateFontIndirect; static D3DCreateTextureFromFile_t D3DCreateTextureFromFile; @@ -364,4 +363,3 @@ void d3d8x_font_get_text_metrics(void *data, void *metrics) font->lpVtbl->GetTextMetrics(font, (TEXTMETRICA*)metrics); #endif } - diff --git a/gfx/common/d3d9_common.c b/gfx/common/d3d9_common.c index 21f279dc48..dd302671a4 100644 --- a/gfx/common/d3d9_common.c +++ b/gfx/common/d3d9_common.c @@ -99,7 +99,6 @@ typedef HRESULT (__stdcall LPD3DXFONT* ppFont); #endif - #ifdef HAVE_D3DX static D3D9XCreateFontIndirect_t D3D9CreateFontIndirect; static D3D9CreateTextureFromFile_t D3D9CreateTextureFromFile; @@ -602,7 +601,7 @@ void d3d9x_constant_table_set_matrix(LPDIRECT3DDEVICE9 dev, #if defined(HAVE_D3DX) LPD3DXCONSTANTTABLE consttbl = (LPD3DXCONSTANTTABLE)p; D3DXHANDLE handle = (D3DXHANDLE)data; - const D3DXMATRIX *matrix = (const D3DXMATRIX*)matrix; + const D3DXMATRIX *matrix = (const D3DXMATRIX*)_matrix; if (consttbl && dev && handle) consttbl->lpVtbl->SetMatrix(consttbl, dev, handle, matrix); #endif diff --git a/gfx/common/d3d_common.c b/gfx/common/d3d_common.c index 0685c6ea26..8e8fff7099 100644 --- a/gfx/common/d3d_common.c +++ b/gfx/common/d3d_common.c @@ -36,7 +36,6 @@ void *d3d_matrix_transpose(void *_pout, const void *_pm) return pout; } - void *d3d_matrix_identity(void *_pout) { struct d3d_matrix *pout = (struct d3d_matrix*)_pout; diff --git a/gfx/common/d3d_common.h b/gfx/common/d3d_common.h index c5b62496a2..326a50705e 100644 --- a/gfx/common/d3d_common.h +++ b/gfx/common/d3d_common.h @@ -54,7 +54,6 @@ struct d3d_matrix }; }; - typedef struct d3d_texture { void *data; diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index 348d1bafe4..b7476a05ab 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -330,12 +330,11 @@ bool egl_init_context(egl_ctx_data_t *egl, EGLenum platform, void *display_data, EGLint *major, EGLint *minor, - EGLint *n, const EGLint *attrib_ptr, + EGLint *count, const EGLint *attrib_ptr, egl_accept_config_cb_t cb) { EGLint i; EGLConfig *configs = NULL; - EGLint count = 0; EGLint matched = 0; int config_index = -1; EGLDisplay dpy = get_egl_display(platform, display_data); @@ -353,24 +352,24 @@ bool egl_init_context(egl_ctx_data_t *egl, RARCH_LOG("[EGL]: EGL version: %d.%d\n", *major, *minor); - if (!eglGetConfigs(egl->dpy, NULL, 0, &count) || count < 1) + if (!eglGetConfigs(egl->dpy, NULL, 0, count) || *count < 1) { RARCH_ERR("[EGL]: No configs to choose from.\n"); return false; } - configs = malloc(count * sizeof(*configs)); + configs = (EGLConfig*)malloc(*count * sizeof(*configs)); if (!configs) return false; if (!eglChooseConfig(egl->dpy, attrib_ptr, - configs, count, &matched) || !matched) + configs, *count, &matched) || !matched) { RARCH_ERR("[EGL]: No EGL configs with appropriate attributes.\n"); return false; } - for (i = 0; i < count; i++) + for (i = 0; i < *count; i++) { if (!cb || cb(display_data, egl->dpy, configs[i])) { @@ -381,7 +380,7 @@ bool egl_init_context(egl_ctx_data_t *egl, free(configs); - if (i == count) + if (i == *count) { RARCH_ERR("[EGL]: No EGL config found which satifies requirements.\n"); return false; @@ -419,7 +418,12 @@ bool egl_create_context(egl_ctx_data_t *egl, const EGLint *egl_attribs) bool egl_create_surface(egl_ctx_data_t *egl, void *native_window) { - egl->surf = eglCreateWindowSurface(egl->dpy, egl->config, (NativeWindowType)native_window, NULL); + EGLint window_attribs[] = { + EGL_RENDER_BUFFER, EGL_BACK_BUFFER, + EGL_NONE, + }; + + egl->surf = eglCreateWindowSurface(egl->dpy, egl->config, (NativeWindowType)native_window, window_attribs); if (egl->surf == EGL_NO_SURFACE) return false; diff --git a/gfx/common/metal/ShaderTypes.h b/gfx/common/metal/ShaderTypes.h index ea06c64289..db93f4ad86 100644 --- a/gfx/common/metal/ShaderTypes.h +++ b/gfx/common/metal/ShaderTypes.h @@ -89,4 +89,3 @@ typedef struct } FontFragmentIn; #endif /* ShaderTypes_h */ - diff --git a/gfx/common/metal_common.h b/gfx/common/metal_common.h index 4fbefa25ac..d8f934946a 100644 --- a/gfx/common/metal_common.h +++ b/gfx/common/metal_common.h @@ -44,7 +44,6 @@ extern MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt); @end - @interface MetalMenu : NSObject @property (nonatomic, readonly) bool hasFrame; @@ -59,7 +58,6 @@ extern MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt); filter:(RTextureFilter)filter; @end - @interface Overlay : NSObject @property (nonatomic, readwrite) bool enabled; @property (nonatomic, readwrite) bool fullscreen; diff --git a/gfx/common/switch_common.h b/gfx/common/switch_common.h index aa1813bf4c..5bb601ad92 100644 --- a/gfx/common/switch_common.h +++ b/gfx/common/switch_common.h @@ -56,6 +56,13 @@ typedef struct bool o_size; uint32_t o_height; uint32_t o_width; + + NWindow *win; + Framebuffer fb; + + // needed for the switch font driver + uint32_t *out_buffer; + uint32_t stride; } switch_video_t; typedef struct @@ -72,8 +79,10 @@ typedef struct bool resize; unsigned width, height; float refresh_rate; + NWindow *win; } switch_ctx_data_t; void gfx_slow_swizzling_blit(uint32_t *buffer, uint32_t *image, int w, int h, int tx, int ty, bool blend); +void gfx_cpy_dsp_buf(uint32_t *buffer, uint32_t *image, int w, int h, uint32_t stride, bool blend); #endif diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index 69c9758819..a16104087c 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -264,7 +264,6 @@ void vulkan_buffer_chain_free( VkDevice device, struct vk_buffer_chain *chain); - struct vk_descriptor_pool { VkDescriptorPool pool; @@ -444,7 +443,6 @@ uint32_t vulkan_find_memory_type_fallback( uint32_t device_reqs, uint32_t host_reqs_first, uint32_t host_reqs_second); - struct vk_texture vulkan_create_texture(vk_t *vk, struct vk_texture *old, unsigned width, unsigned height, @@ -589,4 +587,3 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, RETRO_END_DECLS #endif - diff --git a/gfx/common/wayland_common.h b/gfx/common/wayland_common.h index 3cbedb9048..941da1defa 100644 --- a/gfx/common/wayland_common.h +++ b/gfx/common/wayland_common.h @@ -37,7 +37,6 @@ typedef struct int16_t y; } wayland_touch_data_t; - typedef struct input_ctx_wayland_data { /* Wayland uses Linux keysyms. */ @@ -65,4 +64,3 @@ typedef struct input_ctx_wayland_data } input_ctx_wayland_data_t; #endif - diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 567b524f31..773cf408fb 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -180,8 +180,6 @@ typedef struct DISPLAYCONFIG_PATH_TARGET_INFO_CUSTOM { UINT32 statusFlags; } DISPLAYCONFIG_PATH_TARGET_INFO_CUSTOM; - - typedef struct DISPLAYCONFIG_PATH_INFO_CUSTOM { DISPLAYCONFIG_PATH_SOURCE_INFO_CUSTOM sourceInfo; DISPLAYCONFIG_PATH_TARGET_INFO_CUSTOM targetInfo; @@ -345,7 +343,6 @@ INT_PTR_COMPAT CALLBACK PickCoreProc(HWND hDlg, UINT message, return FALSE; } - static BOOL CALLBACK win32_monitor_enum_proc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData) { @@ -353,7 +350,6 @@ static BOOL CALLBACK win32_monitor_enum_proc(HMONITOR hMonitor, return TRUE; } - void win32_monitor_from_window(void) { #ifndef _XBOX @@ -426,18 +422,23 @@ void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id) } } - memset(mon, 0, sizeof(*mon)); - mon->cbSize = sizeof(MONITORINFOEX); - GetMonitorInfo(*hm_to_use, (LPMONITORINFO)mon); + if (hm_to_use) + { + memset(mon, 0, sizeof(*mon)); + mon->cbSize = sizeof(MONITORINFOEX); + + GetMonitorInfo(*hm_to_use, (LPMONITORINFO)mon); + } } bool win32_load_content_from_gui(const char *szFilename) { /* poll list of current cores */ size_t list_size; - content_ctx_info_t content_info = { 0 }; + content_ctx_info_t content_info = { 0 }; core_info_list_t *core_info_list = NULL; - const core_info_t *core_info = NULL; + const core_info_t *core_info = NULL; + core_info_get_list(&core_info_list); if (!core_info_list) @@ -467,7 +468,6 @@ bool win32_load_content_from_gui(const char *szFilename) if (string_is_equal(path_get(RARCH_PATH_CORE), info->path)) { /* Our previous core supports the current rom */ - content_ctx_info_t content_info = { 0 }; task_push_load_content_with_current_core_from_companion_ui( NULL, &content_info, @@ -487,19 +487,18 @@ bool win32_load_content_from_gui(const char *szFilename) if (info) { task_push_load_content_with_new_core_from_companion_ui( - info->path, NULL, &content_info, NULL, NULL); + info->path, NULL, NULL, &content_info, NULL, NULL); return true; } } else { - bool okay = false; + bool okay = false; settings_t *settings = config_get_ptr(); + /* Fullscreen: Show mouse cursor for dialog */ if (settings->bools.video_fullscreen) - { video_driver_show_mouse(); - } /* Pick one core that could be compatible, ew */ if (DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_PICKCORE), @@ -512,9 +511,7 @@ bool win32_load_content_from_gui(const char *szFilename) /* Fullscreen: Hide mouse cursor after dialog */ if (settings->bools.video_fullscreen) - { video_driver_hide_mouse(); - } return okay; } return false; @@ -522,21 +519,19 @@ bool win32_load_content_from_gui(const char *szFilename) static bool win32_drag_query_file(HWND hwnd, WPARAM wparam) { - bool okay = false; -#ifdef LEGACY_WIN32 - char szFilename[1024]; - szFilename[0] = '\0'; -#else - char *szFilename = NULL; - wchar_t wszFilename[1024]; - wszFilename[0] = L'\0'; -#endif - if (DragQueryFileR((HDROP)wparam, 0xFFFFFFFF, NULL, 0)) { + bool okay = false; #ifdef LEGACY_WIN32 + char szFilename[1024]; + szFilename[0] = '\0'; + DragQueryFileR((HDROP)wparam, 0, szFilename, sizeof(szFilename)); #else + wchar_t wszFilename[4096]; + char *szFilename = NULL; + wszFilename[0] = L'\0'; + DragQueryFileR((HDROP)wparam, 0, wszFilename, sizeof(wszFilename)); szFilename = utf16_to_utf8_string_alloc(wszFilename); #endif @@ -545,9 +540,11 @@ static bool win32_drag_query_file(HWND hwnd, WPARAM wparam) if (szFilename) free(szFilename); #endif + + return okay; } - return okay; + return false; } #ifndef _XBOX @@ -593,11 +590,13 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message, keysym = (unsigned)wparam; else #endif +#ifdef HAVE_DINPUT { /* extended keys will map to dinput if the high bit is set */ if (input_get_ptr() == &input_dinput && (lparam >> 24 & 0x1)) keysym |= 0x80; } +#endif /* Key released? */ if (message == WM_KEYUP || message == WM_SYSKEYUP) keydown = false; @@ -627,28 +626,33 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message, static void win32_set_position_from_config(void) { settings_t *settings = config_get_ptr(); - int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); - int title_bar_height = GetSystemMetrics(SM_CYCAPTION); - int menu_bar_height = GetSystemMetrics(SM_CYMENU); + int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); + int title_bar_height = GetSystemMetrics(SM_CYCAPTION); + int menu_bar_height = GetSystemMetrics(SM_CYMENU); + if (!settings->bools.video_window_save_positions) return; - g_win32_pos_x = settings->uints.window_position_x; - g_win32_pos_y = settings->uints.window_position_y; - g_win32_pos_width = settings->uints.window_position_width + border_thickness * 2; - g_win32_pos_height= settings->uints.window_position_height + border_thickness * 2 + title_bar_height; + g_win32_pos_x = settings->uints.window_position_x; + g_win32_pos_y = settings->uints.window_position_y; + g_win32_pos_width = settings->uints.window_position_width + + border_thickness * 2; + g_win32_pos_height = settings->uints.window_position_height + + border_thickness * 2 + title_bar_height; } static void win32_save_position(void) { RECT rect; - int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); - int title_bar_height = GetSystemMetrics(SM_CYCAPTION); - int menu_bar_height = GetSystemMetrics(SM_CYMENU); WINDOWPLACEMENT placement; + int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); + int title_bar_height = GetSystemMetrics(SM_CYCAPTION); + int menu_bar_height = GetSystemMetrics(SM_CYMENU); settings_t *settings = config_get_ptr(); + memset(&placement, 0, sizeof(placement)); - placement.length = sizeof(placement); + + placement.length = sizeof(placement); GetWindowPlacement(main_window.hwnd, &placement); @@ -691,10 +695,8 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message, } break; case WM_DROPFILES: - { - win32_drag_query_file(hwnd, wparam); - DragFinish((HDROP)wparam); - } + win32_drag_query_file(hwnd, wparam); + DragFinish((HDROP)wparam); break; case WM_CHAR: case WM_KEYDOWN: @@ -1148,32 +1150,40 @@ bool win32_suppress_screensaver(void *data, bool enable) { #if _WIN32_WINNT >= 0x0601 /* Windows 7, 8, 10 codepath */ - typedef HANDLE (WINAPI * PowerCreateRequestPtr)(REASON_CONTEXT *context); - typedef BOOL (WINAPI * PowerSetRequestPtr)(HANDLE PowerRequest, - POWER_REQUEST_TYPE RequestType); + typedef HANDLE(WINAPI * PowerCreateRequestPtr)(REASON_CONTEXT *context); + typedef BOOL(WINAPI * PowerSetRequestPtr)(HANDLE PowerRequest, + POWER_REQUEST_TYPE RequestType); + PowerCreateRequestPtr powerCreateRequest; + PowerSetRequestPtr powerSetRequest; HMODULE kernel32 = GetModuleHandle("kernel32.dll"); - PowerCreateRequestPtr powerCreateRequest = - (PowerCreateRequestPtr)GetProcAddress(kernel32, "PowerCreateRequest"); - PowerSetRequestPtr powerSetRequest = - (PowerSetRequestPtr)GetProcAddress(kernel32, "PowerSetRequest"); - if (powerCreateRequest && powerSetRequest) + if (kernel32) { - POWER_REQUEST_CONTEXT RequestContext; - HANDLE Request; + powerCreateRequest = + (PowerCreateRequestPtr)GetProcAddress( + kernel32, "PowerCreateRequest"); + powerSetRequest = + (PowerSetRequestPtr)GetProcAddress( + kernel32, "PowerSetRequest"); - RequestContext.Version = - POWER_REQUEST_CONTEXT_VERSION; - RequestContext.Flags = - POWER_REQUEST_CONTEXT_SIMPLE_STRING; - RequestContext.Reason.SimpleReasonString = (LPWSTR) - L"RetroArch running"; + if (powerCreateRequest && powerSetRequest) + { + POWER_REQUEST_CONTEXT RequestContext; + HANDLE Request; - Request = - powerCreateRequest(&RequestContext); + RequestContext.Version = + POWER_REQUEST_CONTEXT_VERSION; + RequestContext.Flags = + POWER_REQUEST_CONTEXT_SIMPLE_STRING; + RequestContext.Reason.SimpleReasonString = (LPWSTR) + L"RetroArch running"; - powerSetRequest( Request, PowerRequestDisplayRequired); - return true; + Request = + powerCreateRequest(&RequestContext); + + powerSetRequest( Request, PowerRequestDisplayRequired); + return true; + } } #endif } @@ -1335,7 +1345,6 @@ bool win32_set_video_mode(void *data, &mon_rect, width, height, fullscreen)) return false; - win32_set_window(&width, &height, fullscreen, windowed_full, &rect); @@ -1515,10 +1524,8 @@ float win32_get_refresh_rate(void *data) &TopologyID); if (result == ERROR_SUCCESS && NumPathArrayElements >= 1) - { refresh_rate = (float) PathInfoArray[0].targetInfo.refreshRate.Numerator / PathInfoArray[0].targetInfo.refreshRate.Denominator; - } free(ModeInfoArray); free(PathInfoArray); diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 6007a9b794..96693dd1ee 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -55,7 +55,6 @@ #define MOVERESIZE_X_SHIFT 8 #define MOVERESIZE_Y_SHIFT 9 - static XF86VidModeModeInfo desktop_mode; static bool xdg_screensaver_available = true; bool g_x11_entered = false; @@ -806,4 +805,3 @@ char *x11_get_wm_name(Display *dpy) return title; } - diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index 3aa8117075..06cd512cd8 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -82,4 +82,3 @@ char *x11_get_wm_name(Display *dpy); bool x11_has_net_wm_fullscreen(Display *dpy); #endif - diff --git a/gfx/common/xinerama_common.h b/gfx/common/xinerama_common.h index 3a7e00e4cf..84e2090859 100644 --- a/gfx/common/xinerama_common.h +++ b/gfx/common/xinerama_common.h @@ -30,4 +30,3 @@ unsigned xinerama_get_monitor(Display *dpy, int x, int y, int w, int h); #endif - diff --git a/gfx/display_servers/dispserv_null.c b/gfx/display_servers/dispserv_null.c index 8e17292762..dae4c3abde 100644 --- a/gfx/display_servers/dispserv_null.c +++ b/gfx/display_servers/dispserv_null.c @@ -54,4 +54,3 @@ const video_display_server_t dispserv_null = { NULL, /* get_output_options */ "null" }; - diff --git a/gfx/display_servers/dispserv_win32.c b/gfx/display_servers/dispserv_win32.c index 0a1a4513b0..a19b469ab8 100644 --- a/gfx/display_servers/dispserv_win32.c +++ b/gfx/display_servers/dispserv_win32.c @@ -44,6 +44,7 @@ static ITaskbarList3 *g_taskbarList = NULL; /* MSVC really doesn't want CINTERFACE to be used with shobjidl for some reason, but since we use C++ mode, * we need a workaround... so use the names of the COBJMACROS functions instead. */ #if defined(__cplusplus) && !defined(CINTERFACE) +#define ITaskbarList3_HrInit(x) g_taskbarList->HrInit() #define ITaskbarList3_Release(x) g_taskbarList->Release() #define ITaskbarList3_SetProgressState(a, b, c) g_taskbarList->SetProgressState(b, c) #define ITaskbarList3_SetProgressValue(a, b, c, d) g_taskbarList->SetProgressValue(b, c, d) @@ -82,12 +83,6 @@ static void* win32_display_server_init(void) return NULL; #ifdef HAS_TASKBAR_EXT - if (FAILED(CoInitialize(NULL))) - { - RARCH_ERR("COM initialization failed, ITaskbarList3 disabled\n"); - return dispserv; - } - #ifdef __cplusplus /* When compiling in C++ mode, GUIDs are references instead of pointers */ hr = CoCreateInstance(CLSID_TaskbarList, NULL, @@ -98,11 +93,17 @@ static void* win32_display_server_init(void) CLSCTX_INPROC_SERVER, &IID_ITaskbarList3, (void**)&g_taskbarList); #endif - if (!SUCCEEDED(hr)) + if (SUCCEEDED(hr)) + { + hr = ITaskbarList3_HrInit(g_taskbarList); + + if (!SUCCEEDED(hr)) + RARCH_ERR("[dispserv]: HrInit of ITaskbarList3 failed.\n"); + } + else { g_taskbarList = NULL; RARCH_ERR("[dispserv]: CoCreateInstance of ITaskbarList3 failed.\n"); - CoUninitialize(); } #endif @@ -118,11 +119,10 @@ static void win32_display_server_destroy(void *data) win32_orig_refresh, (float)win32_orig_refresh, crt_center ); #ifdef HAS_TASKBAR_EXT - if (g_taskbarList && win32_taskbar_is_created()) + if (g_taskbarList) { ITaskbarList3_Release(g_taskbarList); g_taskbarList = NULL; - CoUninitialize(); } #endif diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 4857e09dd7..ee59e53baf 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -128,7 +128,6 @@ static INLINE void ctr_set_screen_coords(ctr_video_t * ctr) } } - static void ctr_update_viewport(ctr_video_t* ctr, video_frame_info_t *video_info) { int x = 0; @@ -203,7 +202,6 @@ static void ctr_update_viewport(ctr_video_t* ctr, video_frame_info_t *video_info } - static void ctr_lcd_aptHook(APT_HookType hook, void* param) { ctr_video_t *ctr = (ctr_video_t*)param; @@ -534,7 +532,6 @@ static bool ctr_frame(void* data, const void* frame, ctr_set_bottom_screen_enable(ctr, !ctr_bottom_screen_enabled); } - if (ctr->p3d_event_pending) { gspWaitForEvent(GSPGPU_EVENT_P3D, false); @@ -576,7 +573,6 @@ static bool ctr_frame(void* data, const void* frame, frames = 0; } - #ifdef CTR_INSPECT_MEMORY_USAGE uint32_t ctr_get_stack_usage(void); void ctr_linear_get_stats(void); @@ -821,7 +817,6 @@ static bool ctr_frame(void* data, const void* frame, CTRGU_RGBA8, gfxTopLeftFramebuffers[ctr->current_buffer_top], 240,CTRGU_RGB8, CTRGU_MULTISAMPLE_NONE); - if ((ctr->video_mode == CTR_VIDEO_MODE_400x240) || (ctr->video_mode == CTR_VIDEO_MODE_3D)) ctrGuDisplayTransfer(true, ctr->drawbuffers.top.right, 240, @@ -829,7 +824,6 @@ static bool ctr_frame(void* data, const void* frame, CTRGU_RGBA8, gfxTopRightFramebuffers[ctr->current_buffer_top], 240,CTRGU_RGB8, CTRGU_MULTISAMPLE_NONE); - /* Swap buffers : */ topFramebufferInfo. @@ -852,7 +846,6 @@ static bool ctr_frame(void* data, const void* frame, framebuf_widthbytesize = 240 * 3; } - topFramebufferInfo.format = (1<<8)|(1<<5)|GSP_BGR8_OES; topFramebufferInfo. framebuf_dispselect = ctr->current_buffer_top; @@ -979,7 +972,6 @@ static void ctr_set_texture_enable(void* data, bool state, bool full_screen) ctr->menu_texture_enable = state; } - static void ctr_set_rotation(void* data, unsigned rotation) { ctr_video_t* ctr = (ctr_video_t*)data; @@ -1069,7 +1061,6 @@ static uintptr_t ctr_load_texture(void *video_data, void *data, texture->data = linearAlloc(texture->width * texture->height * sizeof(uint32_t)); texture->type = filter_type; - if (!texture->data) { free(texture); @@ -1108,7 +1099,6 @@ static uintptr_t ctr_load_texture(void *video_data, void *data, src++; } - GSPGPU_FlushDataCache(tmpdata, image->width * image->height * sizeof(uint32_t)); ctrGuCopyImage(true, tmpdata, image->width, image->height, CTRGU_RGBA8, false, texture->data, texture->width, CTRGU_RGBA8, true); diff --git a/gfx/drivers/ctr_gu.h b/gfx/drivers/ctr_gu.h index 01f6dd1d49..0307604ddd 100644 --- a/gfx/drivers/ctr_gu.h +++ b/gfx/drivers/ctr_gu.h @@ -65,7 +65,6 @@ static INLINE Result ctr_set_parallax_layer(bool state) return GSPGPU_WriteHWRegs(0x202000, ®_state, 4); } - __attribute__((always_inline)) static INLINE void ctrGuSetTexture(GPU_TEXUNIT unit, u32* data, u16 width, u16 height, u32 param, GPU_TEXCOLOR colorType) @@ -198,7 +197,6 @@ static INLINE void ctrGuSetVertexShaderFloatUniform(int id, float* data, int cou GPUCMD_AddWrites(GPUREG_VSH_FLOATUNIFORM_DATA, (u32*)data, (u32)count * 4); } - #define CTRGU_ATTRIBFMT(f, n) ((((n)-1)<<2)|((f)&3)) __attribute__((always_inline)) @@ -243,7 +241,6 @@ static INLINE int ctrgu_swizzle_coords(int x, int y, int width) int pos = (x & 0x1) << 0 | ((x & 0x2) << 1) | ((x & 0x4) << 2) | (y & 0x1) << 1 | ((y & 0x2) << 2) | ((y & 0x4) << 3); - return ((x >> 3) << 6) + ((y >> 3) * ((width >> 3) << 6)) + pos; } diff --git a/gfx/drivers/d3d10.c b/gfx/drivers/d3d10.c index d5c2b7458f..b5dc33d0e3 100644 --- a/gfx/drivers/d3d10.c +++ b/gfx/drivers/d3d10.c @@ -217,7 +217,6 @@ static void d3d10_set_filtering(void* data, unsigned index, bool smooth) } } - static void d3d10_gfx_set_rotation(void* data, unsigned rotation) { math_matrix_4x4 rot; @@ -1203,8 +1202,6 @@ static bool d3d10_gfx_frame( if (d3d10->shader_preset) { - unsigned i; - for (i = 0; i < d3d10->shader_preset->passes; i++) { if (d3d10->shader_preset->pass[i].feedback) @@ -1234,14 +1231,17 @@ static bool d3d10_gfx_frame( if (buffer_sem->stage_mask && buffer_sem->uniforms) { - void* data; + void* uniform_data = NULL; uniform_sem_t* uniform = buffer_sem->uniforms; - D3D10MapBuffer(buffer, D3D10_MAP_WRITE_DISCARD, 0, (void**)&data); + D3D10MapBuffer(buffer, D3D10_MAP_WRITE_DISCARD, + 0, (void**)&uniform_data); + while (uniform->size) { if (uniform->data) - memcpy((uint8_t*)data + uniform->offset, uniform->data, uniform->size); + memcpy((uint8_t*)uniform_data + uniform->offset, + uniform->data, uniform->size); uniform++; } D3D10UnmapBuffer(buffer); diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index d740e32797..6e0850b712 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -50,7 +50,6 @@ static D3D11Device cached_device_d3d11; static D3D_FEATURE_LEVEL cached_supportedFeatureLevel; static D3D11DeviceContext cached_context; - #ifdef HAVE_OVERLAY static void d3d11_free_overlays(d3d11_video_t* d3d11) { @@ -1402,13 +1401,16 @@ static bool d3d11_gfx_frame( d3d11->sprites.enabled = true; +#ifdef HAVE_MENU if (d3d11->menu.enabled) { D3D11SetViewports(context, 1, &d3d11->viewport); D3D11SetVertexBuffer(context, 0, d3d11->sprites.vbo, sizeof(d3d11_sprite_t), 0); menu_driver_frame(video_info); } - else if (video_info->statistics_show) + else +#endif + if (video_info->statistics_show) { struct font_params* osd_params = (struct font_params*)&video_info->osd_stat_params; diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index 9921678ffb..2251a428d4 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -1470,6 +1470,7 @@ static bool d3d12_gfx_frame( d3d12->sprites.enabled = true; +#ifdef HAVE_MENU if (d3d12->menu.enabled) { D3D12RSSetViewports(d3d12->queue.cmd, 1, &d3d12->chain.viewport); @@ -1477,7 +1478,9 @@ static bool d3d12_gfx_frame( D3D12IASetVertexBuffers(d3d12->queue.cmd, 0, 1, &d3d12->sprites.vbo_view); menu_driver_frame(video_info); } - else if (video_info->statistics_show) + else +#endif + if (video_info->statistics_show) { struct font_params *osd_params = (struct font_params*) &video_info->osd_stat_params; diff --git a/gfx/drivers/d3d8.c b/gfx/drivers/d3d8.c index 5eb5080d08..21830cd500 100644 --- a/gfx/drivers/d3d8.c +++ b/gfx/drivers/d3d8.c @@ -166,7 +166,6 @@ static void d3d8_renderchain_set_vertices( vert[0].y = 1.0f; vert[0].z = 1.0f; - vert[1].x = 1.0f; vert[1].y = 1.0f; vert[1].z = 1.0f; @@ -1004,7 +1003,6 @@ static bool d3d8_restore(void *data) return true; } - static void d3d8_set_nonblock_state(void *data, bool state) { int interval = 0; @@ -1592,7 +1590,6 @@ static bool d3d8_frame(void *data, const void *frame, return false; } - #ifdef HAVE_MENU if (d3d->menu && d3d->menu->enabled) { @@ -1733,7 +1730,6 @@ static void d3d8_set_menu_texture_frame(void *data, } } - if (d3d->menu) d3d8_unlock_rectangle(d3d->menu->tex); } diff --git a/gfx/drivers/d3d9.c b/gfx/drivers/d3d9.c index 3638bb3622..2d5af2a9d1 100644 --- a/gfx/drivers/d3d9.c +++ b/gfx/drivers/d3d9.c @@ -1057,7 +1057,6 @@ static bool d3d9_restore(void *data) return true; } - static void d3d9_set_nonblock_state(void *data, bool state) { int interval = 0; @@ -1175,11 +1174,13 @@ static void d3d9_set_osd_msg(void *data, { d3d9_video_t *d3d = (d3d9_video_t*)data; LPDIRECT3DDEVICE9 dev = d3d->dev; + const struct font_params *d3d_font_params = (const + struct font_params*)params; - d3d9_set_font_rect(d3d, params); + d3d9_set_font_rect(d3d, d3d_font_params); d3d9_begin_scene(dev); font_driver_render_msg(video_info, font, - msg, (const struct font_params *)params); + msg, d3d_font_params); d3d9_end_scene(dev); } @@ -1665,7 +1666,6 @@ static bool d3d9_frame(void *data, const void *frame, return false; } - #ifdef HAVE_MENU if (d3d->menu && d3d->menu->enabled) { @@ -1735,14 +1735,14 @@ static bool d3d9_read_viewport(void *data, uint8_t *buffer, bool is_idle) !d3d9_device_create_offscreen_plain_surface(d3dr, width, height, d3d9_get_xrgb8888_format(), D3DPOOL_SYSTEMMEM, (void**)&dest, NULL) || - !d3d9_device_get_render_target_data(d3dr, (void*)target, (void*)dest) + !d3d9_device_get_render_target_data(d3dr, target, dest) ) { ret = false; goto end; } - if (d3d9_surface_lock_rect(dest, (void*)&rect)) + if (d3d9_surface_lock_rect(dest, &rect)) { unsigned x, y; unsigned pitchpix = rect.Pitch / 4; @@ -1762,7 +1762,7 @@ static bool d3d9_read_viewport(void *data, uint8_t *buffer, bool is_idle) } } - d3d9_surface_unlock_rect((void*)dest); + d3d9_surface_unlock_rect(dest); } else ret = false; @@ -1826,12 +1826,14 @@ static void d3d9_set_menu_texture_frame(void *data, (void)height; (void)alpha; + if (!d3d || !d3d->menu) + return; + if ( !d3d->menu->tex || d3d->menu->tex_w != width || d3d->menu->tex_h != height) { - if (d3d->menu) - d3d9_texture_free((LPDIRECT3DTEXTURE9)d3d->menu->tex); + d3d9_texture_free((LPDIRECT3DTEXTURE9)d3d->menu->tex); d3d->menu->tex = d3d9_texture_new(d3d->dev, NULL, width, height, 1, @@ -1889,7 +1891,6 @@ static void d3d9_set_menu_texture_frame(void *data, } } - if (d3d->menu) d3d9_unlock_rectangle((LPDIRECT3DTEXTURE9)d3d->menu->tex); } diff --git a/gfx/drivers/d3d_shaders/simple_snow_sm4.hlsl.h b/gfx/drivers/d3d_shaders/simple_snow_sm4.hlsl.h index ba919266fd..8f3a0ddf95 100644 --- a/gfx/drivers/d3d_shaders/simple_snow_sm4.hlsl.h +++ b/gfx/drivers/d3d_shaders/simple_snow_sm4.hlsl.h @@ -65,7 +65,6 @@ float snow(float2 pos, float time, float scale) return random_dots(pos / scale) * (scale * 0.5 + 0.5); } - float4 PSMain(PSInput input) : SV_TARGET { float tim = global.time * 0.4 * speed; diff --git a/gfx/drivers/d3d_shaders/snow_sm4.hlsl.h b/gfx/drivers/d3d_shaders/snow_sm4.hlsl.h index fd42e1425d..63ff2a1bc3 100644 --- a/gfx/drivers/d3d_shaders/snow_sm4.hlsl.h +++ b/gfx/drivers/d3d_shaders/snow_sm4.hlsl.h @@ -65,7 +65,6 @@ float snow(float2 pos, float time, float scale) return random_dots(pos / scale) * (scale * 0.5 + 0.5); } - float4 PSMain(PSInput input) : SV_TARGET { float tim = global.time * 0.4 * speed; diff --git a/gfx/drivers/d3d_shaders/snowflake_sm4.hlsl.h b/gfx/drivers/d3d_shaders/snowflake_sm4.hlsl.h index c02908e442..4be16e0b29 100644 --- a/gfx/drivers/d3d_shaders/snowflake_sm4.hlsl.h +++ b/gfx/drivers/d3d_shaders/snowflake_sm4.hlsl.h @@ -14,7 +14,6 @@ float4 VSMain(float4 position : POSITION, float2 texcoord : TEXCOORD0) : SV_POSI return mul(global.modelViewProj, position); } - static const float atime = (global.time + 1.0) / 4.0; float rand(float2 co) diff --git a/gfx/drivers/d3d_shaders/sprite_sm4.hlsl.h b/gfx/drivers/d3d_shaders/sprite_sm4.hlsl.h index 1a5feefbe7..c8e252462e 100644 --- a/gfx/drivers/d3d_shaders/sprite_sm4.hlsl.h +++ b/gfx/drivers/d3d_shaders/sprite_sm4.hlsl.h @@ -83,5 +83,4 @@ SRC( return float4(input.color.rgb , input.color.a * t0.Sample(s0, input.texcoord).a); }; - ) diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index cd43998614..acb26144a1 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -336,8 +336,6 @@ static void drm_surface_update(void *data, const void *frame, drm_page_flip(surface); } - - static uint32_t get_plane_prop_id(uint32_t obj_id, const char *name) { int i,j; @@ -626,7 +624,6 @@ static bool init_drm(void) else RARCH_LOG ("DRM: UNIVERSAL PLANES cap set\n"); - ret = drmSetClientCap(drm.fd, DRM_CLIENT_CAP_ATOMIC, 1); if (ret) { @@ -706,7 +703,6 @@ static bool init_drm(void) return true; } - static void *drm_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) { diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 2ce72de395..6e954bb5c6 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -88,7 +88,6 @@ static const struct exynos_config_default {400, 240, EXYNOS_BUFFER_AUX, G2D_COLOR_FMT_ARGB4444 | G2D_ORDER_RGBAX, 2} /* menu */ }; - struct exynos_data; #if (EXYNOS_GFX_DEBUG_PERF == 1) @@ -1043,7 +1042,6 @@ struct exynos_video bool aspect_changed; }; - static int exynos_init_font(struct exynos_video *vid) { struct exynos_data *pdata = vid->data; diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index b2c438961b..034a6db400 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -90,6 +90,9 @@ static void *gdi_gfx_init(const video_info_t *video, settings_t *settings = config_get_ptr(); gdi_t *gdi = (gdi_t*)calloc(1, sizeof(*gdi)); + if (!gdi) + return NULL; + *input = NULL; *input_data = NULL; @@ -115,7 +118,8 @@ static void *gdi_gfx_init(const video_info_t *video, if (ctx_data) gdi->ctx_data = ctx_data; - gdi->ctx_driver = ctx_driver; + gdi->ctx_driver = ctx_driver; + video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); RARCH_LOG("[GDI]: Found GDI context: %s\n", ctx_driver->ident); @@ -189,6 +193,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { + BITMAPINFO *info; gfx_ctx_mode_t mode; const void *frame_to_copy = frame; unsigned width = 0; @@ -197,10 +202,9 @@ static bool gdi_gfx_frame(void *data, const void *frame, bool draw = true; gdi_t *gdi = (gdi_t*)data; HWND hwnd = win32_get_window(); - BITMAPINFO *info; /* FIXME: Force these settings off as they interfere with the rendering */ - video_info->xmb_shadows_enable = false; + video_info->xmb_shadows_enable = false; video_info->menu_shader_pipeline = 0; if (!frame || !frame_width || !frame_height) @@ -210,13 +214,15 @@ static bool gdi_gfx_frame(void *data, const void *frame, menu_driver_frame(video_info); #endif - if (gdi_video_width != frame_width || gdi_video_height != frame_height || gdi_video_pitch != pitch) + if ( gdi_video_width != frame_width || + gdi_video_height != frame_height || + gdi_video_pitch != pitch) { if (frame_width > 4 && frame_height > 4) { - gdi_video_width = frame_width; + gdi_video_width = frame_width; gdi_video_height = frame_height; - gdi_video_pitch = pitch; + gdi_video_pitch = pitch; } } @@ -234,7 +240,10 @@ static bool gdi_gfx_frame(void *data, const void *frame, height = gdi_video_height; pitch = gdi_video_pitch; - if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) + if ( frame_width == 4 && + frame_height == 4 && + (frame_width < width && frame_height < height) + ) draw = false; if (video_info->menu_is_alive) @@ -243,11 +252,12 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (hwnd && !gdi->winDC) { - gdi->winDC = GetDC(hwnd); - gdi->memDC = CreateCompatibleDC(gdi->winDC); - gdi->video_width = width; + gdi->winDC = GetDC(hwnd); + gdi->memDC = CreateCompatibleDC(gdi->winDC); + gdi->video_width = width; gdi->video_height = height; - gdi->bmp = CreateCompatibleBitmap(gdi->winDC, gdi->video_width, gdi->video_height); + gdi->bmp = CreateCompatibleBitmap( + gdi->winDC, gdi->video_width, gdi->video_height); } gdi->bmp_old = (HBITMAP)SelectObject(gdi->memDC, gdi->bmp); @@ -257,28 +267,34 @@ static bool gdi_gfx_frame(void *data, const void *frame, SelectObject(gdi->memDC, gdi->bmp_old); DeleteObject(gdi->bmp); - gdi->video_width = width; + gdi->video_width = width; gdi->video_height = height; - gdi->bmp = CreateCompatibleBitmap(gdi->winDC, gdi->video_width, gdi->video_height); - gdi->bmp_old = (HBITMAP)SelectObject(gdi->memDC, gdi->bmp); + gdi->bmp = CreateCompatibleBitmap( + gdi->winDC, gdi->video_width, gdi->video_height); + gdi->bmp_old = (HBITMAP)SelectObject(gdi->memDC, gdi->bmp); if (gdi_lte_win98) { - if (gdi_temp_buf) - { - free(gdi_temp_buf); - } + unsigned short *tmp = NULL; - gdi_temp_buf = (unsigned short*)malloc(width * height * sizeof(unsigned short)); + if (gdi_temp_buf) + free(gdi_temp_buf); + + tmp = (unsigned short*)malloc(width * height + * sizeof(unsigned short)); + + if (tmp) + gdi_temp_buf = tmp; } } video_context_driver_get_video_size(&mode); - gdi->screen_width = mode.width; - gdi->screen_height = mode.height; + gdi->screen_width = mode.width; + gdi->screen_height = mode.height; - info = (BITMAPINFO*)calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); + info = (BITMAPINFO*) + calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); info->bmiHeader.biBitCount = bits; info->bmiHeader.biWidth = pitch / (bits / 8); @@ -334,10 +350,8 @@ static bool gdi_gfx_frame(void *data, const void *frame, info->bmiHeader.biCompression = BI_RGB; if (draw) - { StretchDIBits(gdi->memDC, 0, 0, width, height, 0, 0, width, height, frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); - } SelectObject(gdi->memDC, gdi->bmp_old); @@ -495,9 +509,19 @@ static void gdi_set_texture_frame(void *data, gdi_menu_frame = NULL; } - if (!gdi_menu_frame || gdi_menu_width != width || gdi_menu_height != height || gdi_menu_pitch != pitch) + if ( !gdi_menu_frame || + gdi_menu_width != width || + gdi_menu_height != height || + gdi_menu_pitch != pitch) + { if (pitch && height) - gdi_menu_frame = (unsigned char*)malloc(pitch * height); + { + unsigned char *tmp = (unsigned char*)malloc(pitch * height); + + if (tmp) + gdi_menu_frame = tmp; + } + } if (gdi_menu_frame && frame && pitch && height) { @@ -514,7 +538,8 @@ static void gdi_set_osd_msg(void *data, const char *msg, const void *params, void *font) { - font_driver_render_msg(video_info, font, msg, (const struct font_params *)params); + font_driver_render_msg(video_info, font, + msg, (const struct font_params *)params); } static void gdi_get_video_output_size(void *data, @@ -551,21 +576,27 @@ static void gdi_set_video_mode(void *data, unsigned width, unsigned height, static uintptr_t gdi_load_texture(void *video_data, void *data, bool threaded, enum texture_filter_type filter_type) { + void *tmpdata = NULL; + gdi_texture_t *texture = NULL; struct texture_image *image = (struct texture_image*)data; - int size = image->width * image->height * sizeof(uint32_t); - gdi_texture_t *texture = NULL; - void *tmpdata = NULL; + int size = image->width * + image->height * sizeof(uint32_t); if (!image || image->width > 2048 || image->height > 2048) return 0; - texture = calloc(1, sizeof(*texture)); - texture->width = image->width; - texture->height = image->height; - texture->active_width = image->width; - texture->active_height = image->height; - texture->data = calloc(1, texture->width * texture->height * sizeof(uint32_t)); - texture->type = filter_type; + texture = (gdi_texture_t*)calloc(1, sizeof(*texture)); + + if (!texture) + return 0; + + texture->width = image->width; + texture->height = image->height; + texture->active_width = image->width; + texture->active_height = image->height; + texture->data = calloc(1, + texture->width * texture->height * sizeof(uint32_t)); + texture->type = filter_type; if (!texture->data) { @@ -573,7 +604,8 @@ static uintptr_t gdi_load_texture(void *video_data, void *data, return 0; } - memcpy(texture->data, image->pixels, texture->width * texture->height * sizeof(uint32_t)); + memcpy(texture->data, image->pixels, + texture->width * texture->height * sizeof(uint32_t)); return (uintptr_t)texture; } diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index d62bd67cf4..b7d2f25da8 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -128,7 +128,6 @@ void context_bind_hw_render(void *data, bool enable) gl_context_bind_hw_render(gl, enable); } - #ifdef HAVE_OVERLAY static void gl_free_overlay(gl_t *gl) { @@ -247,7 +246,6 @@ static void gl_render_overlay(gl_t *gl, video_frame_info_t *video_info) } #endif - static void gl_set_projection(gl_t *gl, struct video_ortho *ortho, bool allow_rotate) { @@ -369,10 +367,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate) { video_frame_info_t video_info; + gl_t *gl = (gl_t*)data; video_driver_build_info(&video_info); - gl_set_viewport(data, &video_info, + gl_set_viewport(gl, &video_info, viewport_width, viewport_height, force_full, allow_rotate); } @@ -688,7 +687,6 @@ static void gl_set_texture_frame(void *data, if (!gl->menu_texture) glGenTextures(1, &gl->menu_texture); - gl_load_texture_data(gl->menu_texture, RARCH_WRAP_EDGE, menu_filter, video_pixel_get_alignment(width * base_size), @@ -940,7 +938,6 @@ static void gl_pbo_async_readback(gl_t *gl) gl->renderchain_driver->unbind_pbo(gl, gl->renderchain_data); } - static bool gl_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, @@ -1234,7 +1231,6 @@ static bool gl_frame(void *data, const void *frame, return true; } - static void gl_destroy_resources(gl_t *gl) { if (gl) @@ -2357,8 +2353,6 @@ static bool gl_overlay_load(void *data, return true; } - - static void gl_overlay_enable(void *data, bool state) { gl_t *gl = (gl_t*)data; @@ -2395,7 +2389,6 @@ static void gl_overlay_set_alpha(void *data, unsigned image, float mod) color[12 + 3] = mod; } - static const video_overlay_interface_t gl_overlay_interface = { gl_overlay_enable, gl_overlay_load, @@ -2413,7 +2406,6 @@ static void gl_get_overlay_interface(void *data, } #endif - static retro_proc_address_t gl_get_proc_address(void *data, const char *sym) { gfx_ctx_proc_address_t proc_address; @@ -2458,7 +2450,6 @@ static void gl_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) gl->should_resize = true; } - static void gl_apply_state_changes(void *data) { gl_t *gl = (gl_t*)data; @@ -2467,7 +2458,6 @@ static void gl_apply_state_changes(void *data) gl->should_resize = true; } - static void gl_get_video_output_size(void *data, unsigned *width, unsigned *height) { diff --git a/gfx/drivers/gx2_gfx.c b/gfx/drivers/gx2_gfx.c index cd34fb8760..bed3e8de8e 100644 --- a/gfx/drivers/gx2_gfx.c +++ b/gfx/drivers/gx2_gfx.c @@ -43,7 +43,6 @@ #include "../font_driver.h" - static const wiiu_render_mode_t wiiu_render_mode_map[] = { {0}, /* GX2_TV_SCAN_MODE_NONE */ @@ -484,7 +483,6 @@ static void gx2_overlay_vertex_geom(void *data, unsigned image, wiiu_video_t *gx2 = (wiiu_video_t *)data; struct gx2_overlay_data *o = NULL; - if (gx2) o = (struct gx2_overlay_data *)&gx2->overlay[image]; @@ -668,7 +666,6 @@ static void wiiu_gfx_free(void *data) if (!wiiu) return; - /* clear leftover image */ GX2ClearColor(&wiiu->color_buffer, 0.0f, 0.0f, 0.0f, 1.0f); GX2CopyColorBufferToScanBuffer(&wiiu->color_buffer, GX2_SCAN_TARGET_DRC); @@ -817,8 +814,6 @@ static bool wiiu_init_frame_textures(wiiu_video_t *wiiu, unsigned width, unsigne if (!height) height = wiiu->color_buffer.surface.height; - - memset(&wiiu->pass[i].texture, 0, sizeof(wiiu->pass[i].texture)); wiiu->pass[i].texture.surface.dim = GX2_SURFACE_DIM_TEXTURE_2D; wiiu->pass[i].texture.surface.width = width; @@ -837,7 +832,6 @@ static bool wiiu_init_frame_textures(wiiu_video_t *wiiu, unsigned width, unsigne GX2CalcSurfaceSizeAndAlignment(&wiiu->pass[i].texture.surface); GX2InitTextureRegs(&wiiu->pass[i].texture); - if ((i != (wiiu->shader_preset->passes - 1)) || (width != wiiu->vp.width) || (height != wiiu->vp.height)) { @@ -1001,7 +995,6 @@ static void wiiu_gfx_update_uniform_block(wiiu_video_t *wiiu, int pass, float *u continue; } - for (int k = 0; k < wiiu->shader_preset->num_parameters; k++) { if (string_is_equal(id, wiiu->shader_preset->parameters[k].id)) @@ -1128,7 +1121,6 @@ static bool wiiu_gfx_frame(void *data, const void *frame, } } - GX2Invalidate(GX2_INVALIDATE_MODE_CPU_TEXTURE, wiiu->texture.surface.image, wiiu->texture.surface.imageSize); @@ -1240,8 +1232,6 @@ static bool wiiu_gfx_frame(void *data, const void *frame, continue; } - - for (int k = 0; k < wiiu->shader_preset->luts; k++) { if (wiiu->luts[k].surface.image @@ -1528,7 +1518,6 @@ static bool wiiu_gfx_set_shader(void *data, } } - return true; } @@ -1543,7 +1532,6 @@ static struct video_shader *wiiu_gfx_get_current_shader(void *data) return wiiu->shader_preset; } - static void wiiu_gfx_set_rotation(void *data, unsigned rotation) { @@ -1626,7 +1614,6 @@ static void wiiu_gfx_set_filtering(void *data, unsigned index, bool smooth) wiiu->smooth = smooth; } - static void wiiu_gfx_apply_state_changes(void *data) { wiiu_video_t *wiiu = (wiiu_video_t *)data; diff --git a/gfx/drivers/gx2_shaders/bokeh.c b/gfx/drivers/gx2_shaders/bokeh.c index 5790f4d688..6ce7c43ff9 100644 --- a/gfx/drivers/gx2_shaders/bokeh.c +++ b/gfx/drivers/gx2_shaders/bokeh.c @@ -62,7 +62,6 @@ static struct }, }; - __attribute__((aligned(GX2_SHADER_ALIGNMENT))) static struct { @@ -739,7 +738,6 @@ static GX2UniformVar uniform_vars[] = { {"global.time", GX2_SHADER_VAR_TYPE_FLOAT, 1, 20, 0}, }; - GX2Shader bokeh_shader = { { diff --git a/gfx/drivers/gx2_shaders/bokeh.frag b/gfx/drivers/gx2_shaders/bokeh.frag index 8ca96ef8eb..29a8d48116 100644 --- a/gfx/drivers/gx2_shaders/bokeh.frag +++ b/gfx/drivers/gx2_shaders/bokeh.frag @@ -34,5 +34,3 @@ for( int i=0; i < 6; i++ ) color *= sqrt(1.5 - 0.5 * length(uv)); FragColor = vec4(color.r, color.g, color.b , 0.5); } - - diff --git a/gfx/drivers/gx2_shaders/frame.c b/gfx/drivers/gx2_shaders/frame.c index b82fe5033c..9bc5976a62 100644 --- a/gfx/drivers/gx2_shaders/frame.c +++ b/gfx/drivers/gx2_shaders/frame.c @@ -105,7 +105,6 @@ static GX2UniformVar uniform_vars[] = { {"global.MVP", GX2_SHADER_VAR_TYPE_MATRIX4X4, 1, 0, 0}, }; - GX2Shader frame_shader = { { diff --git a/gfx/drivers/gx2_shaders/menu_shaders.h b/gfx/drivers/gx2_shaders/menu_shaders.h index e3bd531e57..aab4aeda46 100644 --- a/gfx/drivers/gx2_shaders/menu_shaders.h +++ b/gfx/drivers/gx2_shaders/menu_shaders.h @@ -30,7 +30,6 @@ __attribute__((aligned (16))) float time; }menu_shader_uniform_t; - extern GX2Shader ribbon_shader; extern GX2Shader ribbon_simple_shader; extern GX2Shader snow_simple_shader; diff --git a/gfx/drivers/gx2_shaders/ribbon.c b/gfx/drivers/gx2_shaders/ribbon.c index e65aab8b70..a1207401a1 100644 --- a/gfx/drivers/gx2_shaders/ribbon.c +++ b/gfx/drivers/gx2_shaders/ribbon.c @@ -331,7 +331,6 @@ static GX2UniformVar uniform_vars[] = { {"constants.time", GX2_SHADER_VAR_TYPE_FLOAT, 1, 0, 0}, }; - GX2Shader ribbon_shader = { { diff --git a/gfx/drivers/gx2_shaders/ribbon_simple.c b/gfx/drivers/gx2_shaders/ribbon_simple.c index e5d90f1de7..214f6ab3d2 100644 --- a/gfx/drivers/gx2_shaders/ribbon_simple.c +++ b/gfx/drivers/gx2_shaders/ribbon_simple.c @@ -217,7 +217,6 @@ static GX2UniformVar uniform_vars[] = { {"global.time", GX2_SHADER_VAR_TYPE_FLOAT, 1, 20, 0}, }; - GX2Shader ribbon_simple_shader = { { diff --git a/gfx/drivers/gx2_shaders/snow.c b/gfx/drivers/gx2_shaders/snow.c index f89c76defa..7a4d5915b3 100644 --- a/gfx/drivers/gx2_shaders/snow.c +++ b/gfx/drivers/gx2_shaders/snow.c @@ -62,7 +62,6 @@ static struct }, }; - __attribute__((aligned(GX2_SHADER_ALIGNMENT))) static struct { @@ -1404,7 +1403,6 @@ static GX2UniformVar uniform_vars[] = { {"global.time", GX2_SHADER_VAR_TYPE_FLOAT, 1, 20, 0}, }; - GX2Shader snow_shader = { { diff --git a/gfx/drivers/gx2_shaders/snow.frag b/gfx/drivers/gx2_shaders/snow.frag index 424021a0cd..6eaaa7c023 100644 --- a/gfx/drivers/gx2_shaders/snow.frag +++ b/gfx/drivers/gx2_shaders/snow.frag @@ -71,5 +71,3 @@ void main(void) a = a * min(pos.y * 4.0, 1.0); FragColor = vec4(1.0, 1.0, 1.0, a); } - - diff --git a/gfx/drivers/gx2_shaders/snow_simple.c b/gfx/drivers/gx2_shaders/snow_simple.c index a7dfc1dbc0..7f6715f458 100644 --- a/gfx/drivers/gx2_shaders/snow_simple.c +++ b/gfx/drivers/gx2_shaders/snow_simple.c @@ -1374,7 +1374,6 @@ static struct }, }; - static GX2AttribVar attributes[] = { { "Position", GX2_SHADER_VAR_TYPE_FLOAT4, 0, 0}, @@ -1404,7 +1403,6 @@ static GX2UniformVar uniform_vars[] = { {"global.time", GX2_SHADER_VAR_TYPE_FLOAT, 1, 20, 0}, }; - GX2Shader snow_simple_shader = { { diff --git a/gfx/drivers/gx2_shaders/snow_simple.frag b/gfx/drivers/gx2_shaders/snow_simple.frag index 45a9d06ddd..bfbe386b15 100644 --- a/gfx/drivers/gx2_shaders/snow_simple.frag +++ b/gfx/drivers/gx2_shaders/snow_simple.frag @@ -71,5 +71,3 @@ void main(void) a = a * min(pos.y * 4.0, 1.0); FragColor = vec4(1.0, 1.0, 1.0, a); } - - diff --git a/gfx/drivers/gx2_shaders/snowflake.c b/gfx/drivers/gx2_shaders/snowflake.c index 6312e625ce..b01bbcf1e6 100644 --- a/gfx/drivers/gx2_shaders/snowflake.c +++ b/gfx/drivers/gx2_shaders/snowflake.c @@ -20,7 +20,6 @@ #include "gx2_shader_inl.h" #include "menu_shaders.h" - __attribute__((aligned(GX2_SHADER_ALIGNMENT))) static struct { @@ -555,7 +554,6 @@ static struct }, }; - static GX2AttribVar attributes[] = { { "Position", GX2_SHADER_VAR_TYPE_FLOAT4, 0, 0}, @@ -585,7 +583,6 @@ static GX2UniformVar uniform_vars[] = { {"global.time", GX2_SHADER_VAR_TYPE_FLOAT, 1, 20, 0}, }; - GX2Shader snowflake_shader = { { diff --git a/gfx/drivers/gx2_shaders/snowflake.frag b/gfx/drivers/gx2_shaders/snowflake.frag index 3cbcecf8c0..a3934e4f24 100644 --- a/gfx/drivers/gx2_shaders/snowflake.frag +++ b/gfx/drivers/gx2_shaders/snowflake.frag @@ -73,4 +73,3 @@ void main(void) FragColor = vec4(col(p)); } - diff --git a/gfx/drivers/gx2_shaders/sprite.c b/gfx/drivers/gx2_shaders/sprite.c index 9cb406d272..9cc25bd6c1 100644 --- a/gfx/drivers/gx2_shaders/sprite.c +++ b/gfx/drivers/gx2_shaders/sprite.c @@ -223,7 +223,6 @@ static GX2UniformBlock uniform_blocks[] = {"UBO_tex", 2, sizeof(GX2_vec2)}, }; - static GX2UniformVar uniform_vars[] = { {"vp_size", GX2_SHADER_VAR_TYPE_FLOAT2, 1, 0, 0}, diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index 788cb46a64..25c615e246 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1540,7 +1540,6 @@ static bool gx_frame(void *data, const void *frame, g_draw_done = false; g_current_framebuf ^= 1; - if (frame) { if (gx->rgb32) diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index 5b4fcd0d70..992472eaa2 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -90,7 +90,6 @@ typedef struct omapfb_data bool sync; } omapfb_data_t; - static const char *omapfb_get_fb_device(void) { static char fbname[12] = {0}; @@ -786,7 +785,6 @@ static void omapfb_blit_frame(omapfb_data_t *pdata, const void *src, memcpy(dst + dst_pitch * i, src + src_pitch * i, dst_pitch); } - typedef struct omap_video { omapfb_data_t *omap; @@ -809,7 +807,6 @@ typedef struct omap_video } menu; } omap_video_t; - static void omap_gfx_free(void *data) { omap_video_t *vid = data; diff --git a/gfx/drivers/ps2_gfx.c b/gfx/drivers/ps2_gfx.c index 39a9053793..5971c53676 100644 --- a/gfx/drivers/ps2_gfx.c +++ b/gfx/drivers/ps2_gfx.c @@ -21,153 +21,140 @@ #include #include #include +#include "../../libretro-common/include/libretro_gskit_ps2.h" #define GS_TEXT GS_SETREG_RGBAQ(0x80,0x80,0x80,0x80,0x00) // turn white GS Screen #define GS_BLACK GS_SETREG_RGBAQ(0x00,0x00,0x00,0x00,0x00) // turn white GS Screen +#define NTSC_WIDTH 640 +#define NTSC_HEIGHT 448 + typedef struct ps2_video { GSGLOBAL *gsGlobal; GSTEXTURE *menuTexture; GSTEXTURE *coreTexture; + bool clearVRAM; + struct retro_hw_render_interface_gskit_ps2 iface; /* Palette in the cores */ bool menuVisible; bool fullscreen; - bool rgb32; + bool vsync; + + int PSM; bool force_aspect; int menu_filter; int core_filter; } ps2_video_t; // PRIVATE METHODS -static GSGLOBAL *init_GSGlobal(void) { - GSGLOBAL *gsGlobal = gsKit_init_global(); +static GSGLOBAL *init_GSGlobal(void) +{ + GSGLOBAL *gsGlobal = gsKit_init_global(); - gsGlobal->PSM = GS_PSM_CT16; - gsGlobal->PSMZ = GS_PSMZ_16; - gsGlobal->DoubleBuffering = GS_SETTING_OFF; - gsGlobal->ZBuffering = GS_SETTING_OFF; - gsGlobal->PrimAlphaEnable = GS_SETTING_OFF; + gsGlobal->Mode = GS_MODE_NTSC; + gsGlobal->Interlace = GS_INTERLACED; + gsGlobal->Field = GS_FIELD; + gsGlobal->Width = NTSC_WIDTH; + gsGlobal->Height = NTSC_HEIGHT; + + gsGlobal->PSM = GS_PSM_CT16; + gsGlobal->PSMZ = GS_PSMZ_16; + gsGlobal->DoubleBuffering = GS_SETTING_OFF; + gsGlobal->ZBuffering = GS_SETTING_OFF; + gsGlobal->PrimAlphaEnable = GS_SETTING_OFF; - dmaKit_init(D_CTRL_RELE_OFF,D_CTRL_MFD_OFF, D_CTRL_STS_UNSPEC, - D_CTRL_STD_OFF, D_CTRL_RCYC_8, 1 << DMA_CHANNEL_GIF); + dmaKit_init(D_CTRL_RELE_OFF,D_CTRL_MFD_OFF, D_CTRL_STS_UNSPEC, + D_CTRL_STD_OFF, D_CTRL_RCYC_8, 1 << DMA_CHANNEL_GIF); - // Initialize the DMAC - dmaKit_chan_init(DMA_CHANNEL_GIF); + /* Initialize the DMAC */ + dmaKit_chan_init(DMA_CHANNEL_GIF); - gsKit_init_screen(gsGlobal); - gsKit_mode_switch(gsGlobal, GS_ONESHOT); + gsKit_init_screen(gsGlobal); + gsKit_mode_switch(gsGlobal, GS_ONESHOT); + gsKit_clear(gsGlobal, GS_BLACK); - gsKit_clear(gsGlobal, GS_BLACK); - - return gsGlobal; + return gsGlobal; } -static GSTEXTURE * prepare_new_texture(void) { - GSTEXTURE *texture = calloc(1, sizeof(*texture)); - return texture; +static GSTEXTURE * prepare_new_texture(void) +{ + GSTEXTURE *texture = calloc(1, sizeof(*texture)); + return texture; } -static void init_ps2_video(ps2_video_t *ps2) { +static void init_ps2_video(ps2_video_t *ps2) +{ ps2->gsGlobal = init_GSGlobal(); ps2->menuTexture = prepare_new_texture(); ps2->coreTexture = prepare_new_texture(); + + /* Used for cores that supports palette */ + ps2->iface.interface_type = RETRO_HW_RENDER_INTERFACE_GSKIT_PS2; + ps2->iface.interface_version = RETRO_HW_RENDER_INTERFACE_GSKIT_PS2_VERSION; + ps2->iface.coreTexture = ps2->coreTexture; } -static void deinitTexture(GSTEXTURE *texture) { +static void deinitTexture(GSTEXTURE *texture) +{ free(texture->Mem); free(texture->Clut); texture->Mem = NULL; texture->Clut = NULL; } -static void color_correction32(uint32_t *buffer, uint32_t dimensions) +static bool texture_need_prepare(GSTEXTURE *texture, int width, int height, int PSM) { - uint32_t i; - uint32_t x32; - for (i = 0; i < dimensions; i++) { - x32 = buffer[i]; - buffer[i] = ((x32 >> 16) & 0xFF) | ((x32 << 16) & 0xFF0000) | (x32 & 0xFF00FF00); - } -} - -static void color_correction16(uint16_t *buffer, uint32_t dimensions) -{ - uint32_t i; - uint16_t x16; - for (i = 0; i < dimensions; i++) { - x16 = buffer[i]; - buffer[i] = (x16 & 0x8000) | ((x16 << 10) & 0x7C00) | ((x16 >> 1) & 0x3E0) | ((x16 >> 11) & 0x1F); - } + return texture->Width != width || texture->Height != height || texture->PSM != PSM; } static void transfer_texture(GSTEXTURE *texture, const void *frame, - int width, int height, bool rgb32, int filter, bool color_correction) { - - int PSM = rgb32 ? GS_PSM_CT32 : GS_PSM_CT16; - size_t size = gsKit_texture_size_ee(width, height, PSM); - if ( !texture->Mem || - texture->Width != width || - texture->Height != height || - texture->PSM != PSM ) { - texture->Width = width; - texture->Height = height; - texture->PSM = PSM; - texture->Filter = filter; - free(texture->Mem); - texture->Mem = memalign(128, size); + int width, int height, int PSM, int filter, bool color_correction) +{ + texture->Width = width; + texture->Height = height; + texture->PSM = PSM; + texture->Filter = filter; + texture->Mem = (void *)frame; } -if (color_correction) { - int pixels = width * height; - if (rgb32) { - uint32_t *buffer = (uint32_t *)frame; - color_correction32(buffer, pixels); - } else { - uint16_t *buffer = (uint16_t *)frame; - color_correction16(buffer, pixels); - } -} - - memcpy(texture->Mem, frame, size); -} - -static void vram_alloc(GSGLOBAL *gsGlobal, GSTEXTURE *texture) { +static void vram_alloc(GSGLOBAL *gsGlobal, GSTEXTURE *texture) +{ uint32_t size = gsKit_texture_size(texture->Width, texture->Height, texture->PSM); - texture->Vram=gsKit_vram_alloc(gsGlobal, size, GSKIT_ALLOC_USERBUFFER); + texture->Vram = gsKit_vram_alloc(gsGlobal, size, GSKIT_ALLOC_USERBUFFER); if(texture->Vram == GSKIT_ALLOC_ERROR) { printf("VRAM Allocation Failed. Will not upload texture.\n"); } + + if (texture->Clut) { + /* Right now just supporting 16 x 16 = 256 colours */ + size = gsKit_texture_size(16, 16, texture->ClutPSM); + texture->VramClut = gsKit_vram_alloc(gsGlobal, size , GSKIT_ALLOC_USERBUFFER); + } } -static void prim_texture(GSGLOBAL *gsGlobal, GSTEXTURE *texture, int zPosition, bool force_aspect) { +static void prim_texture(GSGLOBAL *gsGlobal, GSTEXTURE *texture, int zPosition, bool force_aspect) +{ float x1, y1, x2, y2; - if (force_aspect) { - float delta = 1.0f; - float texture_aspect_ratio = texture->Width / texture->Height; - float gsGlobal_aspect_ratio = gsGlobal->Width / gsGlobal->Height; - if (texture_aspect_ratio < gsGlobal_aspect_ratio) { - //height - delta = gsGlobal->Height / texture->Height; - } else { - //width - delta = gsGlobal->Width / texture->Width; - } - float newWidth = texture->Width * delta; - float newHeight = texture->Height * delta; - - x1 = (gsGlobal->Width - newWidth) / 2.0f; - y1 = (gsGlobal->Height - newHeight) / 2.0f; - x2 = newWidth + x1; - y2 = newHeight + y1; + if (force_aspect) { + float width_proportion = (float)gsGlobal->Width / (float)texture->Width; + float height_proportion = (float)gsGlobal->Height / (float)texture->Height; + float delta = MIN(width_proportion, height_proportion); + float newWidth = texture->Width * delta; + float newHeight = texture->Height * delta; + + x1 = (gsGlobal->Width - newWidth) / 2.0f; + y1 = (gsGlobal->Height - newHeight) / 2.0f; + x2 = newWidth + x1; + y2 = newHeight + y1; - } else { - x1 = 0.0f; - y1 = 0.0f; - x2 = gsGlobal->Width; - y2 = gsGlobal->Height; - } + } else { + x1 = 0.0f; + y1 = 0.0f; + x2 = gsGlobal->Width; + y2 = gsGlobal->Height; + } gsKit_prim_sprite_texture( gsGlobal, texture, x1, //X1 @@ -182,7 +169,31 @@ static void prim_texture(GSGLOBAL *gsGlobal, GSTEXTURE *texture, int zPosition, GS_TEXT); } +static void clearVRAMIfNeeded(ps2_video_t *ps2, void *frame, int width, int height) +{ + if (!ps2->clearVRAM) { + if(frame && frame != RETRO_HW_FRAME_BUFFER_VALID) { + bool coreVRAMClear = false; + coreVRAMClear = texture_need_prepare(ps2->coreTexture, width, height, ps2->PSM); + ps2->clearVRAM = ps2->clearVRAM || coreVRAMClear; + } + } + if (ps2->clearVRAM) { + gsKit_clear(ps2->gsGlobal, GS_BLACK); + gsKit_vram_clear(ps2->gsGlobal); + } +} + +static void refreshScreen(ps2_video_t *ps2) +{ + if (ps2->vsync) { + gsKit_sync_flip(ps2->gsGlobal); + } + gsKit_queue_exec(ps2->gsGlobal); + + ps2->clearVRAM = false; +} static void *ps2_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) { @@ -196,13 +207,17 @@ static void *ps2_gfx_init(const video_info_t *video, return NULL; init_ps2_video(ps2); - ps2->rgb32 = video->rgb32; + if (video->font_enable) { + font_driver_init_osd(ps2, false, video->is_threaded, FONT_DRIVER_RENDER_PS2); + } + ps2->PSM = (video->rgb32 ? GS_PSM_CT32 : GS_PSM_CT16); ps2->fullscreen = video->fullscreen; ps2->core_filter = video->smooth ? GS_FILTER_LINEAR : GS_FILTER_NEAREST; ps2->force_aspect = video->force_aspect; + ps2->vsync = video->vsync; + ps2->clearVRAM = true; - if (input && input_data) - { + if (input && input_data) { settings_t *settings = config_get_ptr(); ps2input = input_ps2.init(settings->arrays.input_joypad_driver); *input = ps2input ? &input_ps2 : NULL; @@ -216,46 +231,64 @@ static bool ps2_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { -#ifdef DISPLAY_FPS - uint32_t diff; - static uint64_t currentTick,lastTick; - static int frames; - static float fps = 0.0; -#endif ps2_video_t *ps2 = (ps2_video_t*)data; if (!width || !height) return false; - if (frame_count%120==0) { - printf("ps2_gfx_frame %i\n", frame_count); +#if defined(DEBUG) + if (frame_count%60==0) { + printf("ps2_gfx_frame %lu\n", frame_count); } - gsKit_vram_clear(ps2->gsGlobal); +#endif + + clearVRAMIfNeeded(ps2, frame, width, height); if (frame) { - transfer_texture(ps2->coreTexture, frame, width, height, ps2->rgb32, ps2->core_filter, 1); - vram_alloc(ps2->gsGlobal, ps2->coreTexture); + if (frame != RETRO_HW_FRAME_BUFFER_VALID){ /* Checking if the transfer is done in the core */ + transfer_texture(ps2->coreTexture, frame, width, height, ps2->PSM, ps2->core_filter, 1); + } + if(ps2->clearVRAM) { + vram_alloc(ps2->gsGlobal, ps2->coreTexture); + } gsKit_texture_upload(ps2->gsGlobal, ps2->coreTexture); prim_texture(ps2->gsGlobal, ps2->coreTexture, 1, ps2->force_aspect); } - bool texture_empty = !ps2->menuTexture->Width || !ps2->menuTexture->Height; - if (ps2->menuVisible && !texture_empty) { - vram_alloc(ps2->gsGlobal, ps2->menuTexture); - gsKit_texture_upload(ps2->gsGlobal, ps2->menuTexture); - prim_texture(ps2->gsGlobal, ps2->menuTexture, 2, ps2->fullscreen); + if (ps2->menuVisible) { + bool texture_empty = !ps2->menuTexture->Width || !ps2->menuTexture->Height; + if (!texture_empty) { + if(ps2->clearVRAM) { + vram_alloc(ps2->gsGlobal, ps2->menuTexture); + } + gsKit_texture_upload(ps2->gsGlobal, ps2->menuTexture); + prim_texture(ps2->gsGlobal, ps2->menuTexture, 2, ps2->fullscreen); + } + } else if (video_info->statistics_show) { + struct font_params *osd_params = (struct font_params*) + &video_info->osd_stat_params; + + if (osd_params) { + font_driver_render_msg(video_info, NULL, video_info->stat_text, + (const struct font_params*)&video_info->osd_stat_params); + } } - gsKit_sync_flip(ps2->gsGlobal); - gsKit_queue_exec(ps2->gsGlobal); + if(!string_is_empty(msg)) { + font_driver_render_msg(video_info, NULL, msg, NULL); + } + + refreshScreen(ps2); return true; } static void ps2_gfx_set_nonblock_state(void *data, bool toggle) { - (void)data; - (void)toggle; + ps2_video_t *ps2 = (ps2_video_t*)data; + + if (ps2) + ps2->vsync = !toggle; } static bool ps2_gfx_alive(void *data) @@ -290,6 +323,8 @@ static void ps2_gfx_free(void *data) gsKit_clear(ps2->gsGlobal, GS_BLACK); gsKit_vram_clear(ps2->gsGlobal); + font_driver_free_osd(); + deinitTexture(ps2->menuTexture); deinitTexture(ps2->coreTexture); @@ -351,17 +386,43 @@ static void ps2_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha) { ps2_video_t *ps2 = (ps2_video_t*)data; - - transfer_texture(ps2->menuTexture, frame, width, height, rgb32, ps2->menu_filter, 0); + + bool color_correction = false; + int PSM = (rgb32 ? GS_PSM_CT32 : GS_PSM_CT16); + bool texture_changed = texture_need_prepare(ps2->menuTexture, width, height, PSM); + + transfer_texture(ps2->menuTexture, frame, width, height, PSM, ps2->menu_filter, color_correction); + ps2->clearVRAM = ps2->clearVRAM || texture_changed; } static void ps2_set_texture_enable(void *data, bool enable, bool fullscreen) { ps2_video_t *ps2 = (ps2_video_t*)data; + if (ps2->menuVisible != enable) { + /* If Menu change status, CLEAR VRAM */ + ps2->clearVRAM = true; + } ps2->menuVisible = enable; ps2->fullscreen = fullscreen; } +static void ps2_set_osd_msg(void *data, + video_frame_info_t *video_info, + const char *msg, + const void *params, void *font) +{ + font_driver_render_msg(video_info, font, msg, params); +} + +static bool ps2_get_hw_render_interface(void* data, + const struct retro_hw_render_interface** iface) +{ + ps2_video_t* ps2 = (ps2_video_t*)data; + ps2->iface.clearTexture = ps2->clearVRAM; + *iface = (const struct retro_hw_render_interface*)&ps2->iface; + return true; +} + static const video_poke_interface_t ps2_poke_interface = { NULL, /* get_flags */ NULL, /* set_coords */ @@ -380,15 +441,14 @@ static const video_poke_interface_t ps2_poke_interface = { ps2_apply_state_changes, ps2_set_texture_frame, ps2_set_texture_enable, - NULL, /* set_osd_msg */ + ps2_set_osd_msg, /* set_osd_msg */ NULL, /* show_mouse */ NULL, /* grab_mouse_toggle */ NULL, /* get_current_shader */ NULL, /* get_current_software_framebuffer */ - NULL /* get_hw_render_interface */ + ps2_get_hw_render_interface /* get_hw_render_interface */ }; - static void ps2_gfx_get_poke_interface(void *data, const video_poke_interface_t **iface) { diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 57b38fe727..773fe26b7c 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -943,7 +943,6 @@ static bool psp_read_viewport(void *data, uint8_t *buffer, bool is_idle) return true; } - return false; } diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index baf468a369..d72d113d47 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -421,7 +421,6 @@ static void *sdl2_gfx_init(const video_info_t *video, if (!video->fullscreen) RARCH_LOG("[SDL]: Creating window @ %ux%u\n", video->width, video->height); - if (video->fullscreen) flags = settings->bools.video_windowed_fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN; else @@ -785,4 +784,3 @@ video_driver_t video_sdl2 = { #endif sdl2_gfx_poke_interface }; - diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 931f96a926..18a54cdac5 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -500,7 +500,6 @@ static void sdl_set_texture_enable(void *data, bool state, bool full_screen) vid->menu.active = state; } - static void sdl_show_mouse(void *data, bool state) { (void)data; diff --git a/gfx/drivers/switch_nx_gfx.c b/gfx/drivers/switch_nx_gfx.c index 0200e1658a..46fd5a6345 100644 --- a/gfx/drivers/switch_nx_gfx.c +++ b/gfx/drivers/switch_nx_gfx.c @@ -130,18 +130,47 @@ void gfx_slow_swizzling_blit(uint32_t *buffer, uint32_t *image, int w, int h, in } } +void gfx_cpy_dsp_buf(uint32_t *buffer, uint32_t *image, int w, int h, uint32_t stride, bool blend) +{ + uint32_t *dest = buffer; + uint32_t *src = image; + for (uint32_t y = 0; y < h; y ++) + { + for (uint32_t x = 0; x < w; x ++) + { + uint32_t pos = y * stride / sizeof(uint32_t) + x; + uint32_t pixel = *src; + + if (blend) /* supercheap masking */ + { + uint32_t dst = dest[pos]; + uint8_t src_a = ((pixel & 0xFF000000) >> 24); + + if (src_a > 0) + pixel &= 0x00FFFFFF; + else + pixel = dst; + } + + dest[pos] = pixel; + + src++; + } + } +} + /* needed to clear surface completely as hw scaling doesn't always scale to full resoution perflectly */ static void clear_screen(switch_video_t *sw) { - uint32_t *out_buffer = NULL; - gfxConfigureResolution(sw->vp.full_width, sw->vp.full_height); + nwindowSetDimensions(sw->win, sw->vp.full_width, sw->vp.full_height); - out_buffer = (uint32_t *)gfxGetFramebuffer(NULL, NULL); + uint32_t stride; - memset(out_buffer, 0, gfxGetFramebufferSize()); + uint32_t *out_buffer = (uint32_t*)framebufferBegin(&sw->fb, &stride); - gfxFlushBuffers(); - gfxSwapBuffers(); + memset(out_buffer, 0, stride * 720); + + framebufferEnd(&sw->fb); } static void *switch_init(const video_info_t *video, @@ -152,6 +181,11 @@ static void *switch_init(const video_info_t *video, if (!sw) return NULL; + sw->win = nwindowGetDefault(); + + framebufferCreate(&sw->fb, sw->win, 1280, 720, PIXEL_FORMAT_RGBA_8888, 2); + framebufferMakeLinear(&sw->fb); + printf("loading switch gfx driver, width: %d, height: %d threaded: %d smooth %d\n", video->width, video->height, video->is_threaded, video->smooth); sw->vp.x = 0; sw->vp.y = 0; @@ -186,18 +220,6 @@ static void *switch_init(const video_info_t *video, *input_data = switchinput; } -#ifdef HAVE_LIBNX -#ifdef HAVE_OPENGL - // Init Resolution before initDefault - gfxInitResolution(1280, 720); - - gfxInitDefault(); - gfxSetMode(GfxMode_TiledDouble); - - gfxConfigureTransform(0); -#endif // HAVE_OPENGL -#endif - font_driver_init_osd(sw, false, video->is_threaded, FONT_DRIVER_RENDER_SWITCH); @@ -398,8 +420,8 @@ static bool switch_frame(void *data, const void *frame, sw->hw_scale.x_offset = ceil((sw->hw_scale.width - sw->scaler.out_width) / 2.0); if (!video_info->menu_is_alive) { - clear_screen(sw); - gfxConfigureResolution(sw->hw_scale.width, sw->hw_scale.height); + clear_screen(sw); + nwindowSetDimensions(sw->win, sw->hw_scale.width, sw->hw_scale.height); } } sw->scaler.out_fmt = SCALER_FMT_ABGR8888; @@ -418,12 +440,16 @@ static bool switch_frame(void *data, const void *frame, sw->should_resize = false; } - out_buffer = (uint32_t *)gfxGetFramebuffer(NULL, NULL); + uint32_t stride; + + out_buffer = (uint32_t *)framebufferBegin(&sw->fb, &stride); + sw->out_buffer = out_buffer; + sw->stride = stride; if (sw->in_menu && !video_info->menu_is_alive && sw->smooth) { - memset(out_buffer, 0, sw->vp.full_width * sw->vp.full_height * 4); - gfxConfigureResolution(sw->hw_scale.width, sw->hw_scale.height); + memset(out_buffer, 0, stride * sw->vp.full_height); + nwindowSetDimensions(sw->win, sw->hw_scale.width, sw->hw_scale.height); } sw->in_menu = video_info->menu_is_alive; @@ -434,12 +460,12 @@ static bool switch_frame(void *data, const void *frame, if (sw->menu_texture.pixels) { #ifdef HAVE_NXRGUI - gfx_slow_swizzling_blit(out_buffer, nx_backgroundImage, sw->vp.full_width, sw->vp.full_height, 0, 0, false); + gfx_cpy_dsp_buf(out_buffer, nx_backgroundImage, sw->vp.full_width, sw->vp.full_height, stride, false); #else - memset(out_buffer, 0, gfxGetFramebufferSize()); + memset(out_buffer, 0, stride * sw->vp.full_height); #endif scaler_ctx_scale(&sw->menu_texture.scaler, sw->tmp_image + ((sw->vp.full_height - sw->menu_texture.tgth) / 2) * sw->vp.full_width + ((sw->vp.full_width - sw->menu_texture.tgtw) / 2), sw->menu_texture.pixels); - gfx_slow_swizzling_blit(out_buffer, sw->tmp_image, sw->vp.full_width, sw->vp.full_height, 0, 0, true); + gfx_cpy_dsp_buf(out_buffer, sw->tmp_image, sw->vp.full_width, sw->vp.full_height, stride, true); } } else if (sw->smooth) /* bilinear */ @@ -453,16 +479,16 @@ static bool switch_frame(void *data, const void *frame, for (y = 0; y < h; y++) for (x = 0; x < w; x++) - out_buffer[gfxGetFramebufferDisplayOffset(x + sw->hw_scale.x_offset, y)] = sw->image[y * w + x]; + out_buffer[y * stride / sizeof(uint32_t) + (x + sw->hw_scale.x_offset)] = sw->image[y * w + x]; } else { struct scaler_ctx *ctx = &sw->scaler; scaler_ctx_scale(ctx, sw->image + (sw->vp.y * sw->vp.full_width) + sw->vp.x, frame); - gfx_slow_swizzling_blit(out_buffer, sw->image, sw->vp.full_width, sw->vp.full_height, 0, 0, false); + gfx_cpy_dsp_buf(out_buffer, sw->image, sw->vp.full_width, sw->vp.full_height, stride, false); #ifdef HAVE_NXRGUI if (tmp_overlay) - gfx_slow_swizzling_blit(out_buffer, tmp_overlay, sw->vp.full_width, sw->vp.full_height, 0, 0, true); + gfx_cpy_dsp_buf(out_buffer, tmp_overlay, sw->vp.full_width, sw->vp.full_height, stride, true); #endif } @@ -478,10 +504,7 @@ static bool switch_frame(void *data, const void *frame, if (msg) font_driver_render_msg(video_info, NULL, msg, NULL); - gfxFlushBuffers(); - gfxSwapBuffers(); - if (sw->vsync) - gfxWaitForVsync(); + framebufferEnd(&sw->fb); return true; } @@ -520,16 +543,13 @@ static bool switch_has_windowed(void *data) static void switch_free(void *data) { switch_video_t *sw = data; + + framebufferClose(&sw->fb); + if (sw->menu_texture.pixels) free(sw->menu_texture.pixels); free(sw); - -#ifdef HAVE_LIBNX -#ifdef HAVE_OPENGL - gfxExit(); -#endif // HAVE_OPENGL -#endif } static bool switch_set_shader(void *data, @@ -633,15 +653,13 @@ static void switch_apply_state_changes(void *data) static void switch_set_texture_enable(void *data, bool enable, bool full_screen) { switch_video_t *sw = data; - if (!sw->menu_texture.enable && enable) - gfxConfigureResolution(sw->vp.full_width, sw->vp.full_height); + nwindowSetDimensions(sw->win, sw->vp.full_width, sw->vp.full_height); else if (!enable && sw->menu_texture.enable && sw->smooth) { clear_screen(sw); - gfxConfigureResolution(sw->hw_scale.width, sw->hw_scale.height); + nwindowSetDimensions(sw->win, sw->hw_scale.width, sw->hw_scale.height); } - sw->menu_texture.enable = enable; sw->menu_texture.fullscreen = full_screen; } diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 7f49756c5c..3e253ee8d4 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -92,7 +92,6 @@ static void *vita2d_gfx_init(const video_info_t *video, video_driver_set_size(&temp_width, &temp_height); vita2d_gfx_set_viewport(vita, temp_width, temp_height, false, true); - if (input && input_data) { settings_t *settings = config_get_ptr(); diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 9ca988f1a1..483ee8ae09 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1001,12 +1001,14 @@ static void vulkan_set_image(void *handle, if (num_semaphores > 0) { - vk->hw.wait_dst_stages = (VkPipelineStageFlags*) + VkPipelineStageFlags *stage_flags = (VkPipelineStageFlags*) realloc(vk->hw.wait_dst_stages, sizeof(VkPipelineStageFlags) * vk->hw.num_semaphores); /* If this fails, we're screwed anyways. */ - retro_assert(vk->hw.wait_dst_stages); + retro_assert(stage_flags); + + vk->hw.wait_dst_stages = stage_flags; for (i = 0; i < vk->hw.num_semaphores; i++) vk->hw.wait_dst_stages[i] = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT; @@ -1030,11 +1032,14 @@ static void vulkan_set_command_buffers(void *handle, uint32_t num_cmd, unsigned required_capacity = num_cmd + 1; if (required_capacity > vk->hw.capacity_cmd) { - vk->hw.cmd = (VkCommandBuffer*)realloc(vk->hw.cmd, + VkCommandBuffer *hw_cmd = (VkCommandBuffer*) + realloc(vk->hw.cmd, sizeof(VkCommandBuffer) * required_capacity); /* If this fails, we're just screwed. */ - retro_assert(vk->hw.cmd); + retro_assert(hw_cmd); + + vk->hw.cmd = hw_cmd; vk->hw.capacity_cmd = required_capacity; } @@ -2740,4 +2745,3 @@ video_driver_t video_vulkan = { vulkan_get_poke_interface, NULL, /* vulkan_wrap_type_to_enum */ }; - diff --git a/gfx/drivers/vulkan_shaders/pipeline_bokeh.frag b/gfx/drivers/vulkan_shaders/pipeline_bokeh.frag index 49de9edeb5..fae65b9eaf 100644 --- a/gfx/drivers/vulkan_shaders/pipeline_bokeh.frag +++ b/gfx/drivers/vulkan_shaders/pipeline_bokeh.frag @@ -35,5 +35,3 @@ for( int i=0; i < 8; i++ ) color *= sqrt(1.5 - 0.5 * length(uv)); FragColor = vec4(color.r, color.g, color.b , 0.5); } - - diff --git a/gfx/drivers/vulkan_shaders/pipeline_snow.frag b/gfx/drivers/vulkan_shaders/pipeline_snow.frag index b104cbb42e..eeb2c0d81c 100644 --- a/gfx/drivers/vulkan_shaders/pipeline_snow.frag +++ b/gfx/drivers/vulkan_shaders/pipeline_snow.frag @@ -72,5 +72,3 @@ void main(void) a = a * min(pos.y * 4.0, 1.0); FragColor = vec4(1.0, 1.0, 1.0, a); } - - diff --git a/gfx/drivers/vulkan_shaders/pipeline_snow_simple.frag b/gfx/drivers/vulkan_shaders/pipeline_snow_simple.frag index e5f837d02d..c0e242d9a8 100644 --- a/gfx/drivers/vulkan_shaders/pipeline_snow_simple.frag +++ b/gfx/drivers/vulkan_shaders/pipeline_snow_simple.frag @@ -72,5 +72,3 @@ void main(void) a = a * min(pos.y * 4.0, 1.0); FragColor = vec4(1.0, 1.0, 1.0, a); } - - diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index 9101d047cc..019259a060 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -137,7 +137,6 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * edram_init(gl->gl_device); - /* enable filtering for now */ float x = -1.0f; diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index a953f2d052..ea728793cc 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -267,4 +267,3 @@ video_driver_t video_xshm = { #endif xshm_gfx_poke_interface }; - diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 116a6a9fdf..f45dd0e97f 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -536,7 +536,6 @@ static void android_gfx_ctx_set_swap_interval(void *data, int swap_interval) } } - static gfx_ctx_proc_t android_gfx_ctx_get_proc_address(const char *symbol) { switch (android_api) diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index d362bb745a..c89f788227 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -154,7 +154,6 @@ static void gfx_ctx_drm_check_window(void *data, bool *quit, *quit = (bool)frontend_driver_get_signal_handler_state(); } - static void drm_flip_handler(int fd, unsigned frame, unsigned sec, unsigned usec, void *data) { @@ -707,7 +706,6 @@ static bool gfx_ctx_drm_set_video_mode(void *data, goto error; } - switch (drm_api) { case GFX_CTX_OPENGL_API: @@ -746,7 +744,6 @@ error: return false; } - static void gfx_ctx_drm_destroy(void *data) { gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 46410ba68d..9351f7c499 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -280,7 +280,6 @@ static bool gfx_ctx_emscripten_bind_api(void *data, return false; } - static void gfx_ctx_emscripten_input_driver(void *data, const char *name, const input_driver_t **input, void **input_data) diff --git a/gfx/drivers_context/gdi_ctx.c b/gfx/drivers_context/gdi_ctx.c index e59a480601..9ced343e99 100644 --- a/gfx/drivers_context/gdi_ctx.c +++ b/gfx/drivers_context/gdi_ctx.c @@ -229,7 +229,6 @@ error: return false; } - static void gfx_ctx_gdi_input_driver(void *data, const char *joypad_name, const input_driver_t **input, void **input_data) @@ -377,4 +376,3 @@ const gfx_ctx_driver_t gfx_ctx_gdi = { NULL, NULL }; - diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 8303547e2d..f0bf58c5a7 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -166,4 +166,3 @@ const gfx_ctx_driver_t gfx_ctx_null = { NULL, NULL }; - diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index 194597645b..55ab28db0d 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -266,4 +266,3 @@ const gfx_ctx_driver_t gfx_ctx_khr_display = { gfx_ctx_khr_display_get_context_data, NULL }; - diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 363e3c0182..7e78c643da 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -332,4 +332,3 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { NULL, NULL }; - diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index f774c9c34b..6c3532db04 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -234,7 +234,6 @@ static void gfx_ctx_opendingux_set_swap_interval( #endif } - static gfx_ctx_proc_t gfx_ctx_opendingux_get_proc_address(const char *symbol) { #ifdef HAVE_EGL diff --git a/gfx/drivers_context/orbis_ctx.c b/gfx/drivers_context/orbis_ctx.c index 999e51ef53..5bd1733b55 100644 --- a/gfx/drivers_context/orbis_ctx.c +++ b/gfx/drivers_context/orbis_ctx.c @@ -19,7 +19,6 @@ #include "../../config.h" #endif - #include "../common/orbis_common.h" #include "../../frontend/frontend_driver.h" @@ -59,11 +58,17 @@ static void *orbis_ctx_init(video_frame_info_t *video_info, void *video_driver) EGLint n; EGLint major, minor; static const EGLint attribs[] = { - EGL_BLUE_SIZE, 8, - EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_NONE}; + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_ALPHA_SIZE, 8, + EGL_DEPTH_SIZE, 16, + EGL_STENCIL_SIZE, 0, + EGL_SAMPLE_BUFFERS, 0, + EGL_SAMPLES, 0, + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_SURFACE_TYPE, EGL_WINDOW_BIT, + EGL_NONE}; #endif orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)calloc(1, sizeof(*ctx_orbis)); @@ -144,8 +149,8 @@ static bool orbis_ctx_set_video_mode(void *data, orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; - ctx_orbis->width = ATTR_ORBISGL_HEIGHT; - ctx_orbis->height = ATTR_ORBISGL_WIDTH; + ctx_orbis->width = ATTR_ORBISGL_WIDTH; + ctx_orbis->height = ATTR_ORBISGL_HEIGHT; ctx_orbis->native_window.width = ctx_orbis->width; ctx_orbis->native_window.height = ctx_orbis->height; @@ -219,7 +224,7 @@ static void orbis_ctx_set_swap_interval(void *data, orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; #ifdef HAVE_EGL - egl_set_swap_interval(&ctx_orbis->egl, swap_interval); + egl_set_swap_interval(&ctx_orbis->egl, 0); #endif } diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index d78e7ec6c3..99b3c86c0d 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -14,7 +14,6 @@ * If not, see . */ - #include #include #include diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index f934d3a2aa..3ac9accf9c 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -442,4 +442,3 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { NULL, NULL }; - diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index f71c2f50b3..23e9e74452 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -131,7 +131,6 @@ static void *gfx_ctx_qnx_init(video_frame_info_t *video_info, void *video_driver } } - #ifdef HAVE_EGL if (!egl_init_context(&qnx->egl, EGL_NONE, EGL_DEFAULT_DISPLAY, &major, &minor, &n, attribs, NULL)) @@ -239,7 +238,6 @@ static void *gfx_ctx_qnx_init(video_frame_info_t *video_info, void *video_driver goto error; } - if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_BUFFER_SIZE, buffer_size)) { @@ -321,7 +319,6 @@ static bool gfx_ctx_qnx_set_video_mode(void *data, return true; } - static void gfx_ctx_qnx_input_driver(void *data, const char *joypad_name, const input_driver_t **input, void **input_data) diff --git a/gfx/drivers_context/sixel_ctx.c b/gfx/drivers_context/sixel_ctx.c index 968f067dd3..2ed93c08de 100644 --- a/gfx/drivers_context/sixel_ctx.c +++ b/gfx/drivers_context/sixel_ctx.c @@ -90,7 +90,6 @@ static bool gfx_ctx_sixel_set_video_mode(void *data, return true; } - static void gfx_ctx_sixel_input_driver(void *data, const char *joypad_name, const input_driver_t **input, void **input_data) @@ -208,4 +207,3 @@ const gfx_ctx_driver_t gfx_ctx_sixel = { NULL, NULL }; - diff --git a/gfx/drivers_context/switch_ctx.c b/gfx/drivers_context/switch_ctx.c index 1bdfe71447..a162363b50 100644 --- a/gfx/drivers_context/switch_ctx.c +++ b/gfx/drivers_context/switch_ctx.c @@ -97,8 +97,8 @@ static void *switch_ctx_init(video_frame_info_t *video_info, void *video_driver) #endif // Needs to be here - gfxInitResolutionDefault(); // 1080p - gfxConfigureResolution(1920, 1080); + ctx_nx->win = nwindowGetDefault(); + nwindowSetDimensions(ctx_nx->win, 1920, 1080); #ifdef HAVE_EGL if (!egl_init_context(&ctx_nx->egl, EGL_NONE, EGL_DEFAULT_DISPLAY, @@ -139,7 +139,7 @@ static void switch_ctx_check_window(void *data, bool *quit, *resize = true; printf("[NXGL]: Resizing to %dx%d\n", *width, *height); - gfxConfigureCrop(0, 1080 - ctx_nx->height, ctx_nx->width, 1080); + nwindowSetCrop(ctx_nx->win, 0, 1080 - ctx_nx->height, ctx_nx->width, 1080); } *quit = (bool)false; @@ -174,11 +174,11 @@ static bool switch_ctx_set_video_mode(void *data, #endif #ifdef HAVE_EGL - if (!egl_create_surface(&ctx_nx->egl, &ctx_nx->native_window)) + if (!egl_create_surface(&ctx_nx->egl, ctx_nx->win)) goto error; #endif - gfxConfigureCrop(0, 1080 - ctx_nx->height, ctx_nx->width, 1080); + nwindowSetCrop(ctx_nx->win, 0, 1080 - ctx_nx->height, ctx_nx->width, 1080); return true; diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 183ab77557..0c9ec71a3a 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -49,7 +49,6 @@ #include #endif - #ifdef HAVE_CONFIG_H #include "../../config.h" #endif diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 4037cc349e..a712c64895 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -59,7 +59,6 @@ /* Generated from xdg-decoration-unstable-v1.h */ #include "../common/wayland/xdg-decoration-unstable-v1.h" - typedef struct touch_pos { bool active; @@ -68,10 +67,22 @@ typedef struct touch_pos unsigned y; } touch_pos_t; +typedef struct output_info +{ + struct wl_output *output; + uint32_t global_id; + unsigned width; + unsigned height; + unsigned physical_width; + unsigned physical_height; + int refresh_rate; + unsigned scale; + struct wl_list link; // wl->all_outputs +} output_info_t; + static int num_active_touches; static touch_pos_t active_touch_positions[MAX_TOUCHES]; - typedef struct gfx_ctx_wayland_data { #ifdef HAVE_EGL @@ -87,9 +98,6 @@ typedef struct gfx_ctx_wayland_data int prev_height; unsigned width; unsigned height; - unsigned physical_width; - unsigned physical_height; - int refresh_rate; struct wl_registry *registry; struct wl_compositor *compositor; struct wl_surface *surface; @@ -110,9 +118,12 @@ typedef struct gfx_ctx_wayland_data struct zxdg_toplevel_decoration_v1 *deco; struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager; struct zwp_idle_inhibitor_v1 *idle_inhibitor; + struct wl_list all_outputs; + output_info_t *current_output; int swap_interval; bool core_hw_context_enable; + unsigned last_buffer_scale; unsigned buffer_scale; struct @@ -131,7 +142,6 @@ typedef struct gfx_ctx_wayland_data #endif } gfx_ctx_wayland_data_t; - static enum gfx_ctx_api wl_api = GFX_CTX_NONE; #ifndef EGL_OPENGL_ES3_BIT_KHR @@ -327,14 +337,15 @@ static void pointer_handle_button(void *data, { wl->input.mouse.left = true; - if (BIT_GET(wl->input.key_state, KEY_LEFTALT) && wl->xdg_toplevel) { + if (BIT_GET(wl->input.key_state, KEY_LEFTALT)) + { if (wl->xdg_toplevel) xdg_toplevel_move(wl->xdg_toplevel, wl->seat, serial); else if (wl->zxdg_toplevel) zxdg_toplevel_v6_move(wl->zxdg_toplevel, wl->seat, serial); else if (wl->shell) wl_shell_surface_move(wl->shell_surf, wl->seat, serial); - } + } } else if (button == BTN_RIGHT) wl->input.mouse.right = true; @@ -505,7 +516,6 @@ static const struct wl_touch_listener touch_listener = { touch_handle_cancel, }; - static void seat_handle_capabilities(void *data, struct wl_seat *seat, unsigned caps) { @@ -558,7 +568,7 @@ static const struct wl_seat_listener seat_listener = { /* Touch handle functions */ -bool wayland_context_gettouchpos(void *data, unsigned id, +bool wayland_context_gettouchpos(void *data, unsigned id, unsigned* touch_x, unsigned* touch_y) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; @@ -570,7 +580,32 @@ bool wayland_context_gettouchpos(void *data, unsigned id, return active_touch_positions[id].active; } +/* Surface callbacks. */ +static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height); +static void wl_surface_enter(void *data, struct wl_surface *wl_surface, + struct wl_output *output) +{ + // TODO: track all outputs the surface is on, pick highest scale + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + output_info_t *oi; + wl_list_for_each(oi, &wl->all_outputs, link) { + if (oi->output == output) { + RARCH_LOG("[Wayland]: Entering output #%d, scale %d\n", oi->global_id, oi->scale); + wl->current_output = oi; + wl->last_buffer_scale = wl->buffer_scale; + wl->buffer_scale = oi->scale; + break; + } + }; +} + +static void nop() { } + +static const struct wl_surface_listener wl_surface_listener = { + wl_surface_enter, + nop, +}; /* Shell surface callbacks. */ static void xdg_shell_ping(void *data, struct xdg_wm_base *shell, uint32_t serial) @@ -584,7 +619,7 @@ static const struct xdg_wm_base_listener xdg_shell_listener = { static void handle_surface_config(void *data, struct xdg_surface *surface, uint32_t serial) -{ +{ xdg_surface_ack_configure(surface, serial); } @@ -596,7 +631,7 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel, int32_t width, int32_t height, struct wl_array *states) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - + wl->fullscreen = false; wl->maximized = false; const uint32_t *state; @@ -622,7 +657,9 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel, wl->width = width; wl->height = height; } - + + wl_egl_window_resize(wl->win, width, height, 0, 0); + wl->configured = false; } @@ -648,7 +685,7 @@ static const struct zxdg_shell_v6_listener zxdg_shell_v6_listener = { static void handle_zxdg_surface_config(void *data, struct zxdg_surface_v6 *surface, uint32_t serial) -{ +{ zxdg_surface_v6_ack_configure(surface, serial); } @@ -660,7 +697,7 @@ static void handle_zxdg_toplevel_config(void *data, struct zxdg_toplevel_v6 *top int32_t width, int32_t height, struct wl_array *states) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - + wl->fullscreen = false; wl->maximized = false; const uint32_t *state; @@ -686,7 +723,9 @@ static void handle_zxdg_toplevel_config(void *data, struct zxdg_toplevel_v6 *top wl->width = width; wl->height = height; } - + + wl_egl_window_resize(wl->win, width, height, 0, 0); + wl->configured = false; } @@ -718,8 +757,8 @@ static void shell_surface_handle_configure(void *data, (void)shell_surface; (void)edges; - wl->width = wl->buffer_scale * width; - wl->height = wl->buffer_scale * height; + wl->width = width; + wl->height = height; RARCH_LOG("[Wayland]: Surface configure: %u x %u.\n", wl->width, wl->height); @@ -756,9 +795,9 @@ static void display_handle_geometry(void *data, (void)model; (void)transform; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - wl->physical_width = physical_width; - wl->physical_height = physical_height; + output_info_t *oi = (output_info_t*)data; + oi->physical_width = physical_width; + oi->physical_height = physical_height; RARCH_LOG("[Wayland]: Physical width: %d mm x %d mm.\n", physical_width, physical_height); @@ -774,10 +813,10 @@ static void display_handle_mode(void *data, (void)output; (void)flags; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - wl->width = width; - wl->height = height; - wl->refresh_rate = refresh; + output_info_t *oi = (output_info_t*)data; + oi->width = width; + oi->height = height; + oi->refresh_rate = refresh; /* Certain older Wayland implementations report in Hz, * but it should be mHz. */ @@ -796,10 +835,10 @@ static void display_handle_scale(void *data, struct wl_output *output, int32_t factor) { - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + output_info_t *oi = (output_info_t*)data; - RARCH_LOG("[Wayland]: Setting buffer scale factor to %d.\n", factor); - wl->buffer_scale = factor; + RARCH_LOG("[Wayland]: Display scale factor %d.\n", factor); + oi->scale = factor; } static const struct wl_output_listener output_listener = { @@ -813,7 +852,6 @@ static const struct wl_output_listener output_listener = { static void registry_handle_global(void *data, struct wl_registry *reg, uint32_t id, const char *interface, uint32_t version) { - struct wl_output *output = NULL; gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; (void)version; @@ -823,9 +861,12 @@ static void registry_handle_global(void *data, struct wl_registry *reg, id, &wl_compositor_interface, 3); else if (string_is_equal(interface, "wl_output")) { - output = (struct wl_output*)wl_registry_bind(reg, + output_info_t *oi = calloc(1, sizeof(output_info_t)); + oi->global_id = id; + oi->output = (struct wl_output*)wl_registry_bind(reg, id, &wl_output_interface, 2); - wl_output_add_listener(output, &output_listener, wl); + wl_output_add_listener(oi->output, &output_listener, oi); + wl_list_insert(&wl->all_outputs, &oi->link); wl_display_roundtrip(wl->input.dpy); } else if (string_is_equal(interface, "xdg_wm_base")) @@ -855,9 +896,16 @@ static void registry_handle_global(void *data, struct wl_registry *reg, static void registry_handle_global_remove(void *data, struct wl_registry *registry, uint32_t id) { - (void)data; - (void)registry; - (void)id; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + output_info_t *oi, *tmp; + + wl_list_for_each_safe(oi, tmp, &wl->all_outputs, link) { + if (oi->global_id == id) { + wl_list_remove(&oi->link); + free(oi); + break; + } + } } static const struct wl_registry_listener registry_listener = { @@ -1009,13 +1057,14 @@ static void gfx_ctx_wl_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { + // this function works with SCALED sizes, it's used from the renderer unsigned new_width, new_height; gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; flush_wayland_fd(&wl->input); - new_width = *width; - new_height = *height; + new_width = *width * wl->last_buffer_scale; + new_height = *height * wl->last_buffer_scale; gfx_ctx_wl_get_video_size(data, &new_width, &new_height); @@ -1033,11 +1082,12 @@ static void gfx_ctx_wl_check_window(void *data, bool *quit, break; } - if (new_width != *width || new_height != *height) + if (new_width != *width * wl->last_buffer_scale || new_height != *height * wl->last_buffer_scale) { *resize = true; *width = new_width; *height = new_height; + wl->last_buffer_scale = wl->buffer_scale; } *quit = (bool)frontend_driver_get_signal_handler_state(); @@ -1058,9 +1108,6 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) break; case GFX_CTX_VULKAN_API: #ifdef HAVE_VULKAN - wl->width = width / wl->buffer_scale; - wl->height = height / wl->buffer_scale; - if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval)) { wl->vk.context.invalid_swapchain = true; @@ -1081,6 +1128,7 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) break; } + wl_surface_set_buffer_scale(wl->surface, wl->buffer_scale); return true; } @@ -1103,7 +1151,7 @@ static void gfx_ctx_wl_update_title(void *data, void *data2) else if (wl->zxdg_toplevel) { if (wl->deco) { zxdg_toplevel_decoration_v1_set_mode(wl->deco, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); - } + } zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, title); } else if (wl->shell_surf) @@ -1111,27 +1159,26 @@ static void gfx_ctx_wl_update_title(void *data, void *data2) } } - static bool gfx_ctx_wl_get_metrics(void *data, enum display_metric_types type, float *value) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - if (!wl || wl->physical_width == 0 || wl->physical_height == 0) + if (!wl || !wl->current_output || wl->current_output->physical_width == 0 || wl->current_output->physical_height == 0) return false; switch (type) { case DISPLAY_METRIC_MM_WIDTH: - *value = (float)wl->physical_width; + *value = (float)wl->current_output->physical_width; break; case DISPLAY_METRIC_MM_HEIGHT: - *value = (float)wl->physical_height; + *value = (float)wl->current_output->physical_height; break; case DISPLAY_METRIC_DPI: - *value = (float)wl->width * 25.4f / (float)wl->physical_width; + *value = (float)wl->current_output->width * 25.4f / (float)wl->current_output->physical_width; break; default: @@ -1206,6 +1253,8 @@ static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver) (void)video_driver; + wl_list_init(&wl->all_outputs); + #ifdef HAVE_EGL switch (wl_api) { @@ -1242,6 +1291,7 @@ static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver) frontend_driver_destroy_signal_handler_state(); wl->input.dpy = wl_display_connect(NULL); + wl->last_buffer_scale = 1; wl->buffer_scale = 1; if (!wl->input.dpy) @@ -1272,23 +1322,23 @@ static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver) { RARCH_LOG("[Wayland]: Using zxdg_shell_v6 interface.\n"); } - + if (!wl->xdg_shell && !wl->zxdg_shell) { RARCH_WARN("[Wayland]: Fallback to deprecated wl_shell interface!.\n"); } - + if (!wl->xdg_shell && !wl->zxdg_shell && !wl->shell) { RARCH_ERR("[Wayland]: Failed to create shell.\n"); goto error; } - + if (!wl->idle_inhibit_manager) { RARCH_WARN("[Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol!\n"); } - + if (!wl->deco_manager) { RARCH_WARN("[Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol!\n"); @@ -1327,7 +1377,6 @@ static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver) break; } - wl->input.keyboard_focus = true; wl->input.mouse.focus = true; @@ -1502,6 +1551,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data, wl->surface = wl_compositor_create_surface(wl->compositor); wl_surface_set_buffer_scale(wl->surface, wl->buffer_scale); + wl_surface_add_listener(wl->surface, &wl_surface_listener, wl); switch (wl_api) { @@ -1509,33 +1559,33 @@ static bool gfx_ctx_wl_set_video_mode(void *data, case GFX_CTX_OPENGL_ES_API: case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - wl->win = wl_egl_window_create(wl->surface, wl->width, wl->height); + wl->win = wl_egl_window_create(wl->surface, wl->width * wl->buffer_scale, wl->height * wl->buffer_scale); #endif break; case GFX_CTX_NONE: default: break; } - + if (wl->xdg_shell) { wl->xdg_surface = xdg_wm_base_get_xdg_surface(wl->xdg_shell, wl->surface); xdg_surface_add_listener(wl->xdg_surface, &xdg_surface_listener, wl); - + wl->xdg_toplevel = xdg_surface_get_toplevel(wl->xdg_surface); xdg_toplevel_add_listener(wl->xdg_toplevel, &xdg_toplevel_listener, wl); - - xdg_toplevel_set_app_id(wl->xdg_toplevel, "RetroArch"); + + xdg_toplevel_set_app_id(wl->xdg_toplevel, "retroarch"); xdg_toplevel_set_title(wl->xdg_toplevel, "RetroArch"); - + if (wl->deco_manager) { wl->deco = zxdg_decoration_manager_v1_get_toplevel_decoration( wl->deco_manager, wl->xdg_toplevel); } - + /* Waiting for xdg_toplevel to be configured before starting to draw */ wl_surface_commit(wl->surface); wl->configured = true; - + while (wl->configured) { wl_display_dispatch(wl->input.dpy); } @@ -1544,22 +1594,22 @@ static bool gfx_ctx_wl_set_video_mode(void *data, } else if (wl->zxdg_shell) { wl->zxdg_surface = zxdg_shell_v6_get_xdg_surface(wl->zxdg_shell, wl->surface); zxdg_surface_v6_add_listener(wl->zxdg_surface, &zxdg_surface_v6_listener, wl); - + wl->zxdg_toplevel = zxdg_surface_v6_get_toplevel(wl->zxdg_surface); zxdg_toplevel_v6_add_listener(wl->zxdg_toplevel, &zxdg_toplevel_v6_listener, wl); - - zxdg_toplevel_v6_set_app_id(wl->zxdg_toplevel, "RetroArch"); + + zxdg_toplevel_v6_set_app_id(wl->zxdg_toplevel, "retroarch"); zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, "RetroArch"); - + if (wl->deco_manager) { wl->deco = zxdg_decoration_manager_v1_get_toplevel_decoration( wl->deco_manager, wl->xdg_toplevel); } - + /* Waiting for xdg_toplevel to be configured before starting to draw */ wl_surface_commit(wl->surface); wl->configured = true; - + while (wl->configured) { wl_display_dispatch(wl->input.dpy); } @@ -1572,7 +1622,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data, wl_shell_surface_set_class(wl->shell_surf, "RetroArch"); wl_shell_surface_set_title(wl->shell_surf, "RetroArch"); } - + switch (wl_api) { @@ -1672,7 +1722,7 @@ static bool gfx_ctx_wl_has_focus(void *data) static bool gfx_ctx_wl_suppress_screensaver(void *data, bool state) { (void)data; - + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; if (!wl->idle_inhibit_manager) @@ -1872,7 +1922,10 @@ static float gfx_ctx_wl_get_refresh_rate(void *data) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - return (float) wl->refresh_rate / 1000.0f; + if (!wl || !wl->current_output) + return false; + + return (float) wl->current_output->refresh_rate / 1000.0f; } const gfx_ctx_driver_t gfx_ctx_wayland = { diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index b90a8e40c3..2d9d7de917 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -665,7 +665,6 @@ error: return false; } - static void gfx_ctx_wgl_input_driver(void *data, const char *joypad_name, const input_driver_t **input, void **input_data) @@ -710,7 +709,6 @@ static bool gfx_ctx_wgl_has_windowed(void *data) return true; } - static bool gfx_ctx_wgl_get_metrics(void *data, enum display_metric_types type, float *value) { @@ -876,4 +874,3 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { #endif NULL }; - diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 0f6296b820..9aa2187a40 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -491,7 +491,6 @@ static void *gfx_ctx_x_init(video_frame_info_t *video_info, void *data) if (!x11_connect()) goto error; - switch (x_api) { case GFX_CTX_OPENGL_API: diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 24d2546c53..a61fd3c552 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -450,7 +450,6 @@ error: return false; } - static void gfx_ctx_xegl_input_driver(void *data, const char *joypad_name, const input_driver_t **input, void **input_data) diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index 4eb656f625..08af4e75d6 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -215,7 +215,6 @@ static void ctr_font_render_line( width = glyph->width; height = glyph->height; - v->x0 = x + off_x + delta_x * scale; v->y0 = y + off_y + delta_y * scale; v->u0 = tex_x; diff --git a/gfx/drivers_font/d3d_w32_font.c b/gfx/drivers_font/d3d_w32_font.c index bd176b9762..28347e03e6 100644 --- a/gfx/drivers_font/d3d_w32_font.c +++ b/gfx/drivers_font/d3d_w32_font.c @@ -30,7 +30,6 @@ #include "../../configuration.h" - typedef struct d3dx_font_desc { INT Height; @@ -87,7 +86,6 @@ static void *d3dfonts_w32_init_font(void *video_data, &desc, (void**)&d3dfonts->font)) goto error; - d3d9x_font_get_text_metrics(d3dfonts->font, &metrics); d3dfonts->ascent = metrics.tmAscent; @@ -112,7 +110,6 @@ static void d3dfonts_w32_free_font(void *data, bool is_threaded) free(d3dfonts); } - static int d3dfonts_w32_get_message_width(void* data, const char* msg, unsigned msg_len, float scale) { @@ -128,7 +125,6 @@ static int d3dfonts_w32_get_message_width(void* data, const char* msg, return box.right - box.left; } - static void d3dfonts_w32_render_msg(video_frame_info_t *video_info, void *data, const char *msg, const struct font_params *params) { diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index a1442f8a9b..37336f7e16 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -214,7 +214,6 @@ error: return NULL; } - static int gl_get_message_width(void *data, const char *msg, unsigned msg_len, float scale) { diff --git a/gfx/drivers_font/ps2_font.c b/gfx/drivers_font/ps2_font.c new file mode 100644 index 0000000000..312d7926e1 --- /dev/null +++ b/gfx/drivers_font/ps2_font.c @@ -0,0 +1,128 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2019 - Francisco Javier Trujillo Mata + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include + +#include "../font_driver.h" + +#define FONTM_VRAM_SIZE 4096 +#define FONTM_TEXTURE_COLOR GS_SETREG_RGBAQ(0x80,0x80,0x80,0x80,0x00) +#define FONTM_TEXTURE_WIDTH 52 +#define FONTM_TEXTURE_HEIGHT 832 +#define FONTM_TEXTURE_SPACING 1.0f +#define FONTM_TEXTURE_SCALED 0.5f +#define FONTM_TEXTURE_LEFT_MARGIN 0 +#define FONTM_TEXTURE_BOTTOM_MARGIN 15 +#define FONTM_TEXTURE_ZPOSITION 3 + +typedef struct ps2_font_info +{ + ps2_video_t *ps2_video; + GSFONTM *gsFontM; +} ps2_font_info_t; + +/* Copied from GSKIT FONTM CLUT + FONTM Textures are GS_PSM_T4, and need a 16x16 CLUT + This is a greyscale ramp CLUT, with linear alpha. */ +static u32 gsKit_fontm_clut[16] = { 0x00000000, 0x11111111, 0x22222222, 0x33333333, \ + 0x44444444, 0x55555555, 0x66666666, 0x77777777, \ + 0x80888888, 0x80999999, 0x80AAAAAA, 0x80BBBBBB, \ + 0x80CCCCCC, 0x80DDDDDD, 0x80EEEEEE, 0x80FFFFFF }; + +static void ps2_prepare_font(GSGLOBAL *gsGlobal, GSFONTM *gsFontM) +{ + if(gsKit_fontm_unpack(gsFontM) == 0) { + gsFontM->Texture->Width = FONTM_TEXTURE_WIDTH; + gsFontM->Texture->Height = FONTM_TEXTURE_HEIGHT; + gsFontM->Texture->PSM = GS_PSM_T4; + gsFontM->Texture->ClutPSM = GS_PSM_CT32; + gsFontM->Texture->Filter = GS_FILTER_LINEAR; + gsKit_setup_tbw(gsFontM->Texture); + } +} + +static void ps2_upload_font(GSGLOBAL *gsGlobal, GSFONTM *gsFontM) +{ + int pgindx; + int TexSize = gsKit_texture_size(gsFontM->Texture->Width, gsFontM->Texture->Height, gsFontM->Texture->PSM); + + gsFontM->Texture->VramClut = gsKit_vram_alloc(gsGlobal, FONTM_VRAM_SIZE, GSKIT_ALLOC_USERBUFFER); + + for (pgindx = 0; pgindx < GS_FONTM_PAGE_COUNT; ++pgindx) { + gsFontM->Vram[pgindx] = gsKit_vram_alloc(gsGlobal, TexSize, GSKIT_ALLOC_USERBUFFER); + gsFontM->LastPage[pgindx] = (u32) -1; + } + + gsFontM->Texture->Vram = gsFontM->Vram[0]; + gsFontM->VramIdx = 0; + gsFontM->Spacing = FONTM_TEXTURE_SPACING; + gsFontM->Align = GSKIT_FALIGN_LEFT; + + gsFontM->Texture->Clut = memalign(GS_VRAM_TBWALIGN_CLUT, GS_VRAM_TBWALIGN); + memcpy(gsFontM->Texture->Clut, gsKit_fontm_clut, GS_VRAM_TBWALIGN); + gsKit_texture_send(gsFontM->Texture->Clut, 8, 2, gsFontM->Texture->VramClut, gsFontM->Texture->ClutPSM, 1, GS_CLUT_PALLETE); + free(gsFontM->Texture->Clut); +} + +static void *ps2_font_init_font(void *gl_data, const char *font_path, + float font_size, bool is_threaded) +{ + ps2_font_info_t *ps2 = (ps2_font_info_t*)calloc(1, sizeof(ps2_font_info_t)); + ps2->ps2_video = (ps2_video_t *)gl_data; + ps2->gsFontM = gsKit_init_fontm(); + + ps2_prepare_font(ps2->ps2_video->gsGlobal, ps2->gsFontM); + ps2_upload_font(ps2->ps2_video->gsGlobal, ps2->gsFontM); + + return ps2; +} + +static void ps2_font_free_font(void *data, bool is_threaded) +{ + ps2_font_info_t *ps2 = (ps2_font_info_t *)data; + free(ps2->gsFontM); + free(ps2); +} + +static void ps2_font_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, + const struct font_params *params) +{ + ps2_font_info_t *ps2 = (ps2_font_info_t *)data; + + if (ps2) { + int x = FONTM_TEXTURE_LEFT_MARGIN; + int y = ps2->ps2_video->gsGlobal->Height - FONTM_TEXTURE_BOTTOM_MARGIN; + if (ps2->ps2_video->clearVRAM) { + ps2_upload_font(ps2->ps2_video->gsGlobal, ps2->gsFontM); + } + gsKit_fontm_print_scaled(ps2->ps2_video->gsGlobal, ps2->gsFontM, x, y, FONTM_TEXTURE_ZPOSITION, + FONTM_TEXTURE_SCALED , FONTM_TEXTURE_COLOR, msg); + } +} + +font_renderer_t ps2_font = { + ps2_font_init_font, + ps2_font_free_font, + ps2_font_render_msg, + "PS2 font", + NULL, /* get_glyph */ + NULL, /* bind_block */ + NULL, /* flush */ + NULL, /* get_message_width */ +}; diff --git a/gfx/drivers_font/switch_font.c b/gfx/drivers_font/switch_font.c index 0b9d5be7f3..d5f3a46897 100644 --- a/gfx/drivers_font/switch_font.c +++ b/gfx/drivers_font/switch_font.c @@ -1,350 +1,354 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2018 - lifajucejo - * Copyright (C) 2018 - m4xw - * Copyright (C) 2018 - natinusala - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#include -#include -#include -#include -#include - -#include - -#include "../font_driver.h" -#include "../video_driver.h" - -#include "../../verbosity.h" - -#include "../common/switch_common.h" - -typedef struct -{ - struct font_atlas *atlas; - - const font_renderer_driver_t *font_driver; - void *font_data; -} switch_font_t; - -static void *switch_font_init_font(void *data, const char *font_path, - float font_size, bool is_threaded) -{ - switch_font_t *font = (switch_font_t *)calloc(1, sizeof(switch_font_t)); - - if (!font) - return NULL; - - if (!font_renderer_create_default((const void **)&font->font_driver, - &font->font_data, font_path, font_size)) - { - RARCH_WARN("Couldn't initialize font renderer.\n"); - free(font); - return NULL; - } - - font->atlas = font->font_driver->get_atlas(font->font_data); - - RARCH_LOG("Switch font driver initialized with backend %s\n", font->font_driver->ident); - - return font; -} - -static void switch_font_free_font(void *data, bool is_threaded) -{ - switch_font_t *font = (switch_font_t *)data; - - if (!font) - return; - - if (font->font_driver && font->font_data) - font->font_driver->free(font->font_data); - - free(font); -} - -static int switch_font_get_message_width(void *data, const char *msg, - unsigned msg_len, float scale) -{ - switch_font_t *font = (switch_font_t *)data; - - unsigned i; - int delta_x = 0; - - if (!font) - return 0; - - for (i = 0; i < msg_len; i++) - { - const char *msg_tmp = &msg[i]; - unsigned code = utf8_walk(&msg_tmp); - unsigned skip = msg_tmp - &msg[i]; - - if (skip > 1) - i += skip - 1; - - const struct font_glyph *glyph = - font->font_driver->get_glyph(font->font_data, code); - - if (!glyph) /* Do something smarter here ... */ - glyph = font->font_driver->get_glyph(font->font_data, '?'); - - if (!glyph) - continue; - - delta_x += glyph->advance_x; - } - - return delta_x * scale; -} - -static void switch_font_render_line( - video_frame_info_t *video_info, - switch_font_t *font, const char *msg, unsigned msg_len, - float scale, const unsigned int color, float pos_x, - float pos_y, unsigned text_align) -{ - int delta_x = 0; - int delta_y = 0; - - unsigned fbWidth = 0; - unsigned fbHeight = 0; - - uint32_t *out_buffer = (uint32_t *)gfxGetFramebuffer(&fbWidth, &fbHeight); - if (out_buffer) - { - int x = roundf(pos_x * fbWidth); - int y = roundf((1.0f - pos_y) * fbHeight); - - switch (text_align) - { - case TEXT_ALIGN_RIGHT: - x -= switch_font_get_message_width(font, msg, msg_len, scale); - break; - case TEXT_ALIGN_CENTER: - x -= switch_font_get_message_width(font, msg, msg_len, scale) / 2; - break; - } - - for (int i = 0; i < msg_len; i++) - { - int off_x, off_y, tex_x, tex_y, width, height; - const char *msg_tmp = &msg[i]; - unsigned code = utf8_walk(&msg_tmp); - unsigned skip = msg_tmp - &msg[i]; - - if (skip > 1) - i += skip - 1; - - const struct font_glyph *glyph = - font->font_driver->get_glyph(font->font_data, code); - - if (!glyph) /* Do something smarter here ... */ - glyph = font->font_driver->get_glyph(font->font_data, '?'); - - if (!glyph) - continue; - - off_x = x + glyph->draw_offset_x + delta_x; - off_y = y + glyph->draw_offset_y + delta_y; - width = glyph->width; - height = glyph->height; - - tex_x = glyph->atlas_offset_x; - tex_y = glyph->atlas_offset_y; - - for (int y = tex_y; y < tex_y + height; y++) - { - uint8_t *row = &font->atlas->buffer[y * font->atlas->width]; - for (int x = tex_x; x < tex_x + width; x++) - { - if (!row[x]) - continue; - int x1 = off_x + (x - tex_x); - int y1 = off_y + (y - tex_y); - if (x1 < fbWidth && y1 < fbHeight) - out_buffer[gfxGetFramebufferDisplayOffset(x1, y1)] = color; - } - } - - delta_x += glyph->advance_x; - delta_y += glyph->advance_y; - } - } -} - -#define AVG_GLPYH_LIMIT 140 -static void switch_font_render_message( - video_frame_info_t *video_info, - switch_font_t *font, const char *msg, float scale, - const unsigned int color, float pos_x, float pos_y, - unsigned text_align) -{ - int lines = 0; - float line_height; - - if (!msg || !*msg) - return; - - /* If the font height is not supported just draw as usual */ - if (!font->font_driver->get_line_height) - { - int msgLen = strlen(msg); - if (msgLen <= AVG_GLPYH_LIMIT) - { - switch_font_render_line(video_info, font, msg, strlen(msg), - scale, color, pos_x, pos_y, text_align); - } - return; - } - line_height = scale / font->font_driver->get_line_height(font->font_data); - - for (;;) - { - const char *delim = strchr(msg, '\n'); - - /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - if (msg_len <= AVG_GLPYH_LIMIT) - { - switch_font_render_line(video_info, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - text_align); - } - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - if (msg_len <= AVG_GLPYH_LIMIT) - { - switch_font_render_line(video_info, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - text_align); - } - break; - } - } -} - -static void switch_font_render_msg( - video_frame_info_t *video_info, - void *data, const char *msg, - const struct font_params *params) -{ - float x, y, scale, drop_mod, drop_alpha; - int drop_x, drop_y; - unsigned max_glyphs; - enum text_alignment text_align; - unsigned color, color_dark, r, g, b, - alpha, r_dark, g_dark, b_dark, alpha_dark; - switch_font_t *font = (switch_font_t *)data; - unsigned width = video_info->width; - unsigned height = video_info->height; - - if (!font || !msg || msg && !*msg) - return; - - if (params) - { - x = params->x; - y = params->y; - scale = params->scale; - text_align = params->text_align; - drop_x = params->drop_x; - drop_y = params->drop_y; - drop_mod = params->drop_mod; - drop_alpha = params->drop_alpha; - - r = FONT_COLOR_GET_RED(params->color); - g = FONT_COLOR_GET_GREEN(params->color); - b = FONT_COLOR_GET_BLUE(params->color); - alpha = FONT_COLOR_GET_ALPHA(params->color); - - color = params->color; - } - else - { - x = 0.0f; - y = 0.0f; - scale = 1.0f; - text_align = TEXT_ALIGN_LEFT; - - r = (video_info->font_msg_color_r * 255); - g = (video_info->font_msg_color_g * 255); - b = (video_info->font_msg_color_b * 255); - alpha = 255; - color = COLOR_ABGR(r, g, b, alpha); - - drop_x = -2; - drop_y = -2; - drop_mod = 0.3f; - drop_alpha = 1.0f; - } - - max_glyphs = strlen(msg); - - /*if (drop_x || drop_y) - max_glyphs *= 2; - - if (drop_x || drop_y) - { - r_dark = r * drop_mod; - g_dark = g * drop_mod; - b_dark = b * drop_mod; - alpha_dark = alpha * drop_alpha; - color_dark = COLOR_ABGR(r_dark, g_dark, b_dark, alpha_dark); - - switch_font_render_message(video_info, font, msg, scale, color_dark, - x + scale * drop_x / width, y + - scale * drop_y / height, text_align); - }*/ - - switch_font_render_message(video_info, font, msg, scale, - color, x, y, text_align); -} - -static const struct font_glyph *switch_font_get_glyph( - void *data, uint32_t code) -{ - switch_font_t *font = (switch_font_t *)data; - - if (!font || !font->font_driver) - return NULL; - - if (!font->font_driver->ident) - return NULL; - - return font->font_driver->get_glyph((void *)font->font_driver, code); -} - -static void switch_font_bind_block(void *data, void *userdata) -{ - (void)data; -} - -font_renderer_t switch_font = - { - switch_font_init_font, - switch_font_free_font, - switch_font_render_msg, - "switchfont", - switch_font_get_glyph, - switch_font_bind_block, - NULL, /* flush_block */ - switch_font_get_message_width, -}; +/* RetroArch - A frontend for libretro. + * Copyright (C) 2018 - lifajucejo + * Copyright (C) 2018 - m4xw + * Copyright (C) 2018 - natinusala + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include +#include +#include + +#include + +#include "../font_driver.h" +#include "../video_driver.h" + +#include "../../verbosity.h" + +#include "../common/switch_common.h" + +typedef struct +{ + struct font_atlas *atlas; + + const font_renderer_driver_t *font_driver; + void *font_data; +} switch_font_t; + +static void *switch_font_init_font(void *data, const char *font_path, + float font_size, bool is_threaded) +{ + switch_font_t *font = (switch_font_t *)calloc(1, sizeof(switch_font_t)); + + if (!font) + return NULL; + + if (!font_renderer_create_default((const void **)&font->font_driver, + &font->font_data, font_path, font_size)) + { + RARCH_WARN("Couldn't initialize font renderer.\n"); + free(font); + return NULL; + } + + font->atlas = font->font_driver->get_atlas(font->font_data); + + RARCH_LOG("Switch font driver initialized with backend %s\n", font->font_driver->ident); + + return font; +} + +static void switch_font_free_font(void *data, bool is_threaded) +{ + switch_font_t *font = (switch_font_t *)data; + + if (!font) + return; + + if (font->font_driver && font->font_data) + font->font_driver->free(font->font_data); + + free(font); +} + +static int switch_font_get_message_width(void *data, const char *msg, + unsigned msg_len, float scale) +{ + switch_font_t *font = (switch_font_t *)data; + + unsigned i; + int delta_x = 0; + + if (!font) + return 0; + + for (i = 0; i < msg_len; i++) + { + const char *msg_tmp = &msg[i]; + unsigned code = utf8_walk(&msg_tmp); + unsigned skip = msg_tmp - &msg[i]; + + if (skip > 1) + i += skip - 1; + + const struct font_glyph *glyph = + font->font_driver->get_glyph(font->font_data, code); + + if (!glyph) /* Do something smarter here ... */ + glyph = font->font_driver->get_glyph(font->font_data, '?'); + + if (!glyph) + continue; + + delta_x += glyph->advance_x; + } + + return delta_x * scale; +} + +static void switch_font_render_line( + video_frame_info_t *video_info, + switch_font_t *font, const char *msg, unsigned msg_len, + float scale, const unsigned int color, float pos_x, + float pos_y, unsigned text_align) +{ + switch_video_t* sw = (switch_video_t*)video_info->userdata; + + if(!sw) + return; + + int delta_x = 0; + int delta_y = 0; + + unsigned fbWidth = sw->vp.full_width; + unsigned fbHeight = sw->vp.full_height; + + if (sw->out_buffer) { + + int x = roundf(pos_x * fbWidth); + int y = roundf((1.0f - pos_y) * fbHeight); + + switch (text_align) + { + case TEXT_ALIGN_RIGHT: + x -= switch_font_get_message_width(font, msg, msg_len, scale); + break; + case TEXT_ALIGN_CENTER: + x -= switch_font_get_message_width(font, msg, msg_len, scale) / 2; + break; + } + + for (int i = 0; i < msg_len; i++) + { + int off_x, off_y, tex_x, tex_y, width, height; + const char *msg_tmp = &msg[i]; + unsigned code = utf8_walk(&msg_tmp); + unsigned skip = msg_tmp - &msg[i]; + + if (skip > 1) + i += skip - 1; + + const struct font_glyph *glyph = + font->font_driver->get_glyph(font->font_data, code); + + if (!glyph) /* Do something smarter here ... */ + glyph = font->font_driver->get_glyph(font->font_data, '?'); + + if (!glyph) + continue; + + off_x = x + glyph->draw_offset_x + delta_x; + off_y = y + glyph->draw_offset_y + delta_y; + width = glyph->width; + height = glyph->height; + + tex_x = glyph->atlas_offset_x; + tex_y = glyph->atlas_offset_y; + + for (int y = tex_y; y < tex_y + height; y++) + { + uint8_t *row = &font->atlas->buffer[y * font->atlas->width]; + for (int x = tex_x; x < tex_x + width; x++) + { + if (!row[x]) + continue; + int x1 = off_x + (x - tex_x); + int y1 = off_y + (y - tex_y); + if (x1 < fbWidth && y1 < fbHeight) + sw->out_buffer[y1 * sw->stride / sizeof(uint32_t) + x1] = color; + } + } + + delta_x += glyph->advance_x; + delta_y += glyph->advance_y; + } + } +} + +#define AVG_GLPYH_LIMIT 140 +static void switch_font_render_message( + video_frame_info_t *video_info, + switch_font_t *font, const char *msg, float scale, + const unsigned int color, float pos_x, float pos_y, + unsigned text_align) +{ + int lines = 0; + float line_height; + + if (!msg || !*msg) + return; + + /* If the font height is not supported just draw as usual */ + if (!font->font_driver->get_line_height) + { + int msgLen = strlen(msg); + if (msgLen <= AVG_GLPYH_LIMIT) + { + switch_font_render_line(video_info, font, msg, strlen(msg), + scale, color, pos_x, pos_y, text_align); + } + return; + } + line_height = scale / font->font_driver->get_line_height(font->font_data); + + for (;;) + { + const char *delim = strchr(msg, '\n'); + + /* Draw the line */ + if (delim) + { + unsigned msg_len = delim - msg; + if (msg_len <= AVG_GLPYH_LIMIT) + { + switch_font_render_line(video_info, font, msg, msg_len, + scale, color, pos_x, pos_y - (float)lines * line_height, + text_align); + } + msg += msg_len + 1; + lines++; + } + else + { + unsigned msg_len = strlen(msg); + if (msg_len <= AVG_GLPYH_LIMIT) + { + switch_font_render_line(video_info, font, msg, msg_len, + scale, color, pos_x, pos_y - (float)lines * line_height, + text_align); + } + break; + } + } +} + +static void switch_font_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, + const struct font_params *params) +{ + float x, y, scale, drop_mod, drop_alpha; + int drop_x, drop_y; + unsigned max_glyphs; + enum text_alignment text_align; + unsigned color, color_dark, r, g, b, + alpha, r_dark, g_dark, b_dark, alpha_dark; + switch_font_t *font = (switch_font_t *)data; + unsigned width = video_info->width; + unsigned height = video_info->height; + + if (!font || !msg || msg && !*msg) + return; + + if (params) + { + x = params->x; + y = params->y; + scale = params->scale; + text_align = params->text_align; + drop_x = params->drop_x; + drop_y = params->drop_y; + drop_mod = params->drop_mod; + drop_alpha = params->drop_alpha; + + r = FONT_COLOR_GET_RED(params->color); + g = FONT_COLOR_GET_GREEN(params->color); + b = FONT_COLOR_GET_BLUE(params->color); + alpha = FONT_COLOR_GET_ALPHA(params->color); + + color = params->color; + } + else + { + x = 0.0f; + y = 0.0f; + scale = 1.0f; + text_align = TEXT_ALIGN_LEFT; + + r = (video_info->font_msg_color_r * 255); + g = (video_info->font_msg_color_g * 255); + b = (video_info->font_msg_color_b * 255); + alpha = 255; + color = COLOR_ABGR(r, g, b, alpha); + + drop_x = -2; + drop_y = -2; + drop_mod = 0.3f; + drop_alpha = 1.0f; + } + + max_glyphs = strlen(msg); + + /*if (drop_x || drop_y) + max_glyphs *= 2; + + if (drop_x || drop_y) + { + r_dark = r * drop_mod; + g_dark = g * drop_mod; + b_dark = b * drop_mod; + alpha_dark = alpha * drop_alpha; + color_dark = COLOR_ABGR(r_dark, g_dark, b_dark, alpha_dark); + + switch_font_render_message(video_info, font, msg, scale, color_dark, + x + scale * drop_x / width, y + + scale * drop_y / height, text_align); + }*/ + + switch_font_render_message(video_info, font, msg, scale, + color, x, y, text_align); +} + +static const struct font_glyph *switch_font_get_glyph( + void *data, uint32_t code) +{ + switch_font_t *font = (switch_font_t *)data; + + if (!font || !font->font_driver) + return NULL; + + if (!font->font_driver->ident) + return NULL; + + return font->font_driver->get_glyph((void *)font->font_driver, code); +} + +static void switch_font_bind_block(void *data, void *userdata) +{ + (void)data; +} + +font_renderer_t switch_font = + { + switch_font_init_font, + switch_font_free_font, + switch_font_render_msg, + "switchfont", + switch_font_get_glyph, + switch_font_bind_block, + NULL, /* flush_block */ + switch_font_get_message_width, +}; diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index 5fe9a13abc..bfdfadbc4c 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -139,7 +139,6 @@ static int vulkan_get_message_width(void *data, const char *msg, if (!glyph) /* Do something smarter here ... */ glyph = font->font_driver->get_glyph(font->font_data, '?'); - if (glyph) { vulkan_raster_font_update_glyph(font, glyph); diff --git a/gfx/drivers_font/wiiu_font.c b/gfx/drivers_font/wiiu_font.c index 447360e582..74246e68ca 100644 --- a/gfx/drivers_font/wiiu_font.c +++ b/gfx/drivers_font/wiiu_font.c @@ -87,7 +87,6 @@ static void* wiiu_font_init_font(void* data, const char* font_path, GX2Invalidate(GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK, font->ubo_tex, sizeof(*font->ubo_tex)); - return font; } @@ -215,7 +214,6 @@ static void wiiu_font_render_line( if (!count) return; - GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, wiiu->vertex_cache.v + wiiu->vertex_cache.current, count * sizeof(wiiu->vertex_cache.v)); if(font->atlas->dirty) @@ -229,7 +227,6 @@ static void wiiu_font_render_line( font->atlas->dirty = false; } - GX2SetPixelTexture(&font->texture, sprite_shader.ps.samplerVars[0].location); GX2SetVertexUniformBlock(sprite_shader.vs.uniformBlocks[1].offset, sprite_shader.vs.uniformBlocks[1].size, font->ubo_tex); diff --git a/gfx/drivers_font/xdk360_fonts.cpp b/gfx/drivers_font/xdk360_fonts.cpp index cc5472ff9b..b7bc9b6f1b 100644 --- a/gfx/drivers_font/xdk360_fonts.cpp +++ b/gfx/drivers_font/xdk360_fonts.cpp @@ -35,7 +35,6 @@ #define CALCFONTFILEHEADERSIZE(x) ( sizeof(uint32_t) + (sizeof(float)* 4) + sizeof(uint16_t) + (sizeof(wchar_t)*(x)) ) #define FONTFILEVERSION 5 - #ifdef _XBOX360 struct XPR_HEADER { diff --git a/gfx/drivers_font_renderer/bitmapfont.c b/gfx/drivers_font_renderer/bitmapfont.c index 71a0996420..ed5e72d542 100644 --- a/gfx/drivers_font_renderer/bitmapfont.c +++ b/gfx/drivers_font_renderer/bitmapfont.c @@ -154,4 +154,3 @@ font_renderer_driver_t bitmap_font_renderer = { "bitmap", font_renderer_bmp_get_line_height, }; - diff --git a/gfx/drivers_font_renderer/stb_unicode.c b/gfx/drivers_font_renderer/stb_unicode.c index 8ed34eb61b..72c925b14a 100644 --- a/gfx/drivers_font_renderer/stb_unicode.c +++ b/gfx/drivers_font_renderer/stb_unicode.c @@ -145,7 +145,6 @@ static const struct font_glyph *font_renderer_stb_unicode_get_glyph( dst = (uint8_t*)self->atlas.buffer + atlas_slot->glyph.atlas_offset_x + atlas_slot->glyph.atlas_offset_y * self->atlas.width; - stbtt_MakeGlyphBitmap(&self->info, dst, self->max_glyph_width, self->max_glyph_height, self->atlas.width, self->scale_factor, self->scale_factor, glyph_index); @@ -159,7 +158,6 @@ static const struct font_glyph *font_renderer_stb_unicode_get_glyph( atlas_slot->glyph.draw_offset_x = x0 * self->scale_factor; atlas_slot->glyph.draw_offset_y = -y1 * self->scale_factor; - self->atlas.dirty = true; atlas_slot->last_used = self->usage_counter++; return &atlas_slot->glyph; @@ -262,7 +260,7 @@ static const char *font_renderer_stb_unicode_get_default_font(void) return ""; #else static const char *paths[] = { -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__WINRT__) "C:\\Windows\\Fonts\\consola.ttf", "C:\\Windows\\Fonts\\verdana.ttf", #elif defined(__APPLE__) @@ -283,7 +281,7 @@ static const char *font_renderer_stb_unicode_get_default_font(void) "vs0:data/external/font/pvf/k006004ds.ttf", "vs0:data/external/font/pvf/n023055ms.ttf", "vs0:data/external/font/pvf/n023055ts.ttf", -#else +#elif !defined(__WINRT__) "/usr/share/fonts/TTF/DejaVuSansMono.ttf", "/usr/share/fonts/TTF/DejaVuSans.ttf", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf", diff --git a/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c b/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c index cfe05f895b..32627dfee2 100644 --- a/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c +++ b/gfx/drivers_renderchain/d3d9_hlsl_renderchain.c @@ -319,7 +319,6 @@ static void hlsl_d3d9_renderchain_calc_and_set_shader_mvp( chain->chain.dev, "modelViewProj", (const void*)&matrix); } - static void hlsl_d3d9_renderchain_set_vertices( d3d9_video_t *d3d, hlsl_renderchain_t *chain, diff --git a/gfx/drivers_renderchain/d3d9_renderchain.h b/gfx/drivers_renderchain/d3d9_renderchain.h index a9c36b0e40..7e6274d0d6 100644 --- a/gfx/drivers_renderchain/d3d9_renderchain.h +++ b/gfx/drivers_renderchain/d3d9_renderchain.h @@ -414,7 +414,6 @@ static INLINE void d3d9_recompute_pass_sizes( link_info.tex_w = current_width; link_info.tex_h = current_height; - if (!d3d9_renderchain_set_pass_size(dev, (struct shader_pass*)&chain->passes->data[0], (struct shader_pass*)&chain->passes->data[ diff --git a/gfx/drivers_renderchain/gl2_renderchain.c b/gfx/drivers_renderchain/gl2_renderchain.c index 64a138218f..1e877e17c9 100644 --- a/gfx/drivers_renderchain/gl2_renderchain.c +++ b/gfx/drivers_renderchain/gl2_renderchain.c @@ -67,7 +67,7 @@ typedef struct __GLsync *GLsync; #endif #endif -typedef struct gl2_renderchain +typedef struct gl2_renderchain_data { bool egl_images; bool has_fp_fbo; @@ -89,7 +89,7 @@ typedef struct gl2_renderchain #endif struct gfx_fbo_scale fbo_scale[GFX_MAX_SHADERS]; -} gl2_renderchain_t; +} gl2_renderchain_data_t; #if (!defined(HAVE_OPENGLES) || defined(HAVE_OPENGLES3)) #ifdef GL_PIXEL_PACK_BUFFER @@ -142,7 +142,6 @@ typedef struct gl2_renderchain #endif - #ifndef GL_SYNC_GPU_COMMANDS_COMPLETE #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 #endif @@ -261,7 +260,7 @@ static void gl_check_fbo_dimension(gl_t *gl, struct video_fbo_rect *fbo_rect = &gl->fbo_rect[i]; /* Check proactively since we might suddently * get sizes of tex_w width or tex_h height. */ - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; unsigned img_width = fbo_rect->max_img_width; unsigned img_height = fbo_rect->max_img_height; unsigned max = img_width > img_height ? img_width : img_height; @@ -297,7 +296,7 @@ static void gl2_renderchain_check_fbo_dimensions( gl_t *gl, void *chain_data) { int i; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; /* Check if we have to recreate our FBO textures. */ for (i = 0; i < chain->fbo_pass; i++) @@ -327,7 +326,7 @@ static void gl2_renderchain_render( video_shader_ctx_coords_t coords; video_shader_ctx_params_t params; video_shader_ctx_info_t shader_info; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; static GLfloat fbo_tex_coords[8] = {0.0f}; struct video_tex_info fbo_tex_info[GFX_MAX_SHADERS]; struct video_tex_info *fbo_info = NULL; @@ -346,8 +345,6 @@ static void gl2_renderchain_render( * and render all passes from FBOs, to another FBO. */ for (i = 1; i < chain->fbo_pass; i++) { - video_shader_ctx_coords_t coords; - video_shader_ctx_params_t params; const struct video_fbo_rect *rect = &gl->fbo_rect[i]; prev_rect = &gl->fbo_rect[i - 1]; @@ -496,7 +493,7 @@ static void gl2_renderchain_render( static void gl2_renderchain_deinit_fbo(gl_t *gl, void *chain_data) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; if (gl) { @@ -528,7 +525,7 @@ static void gl2_renderchain_deinit_hw_render( gl_t *gl, void *chain_data) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; if (!gl) return; @@ -552,7 +549,7 @@ static void gl2_renderchain_free(gl_t *gl, void *chain_data) static bool gl_create_fbo_targets(gl_t *gl, void *chain_data) { int i; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; glBindTexture(GL_TEXTURE_2D, 0); gl2_gen_fb(chain->fbo_pass, chain->fbo); @@ -605,20 +602,20 @@ static void gl_create_fbo_texture(gl_t *gl, { GLenum mag_filter, wrap_enum; video_shader_ctx_filter_t filter_type; - video_shader_ctx_wrap_t wrap = {0}; - bool fp_fbo = false; - bool smooth = false; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; - settings_t *settings = config_get_ptr(); - GLuint base_filt = settings->bools.video_smooth ? GL_LINEAR : GL_NEAREST; - GLuint base_mip_filt = settings->bools.video_smooth ? + video_shader_ctx_wrap_t wrap = {0}; + bool fp_fbo = false; + bool smooth = false; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; + settings_t *settings = config_get_ptr(); + GLuint base_filt = settings->bools.video_smooth ? GL_LINEAR : GL_NEAREST; + GLuint base_mip_filt = settings->bools.video_smooth ? GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_NEAREST; - unsigned mip_level = i + 2; - bool mipmapped = video_shader_driver_mipmap_input(&mip_level); - GLenum min_filter = mipmapped ? base_mip_filt : base_filt; + unsigned mip_level = i + 2; + bool mipmapped = video_shader_driver_mipmap_input(&mip_level); + GLenum min_filter = mipmapped ? base_mip_filt : base_filt; - filter_type.index = i + 2; - filter_type.smooth = &smooth; + filter_type.index = i + 2; + filter_type.smooth = &smooth; if (video_shader_driver_filter_type(&filter_type)) { @@ -705,7 +702,8 @@ static void gl_create_fbo_texture(gl_t *gl, } } -static void gl_create_fbo_textures(gl_t *gl, gl2_renderchain_t *chain) +static void gl_create_fbo_textures(gl_t *gl, + gl2_renderchain_data_t *chain) { int i; @@ -737,7 +735,8 @@ static void gl2_renderchain_recompute_pass_sizes( unsigned vp_width, unsigned vp_height) { int i; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t + *chain = (gl2_renderchain_data_t*)chain_data; bool size_modified = false; GLint max_size = 0; unsigned last_width = width; @@ -808,7 +807,7 @@ static void gl2_renderchain_start_render( 0, 1, 1, 1 }; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); gl2_bind_fb(chain->fbo[0]); @@ -839,7 +838,7 @@ void gl2_renderchain_init( video_shader_ctx_scale_t scaler; video_shader_ctx_info_t shader_info; struct gfx_fbo_scale scale, scale_last; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; if (!video_shader_driver_info(&shader_info)) return; @@ -952,7 +951,7 @@ static bool gl2_renderchain_init_hw_render( GLint max_renderbuffer_size = 0; struct retro_hw_render_callback *hwr = video_driver_get_hw_context(); - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; /* We can only share texture objects through contexts. * FBOs are "abstract" objects and are not shared. */ @@ -1046,7 +1045,7 @@ static void gl2_renderchain_bind_prev_texture( void *chain_data, const struct video_tex_info *tex_info) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; memmove(gl->prev_info + 1, gl->prev_info, sizeof(*tex_info) * (gl->textures - 1)); @@ -1171,7 +1170,7 @@ error: void gl2_renderchain_free_internal(void *data, void *chain_data) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; if (!chain) return; @@ -1181,7 +1180,8 @@ void gl2_renderchain_free_internal(void *data, void *chain_data) static void *gl2_renderchain_new(void) { - gl2_renderchain_t *renderchain = (gl2_renderchain_t*)calloc(1, sizeof(*renderchain)); + gl2_renderchain_data_t *renderchain = + (gl2_renderchain_data_t*)calloc(1, sizeof(*renderchain)); if (!renderchain) return NULL; @@ -1192,7 +1192,7 @@ static void *gl2_renderchain_new(void) static void gl2_renderchain_bind_vao(void *data, void *chain_data) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; if (!chain) return; glBindVertexArray(chain->vao); @@ -1207,7 +1207,7 @@ static void gl2_renderchain_unbind_vao(void *data, static void gl2_renderchain_new_vao(void *data, void *chain_data) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; if (!chain) return; glGenVertexArrays(1, &chain->vao); @@ -1216,7 +1216,7 @@ static void gl2_renderchain_new_vao(void *data, static void gl2_renderchain_free_vao(void *data, void *chain_data) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; if (!chain) return; glDeleteVertexArrays(1, &chain->vao); @@ -1245,7 +1245,7 @@ static void gl2_renderchain_copy_frame( const void *frame, unsigned width, unsigned height, unsigned pitch) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; (void)chain; @@ -1425,7 +1425,7 @@ static void gl2_renderchain_fence_iterate( unsigned hard_sync_frames) { #ifdef HAVE_GL_SYNC - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; chain->fences[chain->fence_count++] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); @@ -1448,7 +1448,7 @@ static void gl2_renderchain_fence_free(void *data, { #ifdef HAVE_GL_SYNC unsigned i; - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; for (i = 0; i < chain->fence_count; i++) { @@ -1466,7 +1466,7 @@ static void gl2_renderchain_init_textures_reference( unsigned internal_fmt, unsigned texture_fmt, unsigned texture_type) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; (void)chain; @@ -1494,7 +1494,7 @@ static void gl2_renderchain_resolve_extensions(gl_t *gl, void *chain_data, const char *context_ident, const video_info_t *video) { - gl2_renderchain_t *chain = (gl2_renderchain_t*)chain_data; + gl2_renderchain_data_t *chain = (gl2_renderchain_data_t*)chain_data; settings_t *settings = config_get_ptr(); if (!chain) diff --git a/gfx/drivers_shader/glslang_util.cpp b/gfx/drivers_shader/glslang_util.cpp index d2e9a993f7..eb7dbfe41d 100644 --- a/gfx/drivers_shader/glslang_util.cpp +++ b/gfx/drivers_shader/glslang_util.cpp @@ -377,7 +377,6 @@ bool glslang_parse_meta(const vector &lines, glslang_meta *meta) return true; } - #if defined(HAVE_GLSLANG) bool glslang_compile_shader(const char *shader_path, glslang_output *output) { diff --git a/gfx/drivers_shader/glslang_util.h b/gfx/drivers_shader/glslang_util.h index cd26e42380..076773dece 100644 --- a/gfx/drivers_shader/glslang_util.h +++ b/gfx/drivers_shader/glslang_util.h @@ -111,4 +111,3 @@ bool glslang_parse_meta(const std::vector &lines, glslang_meta *met #endif #endif - diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index 4e89540b63..2398f780a0 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -131,7 +131,6 @@ struct uniform_cg cgGLEnableTextureParameter(param); \ } - #include "../drivers/gl_shaders/opaque.cg.h" static void gl_cg_set_uniform_parameter( @@ -207,7 +206,6 @@ static void gl_cg_set_uniform_parameter( } } - #ifdef RARCH_CG_DEBUG static void cg_error_handler(CGcontext ctx, CGerror error, void *data) { @@ -1169,7 +1167,6 @@ static void *gl_cg_init(void *data, const char *path) gl_cg_set_shaders(cg->prg[1].fprg, cg->prg[1].vprg); - gl_cg_reset_attrib(cg); return cg; @@ -1300,4 +1297,3 @@ const shader_backend_t gl_cg_backend = { RARCH_SHADER_CG, "gl_cg" }; - diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index f9bed812e8..4cf1b64c41 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -99,7 +99,6 @@ struct shader_uniforms struct shader_uniforms_frame prev[PREV_TEXTURES]; }; - static const char *glsl_prefixes[] = { "", "ruby", @@ -401,7 +400,6 @@ static bool gl_glsl_link_program(GLuint prog) return true; } - static bool gl_glsl_compile_program( void *data, unsigned idx, @@ -1412,7 +1410,6 @@ static void gl_glsl_set_params(void *dat, void *shader_data) texunit++; } - if (uni->prev[i].texture_size >= 0) glUniform2fv(uni->prev[i].texture_size, 1, prev_info[i].tex_size); diff --git a/gfx/drivers_shader/shader_glsl.h b/gfx/drivers_shader/shader_glsl.h index 311bccdc95..8633a77f26 100644 --- a/gfx/drivers_shader/shader_glsl.h +++ b/gfx/drivers_shader/shader_glsl.h @@ -14,7 +14,6 @@ * If not, see . */ - #ifndef __RARCH_GLSL_H #define __RARCH_GLSL_H diff --git a/gfx/drivers_shader/shader_vulkan.cpp b/gfx/drivers_shader/shader_vulkan.cpp index 022d4c9fb0..c674994534 100644 --- a/gfx/drivers_shader/shader_vulkan.cpp +++ b/gfx/drivers_shader/shader_vulkan.cpp @@ -29,6 +29,7 @@ #include #include "slang_reflection.h" +#include "slang_reflection.hpp" #include "../video_driver.h" #include "../../verbosity.h" @@ -3163,4 +3164,3 @@ void vulkan_filter_chain_end_frame( { chain->end_frame(cmd); } - diff --git a/gfx/drivers_shader/shader_vulkan.h b/gfx/drivers_shader/shader_vulkan.h index 7c7e07ad91..93270135e8 100644 --- a/gfx/drivers_shader/shader_vulkan.h +++ b/gfx/drivers_shader/shader_vulkan.h @@ -168,4 +168,3 @@ struct video_shader *vulkan_filter_chain_get_preset( RETRO_END_DECLS #endif - diff --git a/gfx/drivers_shader/slang_preprocess.cpp b/gfx/drivers_shader/slang_preprocess.cpp index 0119be2346..f59e62e618 100644 --- a/gfx/drivers_shader/slang_preprocess.cpp +++ b/gfx/drivers_shader/slang_preprocess.cpp @@ -95,4 +95,3 @@ bool slang_preprocess_parse_parameters(const char *shader_path, return false; return slang_preprocess_parse_parameters(meta, shader); } - diff --git a/gfx/drivers_shader/slang_preprocess.h b/gfx/drivers_shader/slang_preprocess.h index 61291e9341..f5592492d6 100644 --- a/gfx/drivers_shader/slang_preprocess.h +++ b/gfx/drivers_shader/slang_preprocess.h @@ -39,4 +39,3 @@ bool slang_preprocess_parse_parameters(glslang_meta& meta, #endif #endif - diff --git a/gfx/drivers_shader/slang_process.cpp b/gfx/drivers_shader/slang_process.cpp index 3d9f1179f2..5d9d91b563 100644 --- a/gfx/drivers_shader/slang_process.cpp +++ b/gfx/drivers_shader/slang_process.cpp @@ -12,6 +12,7 @@ #include "glslang_util.h" #include "slang_preprocess.h" #include "slang_reflection.h" +#include "slang_reflection.hpp" #include "slang_process.h" #include "../../verbosity.h" diff --git a/gfx/drivers_shader/slang_reflection.cpp b/gfx/drivers_shader/slang_reflection.cpp index 74e99774f2..79c90d8345 100644 --- a/gfx/drivers_shader/slang_reflection.cpp +++ b/gfx/drivers_shader/slang_reflection.cpp @@ -15,6 +15,7 @@ #include "spirv_cross.hpp" #include "slang_reflection.h" +#include "slang_reflection.hpp" #include #include #include @@ -679,4 +680,3 @@ bool slang_reflect_spirv(const std::vector &vertex, return false; } } - diff --git a/gfx/drivers_shader/slang_reflection.h b/gfx/drivers_shader/slang_reflection.h index 0d013c37a6..014d5b5caa 100644 --- a/gfx/drivers_shader/slang_reflection.h +++ b/gfx/drivers_shader/slang_reflection.h @@ -16,65 +16,70 @@ #ifndef SLANG_REFLECTION_H_ #define SLANG_REFLECTION_H_ -// Textures with built-in meaning. +/* Textures with built-in meaning. */ enum slang_texture_semantic { - // The input texture to the filter chain. - // Canonical name: "Original". - SLANG_TEXTURE_SEMANTIC_ORIGINAL = 0, + /* The input texture to the filter chain. + * Canonical name: "Original". */ + SLANG_TEXTURE_SEMANTIC_ORIGINAL = 0, - // The output from pass N - 1 if executing pass N, or ORIGINAL - // if pass #0 is executed. - // Canonical name: "Source". - SLANG_TEXTURE_SEMANTIC_SOURCE = 1, + /* The output from pass N - 1 if executing pass N, or ORIGINAL + * if pass #0 is executed. + * Canonical name: "Source". + */ + SLANG_TEXTURE_SEMANTIC_SOURCE = 1, - // The original inputs with a history back in time. - // Canonical name: "OriginalHistory#", e.g. "OriginalHistory2" <- Two frames back. - // "OriginalHistory0" is an alias for SEMANTIC_ORIGINAL. - // Size name: "OriginalHistorySize#". + /* The original inputs with a history back in time. + * Canonical name: "OriginalHistory#", e.g. "OriginalHistory2" <- Two frames back. + * "OriginalHistory0" is an alias for SEMANTIC_ORIGINAL. + * Size name: "OriginalHistorySize#". + */ SLANG_TEXTURE_SEMANTIC_ORIGINAL_HISTORY = 2, - // The output from pass #N, where pass #0 is the first pass. - // Canonical name: "PassOutput#", e.g. "PassOutput3". - // Size name: "PassOutputSize#". - SLANG_TEXTURE_SEMANTIC_PASS_OUTPUT = 3, + /* The output from pass #N, where pass #0 is the first pass. + * Canonical name: "PassOutput#", e.g. "PassOutput3". + * Size name: "PassOutputSize#". + */ + SLANG_TEXTURE_SEMANTIC_PASS_OUTPUT = 3, - // The output from pass #N, one frame ago where pass #0 is the first pass. - // It is not valid to use the pass feedback from a pass which is not offscreen. - // Canonical name: "PassFeedback#", e.g. "PassFeedback2". - SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK = 4, + /* The output from pass #N, one frame ago where pass #0 is the first pass. + * It is not valid to use the pass feedback from a pass which is not offscreen. + * Canonical name: "PassFeedback#", e.g. "PassFeedback2". + */ + SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK = 4, - // Inputs from static textures, defined by the user. - // There is no canonical name, and the only way to use these semantics are by - // remapping. - SLANG_TEXTURE_SEMANTIC_USER = 5, + /* Inputs from static textures, defined by the user. + * There is no canonical name, and the only way to use these semantics are by + * remapping. + */ + SLANG_TEXTURE_SEMANTIC_USER = 5, SLANG_NUM_TEXTURE_SEMANTICS, - SLANG_INVALID_TEXTURE_SEMANTIC = -1 + SLANG_INVALID_TEXTURE_SEMANTIC = -1 }; enum slang_semantic { - // mat4, MVP - SLANG_SEMANTIC_MVP = 0, - // vec4, viewport size of current pass - SLANG_SEMANTIC_OUTPUT = 1, - // vec4, viewport size of final pass - SLANG_SEMANTIC_FINAL_VIEWPORT = 2, - // uint, frame count with modulo - SLANG_SEMANTIC_FRAME_COUNT = 3, + /* mat4, MVP */ + SLANG_SEMANTIC_MVP = 0, + /* vec4, viewport size of current pass */ + SLANG_SEMANTIC_OUTPUT = 1, + /* vec4, viewport size of final pass */ + SLANG_SEMANTIC_FINAL_VIEWPORT = 2, + /* uint, frame count with modulo */ + SLANG_SEMANTIC_FRAME_COUNT = 3, SLANG_NUM_BASE_SEMANTICS, - // float, user defined parameter, arrayed + /* float, user defined parameter, arrayed */ SLANG_SEMANTIC_FLOAT_PARAMETER = 4, SLANG_NUM_SEMANTICS, - SLANG_INVALID_SEMANTIC = -1 + SLANG_INVALID_SEMANTIC = -1 }; enum slang_stage { - SLANG_STAGE_VERTEX_MASK = 1 << 0, + SLANG_STAGE_VERTEX_MASK = 1 << 0, SLANG_STAGE_FRAGMENT_MASK = 1 << 1 }; @@ -88,75 +93,4 @@ enum slang_constant_buffer /* Vulkan minimum limit. */ #define SLANG_NUM_BINDINGS 16 -#ifdef __cplusplus - -#include -#include -#include -#include - -struct slang_texture_semantic_meta -{ - size_t ubo_offset = 0; - size_t push_constant_offset = 0; - unsigned binding = 0; - uint32_t stage_mask = 0; - - bool texture = false; - bool uniform = false; - bool push_constant = false; -}; - -struct slang_semantic_meta -{ - size_t ubo_offset = 0; - size_t push_constant_offset = 0; - unsigned num_components = 0; - bool uniform = false; - bool push_constant = false; -}; - -struct slang_texture_semantic_map -{ - slang_texture_semantic semantic; - unsigned index; -}; - -struct slang_semantic_map -{ - slang_semantic semantic; - unsigned index; -}; - -struct slang_reflection -{ - slang_reflection(); - - size_t ubo_size = 0; - size_t push_constant_size = 0; - - unsigned ubo_binding = 0; - uint32_t ubo_stage_mask = 0; - uint32_t push_constant_stage_mask = 0; - - std::vector semantic_textures[SLANG_NUM_TEXTURE_SEMANTICS]; - slang_semantic_meta semantics[SLANG_NUM_SEMANTICS]; - std::vector semantic_float_parameters; - - const std::unordered_map *texture_semantic_map = nullptr; - const std::unordered_map *texture_semantic_uniform_map = nullptr; - const std::unordered_map *semantic_map = nullptr; - unsigned pass_number = 0; -}; - -bool slang_reflect_spirv(const std::vector &vertex, - const std::vector &fragment, - slang_reflection *reflection); - -bool slang_reflect(const spirv_cross::Compiler &vertex_compiler, const spirv_cross::Compiler &fragment_compiler, - const spirv_cross::ShaderResources &vertex, const spirv_cross::ShaderResources &fragment, - slang_reflection *reflection); - #endif -#endif - diff --git a/gfx/drivers_shader/slang_reflection.hpp b/gfx/drivers_shader/slang_reflection.hpp new file mode 100644 index 0000000000..c424899317 --- /dev/null +++ b/gfx/drivers_shader/slang_reflection.hpp @@ -0,0 +1,86 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2019 - Hans-Kristian Arntzen + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#ifndef SLANG_REFLECTION_HPP_ +#define SLANG_REFLECTION_HPP_ + +#include +#include +#include +#include + +struct slang_texture_semantic_meta +{ + size_t ubo_offset = 0; + size_t push_constant_offset = 0; + unsigned binding = 0; + uint32_t stage_mask = 0; + + bool texture = false; + bool uniform = false; + bool push_constant = false; +}; + +struct slang_semantic_meta +{ + size_t ubo_offset = 0; + size_t push_constant_offset = 0; + unsigned num_components = 0; + bool uniform = false; + bool push_constant = false; +}; + +struct slang_texture_semantic_map +{ + slang_texture_semantic semantic; + unsigned index; +}; + +struct slang_semantic_map +{ + slang_semantic semantic; + unsigned index; +}; + +struct slang_reflection +{ + slang_reflection(); + + size_t ubo_size = 0; + size_t push_constant_size = 0; + + unsigned ubo_binding = 0; + uint32_t ubo_stage_mask = 0; + uint32_t push_constant_stage_mask = 0; + + std::vector semantic_textures[SLANG_NUM_TEXTURE_SEMANTICS]; + slang_semantic_meta semantics[SLANG_NUM_SEMANTICS]; + std::vector semantic_float_parameters; + + const std::unordered_map *texture_semantic_map = nullptr; + const std::unordered_map *texture_semantic_uniform_map = nullptr; + const std::unordered_map *semantic_map = nullptr; + unsigned pass_number = 0; +}; + +bool slang_reflect_spirv(const std::vector &vertex, + const std::vector &fragment, + slang_reflection *reflection); + +bool slang_reflect(const spirv_cross::Compiler &vertex_compiler, const spirv_cross::Compiler &fragment_compiler, + const spirv_cross::ShaderResources &vertex, const spirv_cross::ShaderResources &fragment, + slang_reflection *reflection); + +#endif diff --git a/gfx/drivers_tracker/video_state_python.c b/gfx/drivers_tracker/video_state_python.c index 3e4e1afb99..8c95734771 100644 --- a/gfx/drivers_tracker/video_state_python.c +++ b/gfx/drivers_tracker/video_state_python.c @@ -104,7 +104,6 @@ static PyObject* py_read_vram(PyObject *self, PyObject *args) return PyLong_FromLong(data[addr]); } - static PyObject *py_read_input(PyObject *self, PyObject *args) { unsigned user, key, i; diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 8eaf1d2447..ccdb45b92c 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -464,6 +464,36 @@ static bool d3d12_font_init_first( } #endif +#ifdef PS2 +static const font_renderer_t *ps2_font_backends[] = { + &ps2_font +}; + +static bool ps2_font_init_first( + const void **font_driver, void **font_handle, + void *video_data, const char *font_path, + float font_size, bool is_threaded) +{ + unsigned i; + + for (i = 0; ps2_font_backends[i]; i++) + { + void *data = ps2_font_backends[i]->init( + video_data, font_path, font_size, + is_threaded); + + if (!data) + continue; + + *font_driver = ps2_font_backends[i]; + *font_handle = data; + return true; + } + + return false; +} +#endif + #ifdef HAVE_VITA2D static const font_renderer_t *vita2d_font_backends[] = { &vita2d_vita_font @@ -641,6 +671,11 @@ static bool font_init_first( return vita2d_font_init_first(font_driver, font_handle, video_data, font_path, font_size, is_threaded); #endif +#ifdef PS2 + case FONT_DRIVER_RENDER_PS2: + return ps2_font_init_first(font_driver, font_handle, + video_data, font_path, font_size, is_threaded); +#endif #ifdef _3DS case FONT_DRIVER_RENDER_CTR: return ctr_font_init_first(font_driver, font_handle, @@ -767,7 +802,7 @@ static INLINE unsigned font_get_replacement(const char* src, const char* start) unsigned result = 0; bool prev_connected = false; bool next_connected = false; - unsigned char id = (src[0] << 6) | (src[1] & 0x3F); + unsigned char id = ((unsigned char)src[0] << 6) | ((unsigned char)src[1] & 0x3F); const char* prev1 = src - 2; const char* prev2 = src - 4; @@ -786,7 +821,7 @@ static INLINE unsigned font_get_replacement(const char* src, const char* start) unsigned char prev1_id = 0; if (prev1) - prev1_id = (prev1[0] << 6) | (prev1[1] & 0x3F); + prev1_id = ((unsigned char)prev1[0] << 6) | ((unsigned char)prev1[1] & 0x3F); if (prev1_id == 0x44) { @@ -816,7 +851,7 @@ static INLINE unsigned font_get_replacement(const char* src, const char* start) if ((src[2] & 0xFC) == 0xD8) { - unsigned char next_id = (src[2] << 6) | (src[3] & 0x3F); + unsigned char next_id = ((unsigned char)src[2] << 6) | ((unsigned char)src[3] & 0x3F); if (next_id > 0x20 || next_id < 0x50) next_connected = true; @@ -847,8 +882,13 @@ static char* font_driver_reshape_msg(const char* msg) { src--; while (IS_MBCONT(src)) + { src--; + if (src == (const unsigned char*)msg) + goto end; + } + if (IS_RTL(src) || IS_DIR_NEUTRAL(src)) { unsigned replacement = font_get_replacement((const char*)src, msg); @@ -910,7 +950,7 @@ static char* font_driver_reshape_msg(const char* msg) *dst++ = *src++; } } - +end: *dst = '\0'; return (char*)buffer; @@ -958,7 +998,6 @@ void font_driver_flush(unsigned width, unsigned height, void *font_data, font->renderer->flush(width, height, font->renderer_data, video_info); } - int font_driver_get_message_width(void *font_data, const char *msg, unsigned len, float scale) { @@ -1023,7 +1062,6 @@ font_data_t *font_driver_init_first( return NULL; } - void font_driver_init_osd( void *video_data, bool threading_hint, diff --git a/gfx/font_driver.h b/gfx/font_driver.h index 03f08c6d54..499c0a16e1 100644 --- a/gfx/font_driver.h +++ b/gfx/font_driver.h @@ -161,6 +161,7 @@ extern font_renderer_t libdbg_font; extern font_renderer_t d3d_xbox360_font; extern font_renderer_t d3d_xdk1_font; extern font_renderer_t d3d_win32_font; +extern font_renderer_t ps2_font; extern font_renderer_t vita2d_vita_font; extern font_renderer_t ctr_font; extern font_renderer_t wiiu_font; diff --git a/gfx/include/GL/glext.h b/gfx/include/GL/glext.h index a0d2948292..2a38dad599 100644 --- a/gfx/include/GL/glext.h +++ b/gfx/include/GL/glext.h @@ -6138,7 +6138,6 @@ extern "C" { #define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 #endif - /*************************************************************/ #include @@ -12732,7 +12731,6 @@ typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum int typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); #endif - #ifdef __cplusplus } #endif diff --git a/gfx/include/d3d8/d3d8.h b/gfx/include/d3d8/d3d8.h index 4bfff6d4f0..cefb9d3137 100644 --- a/gfx/include/d3d8/d3d8.h +++ b/gfx/include/d3d8/d3d8.h @@ -25,7 +25,6 @@ #define D3D_SDK_VERSION 220 - #include #define COM_NO_WINDOWS_H @@ -116,7 +115,6 @@ interface IDirect3DSwapChain8; #endif - typedef interface IDirect3D8 IDirect3D8; typedef interface IDirect3DDevice8 IDirect3DDevice8; typedef interface IDirect3DResource8 IDirect3DResource8; @@ -133,7 +131,6 @@ typedef interface IDirect3DSwapChain8 IDirect3DSwapChain8; #include "d3d8types.h" #include "d3d8caps.h" - #ifdef __cplusplus extern "C" { #endif @@ -1130,7 +1127,6 @@ typedef struct IDirect3DVolume8 *LPDIRECT3DVOLUME8, *PDIRECT3DVOLUME8; #define D3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100L - /**************************************************************************** * * Parameter for IDirect3D8::CreateDevice's iAdapter diff --git a/gfx/include/d3d8/d3dx8core.h b/gfx/include/d3d8/d3dx8core.h index 7542f28924..b8f935ec00 100644 --- a/gfx/include/d3d8/d3dx8core.h +++ b/gfx/include/d3d8/d3dx8core.h @@ -11,8 +11,6 @@ #ifndef __D3DX8CORE_H__ #define __D3DX8CORE_H__ - - /* * ID3DXBuffer: * ------------ @@ -79,7 +77,6 @@ typedef interface ID3DXFont *LPD3DXFONT; DEFINE_GUID( IID_ID3DXFont, 0x89fad6a5, 0x24d, 0x49af, 0x8f, 0xe7, 0xf5, 0x11, 0x23, 0xb8, 0x5e, 0x25); - #undef INTERFACE #define INTERFACE ID3DXFont @@ -111,7 +108,6 @@ DECLARE_INTERFACE_(ID3DXFont, IUnknown) #endif #endif - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -122,7 +118,6 @@ HRESULT WINAPI HFONT hFont, LPD3DXFONT* ppFont); - HRESULT WINAPI D3DXCreateFontIndirect( LPDIRECT3DDEVICE8 pDevice, @@ -158,12 +153,10 @@ HRESULT WINAPI typedef interface ID3DXSprite ID3DXSprite; typedef interface ID3DXSprite *LPD3DXSPRITE; - /* {13D69D15-F9B0-4e0f-B39E-C91EB33F6CE7} */ DEFINE_GUID( IID_ID3DXSprite, 0x13d69d15, 0xf9b0, 0x4e0f, 0xb3, 0x9e, 0xc9, 0x1e, 0xb3, 0x3f, 0x6c, 0xe7); - #undef INTERFACE #define INTERFACE ID3DXSprite @@ -194,12 +187,10 @@ DECLARE_INTERFACE_(ID3DXSprite, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - HRESULT WINAPI D3DXCreateSprite( LPDIRECT3DDEVICE8 pDevice, @@ -209,9 +200,6 @@ HRESULT WINAPI } #endif /* __cplusplus */ - - - /* * ID3DXRenderToSurface: * --------------------- @@ -240,7 +228,6 @@ typedef struct _D3DXRTS_DESC } D3DXRTS_DESC; - typedef interface ID3DXRenderToSurface ID3DXRenderToSurface; typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE; @@ -269,7 +256,6 @@ DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -288,8 +274,6 @@ HRESULT WINAPI } #endif /* __cplusplus */ - - /* * ID3DXRenderToEnvMap: * -------------------- @@ -326,7 +310,6 @@ typedef struct _D3DXRTE_DESC D3DFORMAT DepthStencilFormat; } D3DXRTE_DESC; - typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap; typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap; @@ -334,7 +317,6 @@ typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap; DEFINE_GUID( IID_ID3DXRenderToEnvMap, 0x4e42c623, 0x9451, 0x44b7, 0x8c, 0x86, 0xab, 0xcc, 0xde, 0x5d, 0x52, 0xc8); - #undef INTERFACE #define INTERFACE ID3DXRenderToEnvMap @@ -370,7 +352,6 @@ DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -388,8 +369,6 @@ HRESULT WINAPI } #endif /* __cplusplus */ - - /* * Shader assemblers: */ @@ -410,7 +389,6 @@ HRESULT WINAPI #define D3DXASM_DEBUG (1 << 0) #define D3DXASM_SKIPVALIDATION (1 << 1) - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -497,13 +475,10 @@ HRESULT WINAPI LPD3DXBUFFER* ppCompiledShader, LPD3DXBUFFER* ppCompilationErrors); - #ifdef __cplusplus } #endif /* __cplusplus */ - - /* * Misc APIs: */ @@ -545,8 +520,6 @@ HRESULT WINAPI #define D3DXGetErrorString D3DXGetErrorStringA #endif - - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gfx/include/d3d8/d3dx8effect.h b/gfx/include/d3d8/d3dx8effect.h index 45b4fc8be9..7fbb9991a7 100644 --- a/gfx/include/d3d8/d3dx8effect.h +++ b/gfx/include/d3d8/d3dx8effect.h @@ -11,10 +11,8 @@ #ifndef __D3DX8EFFECT_H__ #define __D3DX8EFFECT_H__ - #define D3DXFX_DONOTSAVESTATE (1 << 0) - typedef enum _D3DXPARAMETERTYPE { D3DXPT_DWORD = 0, @@ -30,7 +28,6 @@ typedef enum _D3DXPARAMETERTYPE } D3DXPARAMETERTYPE; - typedef struct _D3DXEFFECT_DESC { UINT Parameters; @@ -38,7 +35,6 @@ typedef struct _D3DXEFFECT_DESC } D3DXEFFECT_DESC; - typedef struct _D3DXPARAMETER_DESC { LPCSTR Name; @@ -47,7 +43,6 @@ typedef struct _D3DXPARAMETER_DESC } D3DXPARAMETER_DESC; - typedef struct _D3DXTECHNIQUE_DESC { LPCSTR Name; @@ -56,7 +51,6 @@ typedef struct _D3DXTECHNIQUE_DESC } D3DXTECHNIQUE_DESC; - typedef struct _D3DXPASS_DESC { LPCSTR Name; @@ -64,8 +58,6 @@ typedef struct _D3DXPASS_DESC } D3DXPASS_DESC; - - /* * ID3DXEffect */ @@ -77,7 +69,6 @@ typedef interface ID3DXEffect *LPD3DXEFFECT; DEFINE_GUID( IID_ID3DXEffect, 0x648b1ceb, 0x8d4e, 0x4d66, 0xb6, 0xfa, 0xe4, 0x49, 0x69, 0xe8, 0x2e, 0x89); - #undef INTERFACE #define INTERFACE ID3DXEffect @@ -127,18 +118,14 @@ DECLARE_INTERFACE_(ID3DXEffect, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - - /* * APIs */ - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /* * D3DXCreateEffect: * ----------------- @@ -185,7 +172,6 @@ HRESULT WINAPI #define D3DXCreateEffectFromFile D3DXCreateEffectFromFileA #endif - HRESULT WINAPI D3DXCreateEffectFromResourceA( LPDIRECT3DDEVICE8 pDevice, @@ -208,7 +194,6 @@ HRESULT WINAPI #define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceA #endif - HRESULT WINAPI D3DXCreateEffect( LPDIRECT3DDEVICE8 pDevice, @@ -217,7 +202,6 @@ HRESULT WINAPI LPD3DXEFFECT* ppEffect, LPD3DXBUFFER* ppCompilationErrors); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gfx/include/d3d8/d3dx8math.h b/gfx/include/d3d8/d3dx8math.h index c126258db3..b4764488b6 100644 --- a/gfx/include/d3d8/d3dx8math.h +++ b/gfx/include/d3d8/d3dx8math.h @@ -26,8 +26,6 @@ #define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0f)) #define D3DXToDegree( radian ) ((radian) * (180.0f / D3DX_PI)) - - /* * * Vectors @@ -70,13 +68,11 @@ public: BOOL operator == ( CONST D3DXVECTOR2& ) const; BOOL operator != ( CONST D3DXVECTOR2& ) const; - public: #endif /* __cplusplus */ FLOAT x, y; } D3DXVECTOR2, *LPD3DXVECTOR2; - /* * 3D Vector */ @@ -120,7 +116,6 @@ public: typedef struct _D3DVECTOR D3DXVECTOR3, *LPD3DXVECTOR3; #endif /* !__cplusplus */ - /* * 4D Vector */ @@ -162,7 +157,6 @@ public: FLOAT x, y, z, w; } D3DXVECTOR4, *LPD3DXVECTOR4; - /* * * Matrices @@ -180,7 +174,6 @@ public: FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); - /* access grants */ FLOAT& operator () ( UINT Row, UINT Col ); FLOAT operator () ( UINT Row, UINT Col ) const; @@ -362,7 +355,6 @@ public: FLOAT x, y, z, w; } D3DXQUATERNION, *LPD3DXQUATERNION; - /* * * Planes @@ -392,7 +384,6 @@ public: FLOAT a, b, c, d; } D3DXPLANE, *LPD3DXPLANE; - /* * * Colors @@ -446,8 +437,6 @@ public: FLOAT r, g, b, a; } D3DXCOLOR, *LPD3DXCOLOR; - - /* * * D3DX math functions: @@ -707,7 +696,6 @@ D3DXVECTOR4* WINAPI D3DXVec4Transform } #endif - /* * 4D Matrix */ @@ -720,7 +708,6 @@ D3DXMATRIX* D3DXMatrixIdentity BOOL D3DXMatrixIsIdentity ( CONST D3DXMATRIX *pM ); - /* non-inline */ #ifdef __cplusplus extern "C" { @@ -780,7 +767,6 @@ D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion D3DXMATRIX* WINAPI D3DXMatrixRotationYawPitchRoll ( D3DXMATRIX *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll ); - /* Build transformation matrix. NULL arguments are treated as identity. * Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt */ D3DXMATRIX* WINAPI D3DXMatrixTransformation @@ -863,7 +849,6 @@ D3DXMATRIX* WINAPI D3DXMatrixReflect } #endif - /* * Quaternion */ @@ -891,7 +876,6 @@ BOOL D3DXQuaternionIsIdentity D3DXQUATERNION* D3DXQuaternionConjugate ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); - /* non-inline */ #ifdef __cplusplus extern "C" { @@ -969,7 +953,6 @@ D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric } #endif - /* * Plane */ @@ -1021,7 +1004,6 @@ D3DXPLANE* WINAPI D3DXPlaneTransform } #endif - /* * Color */ @@ -1097,7 +1079,6 @@ typedef interface ID3DXMatrixStack *LPD3DXMATRIXSTACK; DEFINE_GUID( IID_ID3DXMatrixStack, 0xe3357330, 0xcc5e, 0x11d2, 0xa4, 0x34, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); - #undef INTERFACE #define INTERFACE ID3DXMatrixStack diff --git a/gfx/include/d3d8/d3dx8mesh.h b/gfx/include/d3d8/d3dx8mesh.h index 41e623cabf..e5e08624e9 100644 --- a/gfx/include/d3d8/d3dx8mesh.h +++ b/gfx/include/d3d8/d3dx8mesh.h @@ -140,7 +140,6 @@ typedef struct _D3DXWELDEPSILONS typedef D3DXWELDEPSILONS* LPD3DXWELDEPSILONS; - #undef INTERFACE #define INTERFACE ID3DXBaseMesh @@ -177,7 +176,6 @@ DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown) STDMETHOD(GenerateAdjacency)(THIS_ FLOAT Epsilon, DWORD* pAdjacency) PURE; }; - #undef INTERFACE #define INTERFACE ID3DXMesh @@ -224,7 +222,6 @@ DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh) }; - #undef INTERFACE #define INTERFACE ID3DXPMesh @@ -284,7 +281,6 @@ DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh) STDMETHOD(GetAdjacency)(THIS_ DWORD* pAdjacency) PURE; }; - #undef INTERFACE #define INTERFACE ID3DXSPMesh @@ -343,7 +339,6 @@ typedef struct _D3DXBONECOMBINATION DWORD* BoneId; } D3DXBONECOMBINATION, *LPD3DXBONECOMBINATION; - #undef INTERFACE #define INTERFACE ID3DXSkinMesh @@ -498,7 +493,6 @@ HRESULT WINAPI DWORD NumBytes, LPD3DXBUFFER *ppBuffer); - HRESULT WINAPI D3DXLoadMeshFromX( LPSTR pFilename, @@ -638,7 +632,6 @@ typedef struct _D3DXINTERSECTINFO FLOAT Dist; /* Ray-Intersection Parameter Distance */ } D3DXINTERSECTINFO, *LPD3DXINTERSECTINFO; - HRESULT WINAPI D3DXIntersect( LPD3DXBASEMESH pMesh, @@ -666,7 +659,6 @@ HRESULT WINAPI LPD3DXBUFFER *ppAllHits, /* Array of D3DXINTERSECTINFOs for all hits (not just closest) */ DWORD *pCountOfHits); /* Number of entries in AllHits array */ - HRESULT WINAPI D3DXSplitMesh ( CONST LPD3DXMESH pMeshIn, @@ -715,7 +707,6 @@ enum _D3DXERR { D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906), }; - #define D3DX_COMP_TANGENT_NONE 0xFFFFFFFF HRESULT WINAPI D3DXComputeTangent(LPD3DXMESH InMesh, @@ -748,11 +739,8 @@ D3DXConvertMeshSubsetToStrips DWORD *pNumStrips ); - #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __D3DX8MESH_H__ */ - - diff --git a/gfx/include/d3d8/d3dx8shape.h b/gfx/include/d3d8/d3dx8shape.h index c8b982dc8c..545c82583d 100644 --- a/gfx/include/d3d8/d3dx8shape.h +++ b/gfx/include/d3d8/d3dx8shape.h @@ -43,7 +43,6 @@ HRESULT WINAPI LPD3DXMESH* ppMesh, LPD3DXBUFFER* ppAdjacency); - /* * D3DXCreateBox: * -------------- @@ -68,7 +67,6 @@ HRESULT WINAPI LPD3DXMESH* ppMesh, LPD3DXBUFFER* ppAdjacency); - /* * D3DXCreateCylinder: * ------------------- @@ -98,7 +96,6 @@ HRESULT WINAPI LPD3DXMESH* ppMesh, LPD3DXBUFFER* ppAdjacency); - /*------------------------------------------------------------------------- * D3DXCreateSphere: * ----------------- @@ -124,7 +121,6 @@ HRESULT WINAPI LPD3DXMESH* ppMesh, LPD3DXBUFFER* ppAdjacency); - /*------------------------------------------------------------------------- * D3DXCreateTorus: * ---------------- @@ -152,7 +148,6 @@ HRESULT WINAPI LPD3DXMESH* ppMesh, LPD3DXBUFFER* ppAdjacency); - /*------------------------------------------------------------------------- * D3DXCreateTeapot: * ----------------- @@ -171,7 +166,6 @@ HRESULT WINAPI LPD3DXMESH* ppMesh, LPD3DXBUFFER* ppAdjacency); - /*------------------------------------------------------------------------- * D3DXCreateText: * --------------- @@ -217,7 +211,6 @@ HRESULT WINAPI #define D3DXCreateText D3DXCreateTextA #endif - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gfx/include/d3d8/d3dx8tex.h b/gfx/include/d3d8/d3dx8tex.h index 0a2526996f..70ed0583af 100644 --- a/gfx/include/d3d8/d3dx8tex.h +++ b/gfx/include/d3d8/d3dx8tex.h @@ -121,9 +121,6 @@ #define D3DX_CHANNEL_ALPHA (1 << 3) #define D3DX_CHANNEL_LUMINANCE (1 << 4) - - - /* * D3DXIMAGE_FILEFORMAT: * --------------------- @@ -144,7 +141,6 @@ typedef enum _D3DXIMAGE_FILEFORMAT } D3DXIMAGE_FILEFORMAT; - /* * LPD3DXFILL2D and LPD3DXFILL3D: * ------------------------------ @@ -251,7 +247,6 @@ HRESULT WINAPI #define D3DXGetImageInfoFromFile D3DXGetImageInfoFromFileA #endif - HRESULT WINAPI D3DXGetImageInfoFromResourceA( HMODULE hSrcModule, @@ -270,7 +265,6 @@ HRESULT WINAPI #define D3DXGetImageInfoFromResource D3DXGetImageInfoFromResourceA #endif - HRESULT WINAPI D3DXGetImageInfoFromFileInMemory( LPCVOID pSrcData, @@ -348,8 +342,6 @@ HRESULT WINAPI #define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileA #endif - - HRESULT WINAPI D3DXLoadSurfaceFromResourceA( LPDIRECT3DSURFACE8 pDestSurface, @@ -374,15 +366,12 @@ HRESULT WINAPI D3DCOLOR ColorKey, D3DXIMAGE_INFO* pSrcInfo); - #ifdef UNICODE #define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceW #else #define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceA #endif - - HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory( LPDIRECT3DSURFACE8 pDestSurface, @@ -482,7 +471,6 @@ HRESULT WINAPI DWORD Filter, D3DCOLOR ColorKey); - /* * D3DXSaveSurfaceToFile: * ---------------------- @@ -595,7 +583,6 @@ HRESULT WINAPI #define D3DXLoadVolumeFromFile D3DXLoadVolumeFromFileA #endif - HRESULT WINAPI D3DXLoadVolumeFromResourceA( LPDIRECT3DVOLUME8 pDestVolume, @@ -626,8 +613,6 @@ HRESULT WINAPI #define D3DXLoadVolumeFromResource D3DXLoadVolumeFromResourceA #endif - - HRESULT WINAPI D3DXLoadVolumeFromFileInMemory( LPDIRECT3DVOLUME8 pDestVolume, @@ -829,7 +814,6 @@ HRESULT WINAPI D3DFORMAT* pFormat, D3DPOOL Pool); - /* * D3DXCreateTexture: * ------------------ @@ -961,7 +945,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromFile D3DXCreateTextureFromFileA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromFileA( LPDIRECT3DDEVICE8 pDevice, @@ -980,7 +963,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromFileA( LPDIRECT3DDEVICE8 pDevice, @@ -1021,7 +1003,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromResourceA( LPDIRECT3DDEVICE8 pDevice, @@ -1042,7 +1023,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromResource D3DXCreateCubeTextureFromResourceA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA( LPDIRECT3DDEVICE8 pDevice, @@ -1105,7 +1085,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromFileExA( LPDIRECT3DDEVICE8 pDevice, @@ -1144,7 +1123,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA( LPDIRECT3DDEVICE8 pDevice, @@ -1231,7 +1209,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA( LPDIRECT3DDEVICE8 pDevice, @@ -1272,7 +1249,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromResourceEx D3DXCreateCubeTextureFromResourceExA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA( LPDIRECT3DDEVICE8 pDevice, @@ -1340,7 +1316,6 @@ HRESULT WINAPI UINT SrcDataSize, LPDIRECT3DVOLUMETEXTURE8* ppVolumeTexture); - /* FromFileInMemoryEx */ HRESULT WINAPI @@ -1531,9 +1506,6 @@ HRESULT WINAPI DWORD Channel, FLOAT Amplitude); - - - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gfx/include/d3d9.h b/gfx/include/d3d9.h index 5dc0e93015..6b2db5ab93 100644 --- a/gfx/include/d3d9.h +++ b/gfx/include/d3d9.h @@ -17,7 +17,6 @@ /* include this file content only if compiling for DX9 interfaces */ #if(DIRECT3D_VERSION >= 0x0900) - /* This identifier is passed to Direct3DCreate9 in order to ensure that an * application was built against the correct header files. This number is * incremented whenever a header (or other) change would require applications @@ -26,7 +25,6 @@ #define D3D_SDK_VERSION 31 - #include #define COM_NO_WINDOWS_H @@ -114,7 +112,6 @@ DEFINE_GUID(IID_IDirect3DStateBlock9, 0xb07c4fe5, 0x310d, 0x4ba8, 0xa2, 0x3c, 0x /* {d9771460-a695-4f26-bbd3-27b840b541cc} */ DEFINE_GUID(IID_IDirect3DQuery9, 0xd9771460, 0xa695, 0x4f26, 0xbb, 0xd3, 0x27, 0xb8, 0x40, 0xb5, 0x41, 0xcc); - #endif #ifdef __cplusplus @@ -149,7 +146,6 @@ interface DECLSPEC_UUID("24F416E6-1F67-4aa7-B88E-D33F6F3128A1") IDirect3DVolume9 interface DECLSPEC_UUID("794950F2-ADFC-458a-905E-10A10B0B503B") IDirect3DSwapChain9; interface DECLSPEC_UUID("d9771460-a695-4f26-bbd3-27b840b541cc") IDirect3DQuery9; - #if defined(_COM_SMARTPTR_TYPEDEF) _COM_SMARTPTR_TYPEDEF(IDirect3D9, __uuidof(IDirect3D9)); _COM_SMARTPTR_TYPEDEF(IDirect3DDevice9, __uuidof(IDirect3DDevice9)); @@ -176,7 +172,6 @@ _COM_SMARTPTR_TYPEDEF(IDirect3DQuery9, __uuidof(IDirect3DQuery9)); #endif #endif - typedef interface IDirect3D9 IDirect3D9; typedef interface IDirect3DDevice9 IDirect3DDevice9; typedef interface IDirect3DStateBlock9 IDirect3DStateBlock9; @@ -212,15 +207,10 @@ extern "C" { IDirect3D9 * WINAPI Direct3DCreate9(UINT SDKVersion); - /* * Direct3D interfaces */ - - - - #undef INTERFACE #define INTERFACE IDirect3D9 @@ -288,28 +278,8 @@ typedef struct IDirect3D9 *LPDIRECT3D9, *PDIRECT3D9; #define IDirect3D9_CreateDevice(p,a,b,c,d,e,f) (p)->CreateDevice(a,b,c,d,e,f) #endif - - - - - - /* SwapChain */ - - - - - - - - - - - - - - #undef INTERFACE #define INTERFACE IDirect3DDevice9 @@ -683,7 +653,6 @@ typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9, *PDIRECT3DDEVICE9; #define IDirect3DDevice9_CreateQuery(p,a,b) (p)->CreateQuery(a,b) #endif - #undef INTERFACE #define INTERFACE IDirect3DStateBlock9 @@ -718,8 +687,6 @@ typedef struct IDirect3DStateBlock9 *LPDIRECT3DSTATEBLOCK9, *PDIRECT3DSTATEBLOCK #define IDirect3DStateBlock9_Apply(p) (p)->Apply() #endif - - #undef INTERFACE #define INTERFACE IDirect3DSwapChain9 @@ -766,8 +733,6 @@ typedef struct IDirect3DSwapChain9 *LPDIRECT3DSWAPCHAIN9, *PDIRECT3DSWAPCHAIN9; #define IDirect3DSwapChain9_GetPresentParameters(p,a) (p)->GetPresentParameters(a) #endif - - #undef INTERFACE #define INTERFACE IDirect3DResource9 @@ -817,8 +782,6 @@ typedef struct IDirect3DResource9 *LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9; #define IDirect3DResource9_GetType(p) (p)->GetType() #endif - - #undef INTERFACE #define INTERFACE IDirect3DVertexDeclaration9 @@ -850,8 +813,6 @@ typedef struct IDirect3DVertexDeclaration9 *LPDIRECT3DVERTEXDECLARATION9, *PDIRE #define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b) (p)->GetDeclaration(a,b) #endif - - #undef INTERFACE #define INTERFACE IDirect3DVertexShader9 @@ -883,8 +844,6 @@ typedef struct IDirect3DVertexShader9 *LPDIRECT3DVERTEXSHADER9, *PDIRECT3DVERTEX #define IDirect3DVertexShader9_GetFunction(p,a,b) (p)->GetFunction(a,b) #endif - - #undef INTERFACE #define INTERFACE IDirect3DPixelShader9 @@ -916,9 +875,6 @@ typedef struct IDirect3DPixelShader9 *LPDIRECT3DPIXELSHADER9, *PDIRECT3DPIXELSHA #define IDirect3DPixelShader9_GetFunction(p,a,b) (p)->GetFunction(a,b) #endif - - - #undef INTERFACE #define INTERFACE IDirect3DBaseTexture9 @@ -986,10 +942,6 @@ typedef struct IDirect3DBaseTexture9 *LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXT #define IDirect3DBaseTexture9_GenerateMipSubLevels(p) (p)->GenerateMipSubLevels() #endif - - - - #undef INTERFACE #define INTERFACE IDirect3DTexture9 @@ -1072,10 +1024,6 @@ typedef struct IDirect3DTexture9 *LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9; #define IDirect3DTexture9_AddDirtyRect(p,a) (p)->AddDirtyRect(a) #endif - - - - #undef INTERFACE #define INTERFACE IDirect3DVolumeTexture9 @@ -1158,10 +1106,6 @@ typedef struct IDirect3DVolumeTexture9 *LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLU #define IDirect3DVolumeTexture9_AddDirtyBox(p,a) (p)->AddDirtyBox(a) #endif - - - - #undef INTERFACE #define INTERFACE IDirect3DCubeTexture9 @@ -1244,9 +1188,6 @@ typedef struct IDirect3DCubeTexture9 *LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCUBETEXT #define IDirect3DCubeTexture9_AddDirtyRect(p,a,b) (p)->AddDirtyRect(a,b) #endif - - - #undef INTERFACE #define INTERFACE IDirect3DVertexBuffer9 @@ -1305,9 +1246,6 @@ typedef struct IDirect3DVertexBuffer9 *LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEX #define IDirect3DVertexBuffer9_GetDesc(p,a) (p)->GetDesc(a) #endif - - - #undef INTERFACE #define INTERFACE IDirect3DIndexBuffer9 @@ -1366,9 +1304,6 @@ typedef struct IDirect3DIndexBuffer9 *LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUF #define IDirect3DIndexBuffer9_GetDesc(p,a) (p)->GetDesc(a) #endif - - - #undef INTERFACE #define INTERFACE IDirect3DSurface9 @@ -1436,9 +1371,6 @@ typedef struct IDirect3DSurface9 *LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9; #define IDirect3DSurface9_ReleaseDC(p,a) (p)->ReleaseDC(a) #endif - - - #undef INTERFACE #define INTERFACE IDirect3DVolume9 @@ -1488,8 +1420,6 @@ typedef struct IDirect3DVolume9 *LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9; #define IDirect3DVolume9_UnlockBox(p) (p)->UnlockBox() #endif - - #undef INTERFACE #define INTERFACE IDirect3DQuery9 @@ -1530,7 +1460,6 @@ typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9; #define IDirect3DQuery9_GetData(p,a,b,c) (p)->GetData(a,b,c) #endif - /**************************************************************************** * Flags for SetPrivateData method on all D3D9 interfaces * @@ -1559,7 +1488,6 @@ typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9; #define D3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100L #define D3DCREATE_ADAPTERGROUP_DEVICE 0x00000200L - /**************************************************************************** * * Parameter for IDirect3D9::CreateDevice's iAdapter @@ -1617,7 +1545,6 @@ typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9; * Also valid for VertexBuffer::CreateVertexBuffer ****************************************************************************/ - /* * DirectDraw error codes */ @@ -1655,7 +1582,6 @@ typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9; #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) #define D3DOK_NOAUTOGEN MAKE_D3DSTATUS(2159) - #ifdef __cplusplus }; #endif diff --git a/gfx/include/d3d9/d3dx9.h b/gfx/include/d3d9/d3dx9.h index 514020f549..d11faeccee 100644 --- a/gfx/include/d3d9/d3dx9.h +++ b/gfx/include/d3d9/d3dx9.h @@ -68,5 +68,4 @@ enum _D3DXERR { D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908) }; - #endif /*__D3DX9_H__ */ diff --git a/gfx/include/d3d9/d3dx9anim.h b/gfx/include/d3d9/d3dx9anim.h index 653f762fcb..afa7391d3b 100644 --- a/gfx/include/d3d9/d3dx9anim.h +++ b/gfx/include/d3d9/d3dx9anim.h @@ -320,7 +320,6 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet) STDMETHOD(UnregisterAnimation)(THIS_ UINT Index) PURE; }; - /* * ID3DXCompressedAnimationSet: * ---------------------------- @@ -677,7 +676,6 @@ D3DXFrameCalculateBoundingSphere FLOAT *pObjectRadius ); - /* * D3DXCreateKeyframedAnimationSet: * -------------------------------- @@ -713,7 +711,6 @@ D3DXCreateKeyframedAnimationSet LPD3DXKEYFRAMEDANIMATIONSET *ppAnimationSet ); - /* * D3DXCreateCompressedAnimationSet: * -------------------------------- @@ -760,7 +757,6 @@ D3DXCreateAnimationController LPD3DXANIMATIONCONTROLLER *ppAnimController ); - #ifdef __cplusplus } #endif /*__cplusplus */ diff --git a/gfx/include/d3d9/d3dx9core.h b/gfx/include/d3d9/d3dx9core.h index 92ac586356..60596f6a08 100644 --- a/gfx/include/d3d9/d3dx9core.h +++ b/gfx/include/d3d9/d3dx9core.h @@ -68,12 +68,10 @@ DECLARE_INTERFACE_(ID3DXBuffer, IUnknown) typedef interface ID3DXSprite ID3DXSprite; typedef interface ID3DXSprite *LPD3DXSPRITE; - /* {BA0B762D-7D28-43ec-B9DC-2F84443B0614} */ DEFINE_GUID(IID_ID3DXSprite, 0xba0b762d, 0x7d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14); - #undef INTERFACE #define INTERFACE ID3DXSprite @@ -102,7 +100,6 @@ DECLARE_INTERFACE_(ID3DXSprite, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -154,7 +151,6 @@ typedef D3DXFONT_DESCA D3DXFONT_DESC; typedef LPD3DXFONT_DESCA LPD3DXFONT_DESC; #endif - typedef interface ID3DXFont ID3DXFont; typedef interface ID3DXFont *LPD3DXFONT; @@ -162,7 +158,6 @@ typedef interface ID3DXFont *LPD3DXFONT; DEFINE_GUID(IID_ID3DXFont, 0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc); - #undef INTERFACE #define INTERFACE ID3DXFont @@ -221,12 +216,10 @@ DECLARE_INTERFACE_(ID3DXFont, IUnknown) #endif #endif - #ifdef __cplusplus extern "C" { #endif /*__cplusplus */ - HRESULT WINAPI D3DXCreateFontA( LPDIRECT3DDEVICE9 pDevice, @@ -263,7 +256,6 @@ HRESULT WINAPI #define D3DXCreateFont D3DXCreateFontA #endif - HRESULT WINAPI D3DXCreateFontIndirectA( LPDIRECT3DDEVICE9 pDevice, @@ -282,7 +274,6 @@ HRESULT WINAPI #define D3DXCreateFontIndirect D3DXCreateFontIndirectA #endif - #ifdef __cplusplus } #endif /*__cplusplus */ @@ -297,7 +288,6 @@ typedef struct _D3DXRTS_DESC } D3DXRTS_DESC, *LPD3DXRTS_DESC; - typedef interface ID3DXRenderToSurface ID3DXRenderToSurface; typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE; @@ -305,7 +295,6 @@ typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE; DEFINE_GUID(IID_ID3DXRenderToSurface, 0x6985f346, 0x2c3d, 0x43b3, 0xbe, 0x8b, 0xda, 0xae, 0x8a, 0x3, 0xd8, 0x94); - #undef INTERFACE #define INTERFACE ID3DXRenderToSurface @@ -327,7 +316,6 @@ DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -356,7 +344,6 @@ typedef struct _D3DXRTE_DESC } D3DXRTE_DESC, *LPD3DXRTE_DESC; - typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap; typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap; @@ -364,7 +351,6 @@ typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap; DEFINE_GUID(IID_ID3DXRenderToEnvMap, 0x313f1b4b, 0xc7b0, 0x4fa2, 0x9d, 0x9d, 0x8d, 0x38, 0xb, 0x64, 0x38, 0x5e); - #undef INTERFACE #define INTERFACE ID3DXRenderToEnvMap @@ -400,7 +386,6 @@ DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - #ifdef __cplusplus extern "C" { #endif /*__cplusplus */ @@ -469,12 +454,10 @@ DECLARE_INTERFACE_(ID3DXLine, IUnknown) STDMETHOD(OnResetDevice)(THIS) PURE; }; - #ifdef __cplusplus extern "C" { #endif /*__cplusplus */ - HRESULT WINAPI D3DXCreateLine( LPDIRECT3DDEVICE9 pDevice, diff --git a/gfx/include/d3d9/d3dx9effect.h b/gfx/include/d3d9/d3dx9effect.h index 0d68aa8637..2d14ebdd61 100644 --- a/gfx/include/d3d9/d3dx9effect.h +++ b/gfx/include/d3d9/d3dx9effect.h @@ -37,7 +37,6 @@ typedef struct _D3DXEFFECT_DESC } D3DXEFFECT_DESC; - /* * D3DXPARAMETER_DESC: */ @@ -58,7 +57,6 @@ typedef struct _D3DXPARAMETER_DESC } D3DXPARAMETER_DESC; - /* * D3DXTECHNIQUE_DESC: */ @@ -71,7 +69,6 @@ typedef struct _D3DXTECHNIQUE_DESC } D3DXTECHNIQUE_DESC; - /* * D3DXPASS_DESC: */ @@ -86,7 +83,6 @@ typedef struct _D3DXPASS_DESC } D3DXPASS_DESC; - /* * D3DXFUNCTION_DESC: */ @@ -98,7 +94,6 @@ typedef struct _D3DXFUNCTION_DESC } D3DXFUNCTION_DESC; - /* * ID3DXEffectPool */ @@ -110,7 +105,6 @@ typedef interface ID3DXEffectPool *LPD3DXEFFECTPOOL; DEFINE_GUID(IID_ID3DXEffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33); - #undef INTERFACE #define INTERFACE ID3DXEffectPool @@ -124,7 +118,6 @@ DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown) /* No public methods */ }; - /* * ID3DXBaseEffect */ @@ -136,7 +129,6 @@ typedef interface ID3DXBaseEffect *LPD3DXBASEEFFECT; DEFINE_GUID(IID_ID3DXBaseEffect, 0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe); - #undef INTERFACE #define INTERFACE ID3DXBaseEffect @@ -268,7 +260,6 @@ DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown) STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT RegisterIndex, CONST BOOL *pConstantData, UINT RegisterCount) PURE; }; - /* * ID3DXEffect */ @@ -411,7 +402,6 @@ typedef interface ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER; DEFINE_GUID(IID_ID3DXEffectCompiler, 0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0); - #undef INTERFACE #define INTERFACE ID3DXEffectCompiler @@ -498,7 +488,6 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect) LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable) PURE; }; - /* * APIs */ @@ -539,7 +528,6 @@ HRESULT WINAPI #define D3DXCreateEffectFromFile D3DXCreateEffectFromFileA #endif - HRESULT WINAPI D3DXCreateEffectFromResourceA( LPDIRECT3DDEVICE9 pDevice, @@ -570,7 +558,6 @@ HRESULT WINAPI #define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceA #endif - HRESULT WINAPI D3DXCreateEffect( LPDIRECT3DDEVICE9 pDevice, @@ -613,7 +600,6 @@ HRESULT WINAPI #define D3DXCreateEffectFromFileEx D3DXCreateEffectFromFileExA #endif - HRESULT WINAPI D3DXCreateEffectFromResourceExA( LPDIRECT3DDEVICE9 pDevice, @@ -646,7 +632,6 @@ HRESULT WINAPI #define D3DXCreateEffectFromResourceEx D3DXCreateEffectFromResourceExA #endif - HRESULT WINAPI D3DXCreateEffectEx( LPDIRECT3DDEVICE9 pDevice, @@ -684,7 +669,6 @@ HRESULT WINAPI #define D3DXCreateEffectCompilerFromFile D3DXCreateEffectCompilerFromFileA #endif - HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA( HMODULE hSrcModule, @@ -711,7 +695,6 @@ HRESULT WINAPI #define D3DXCreateEffectCompilerFromResource D3DXCreateEffectCompilerFromResourceA #endif - HRESULT WINAPI D3DXCreateEffectCompiler( LPCSTR pSrcData, diff --git a/gfx/include/d3d9/d3dx9math.h b/gfx/include/d3d9/d3dx9math.h index 914d9536f0..06ed776127 100644 --- a/gfx/include/d3d9/d3dx9math.h +++ b/gfx/include/d3d9/d3dx9math.h @@ -44,7 +44,6 @@ #define D3DX_16F_RADIX 2 /* exponent radix */ #define D3DX_16F_ROUNDS 1 /* addition rounding: near */ - typedef struct D3DXFLOAT16 { #ifdef __cplusplus @@ -65,8 +64,6 @@ protected: WORD value; } D3DXFLOAT16, *LPD3DXFLOAT16; - - /*=========================================================================== * * Vectors @@ -74,7 +71,6 @@ protected: *=========================================================================== */ - /* * 2D Vector */ @@ -112,7 +108,6 @@ public: BOOL operator == ( CONST D3DXVECTOR2& ) const; BOOL operator != ( CONST D3DXVECTOR2& ) const; - public: #endif /*__cplusplus */ FLOAT x, y; @@ -263,7 +258,6 @@ public: FLOAT x, y, z, w; } D3DXVECTOR4, *LPD3DXVECTOR4; - /*-------------------------- * 4D Vector (16 bit) *-------------------------- @@ -311,7 +305,6 @@ public: FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); - /* access grants */ FLOAT& operator () ( UINT Row, UINT Col ); FLOAT operator () ( UINT Row, UINT Col ) const; @@ -349,7 +342,6 @@ public: typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX; #endif /* !__cplusplus */ - /*--------------------------------------------------------------------------- * Aligned Matrices * @@ -487,7 +479,6 @@ public: FLOAT a, b, c, d; } D3DXPLANE, *LPD3DXPLANE; - /* * * Colors @@ -663,8 +654,6 @@ D3DXVECTOR2* WINAPI D3DXVec2TransformCoordArray D3DXVECTOR2* WINAPI D3DXVec2TransformNormalArray ( D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); - - #ifdef __cplusplus } #endif @@ -748,7 +737,6 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformCoord D3DXVECTOR3* WINAPI D3DXVec3TransformNormal ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); - /* Transform Array (x, y, z, 1) by matrix. */ D3DXVECTOR4* WINAPI D3DXVec3TransformArray ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); @@ -784,7 +772,6 @@ D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DVIEWPORT9 *pViewport, CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n); - #ifdef __cplusplus } #endif @@ -867,7 +854,6 @@ D3DXVECTOR4* WINAPI D3DXVec4TransformArray } #endif - /* * 4D Matrix */ @@ -880,7 +866,6 @@ D3DXMATRIX* D3DXMatrixIdentity BOOL D3DXMatrixIsIdentity ( CONST D3DXMATRIX *pM ); - /* non-inline */ #ifdef __cplusplus extern "C" { @@ -1144,7 +1129,6 @@ D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric } #endif - /* * Plane */ @@ -1278,7 +1262,6 @@ typedef interface ID3DXMatrixStack *LPD3DXMATRIXSTACK; DEFINE_GUID(IID_ID3DXMatrixStack, 0xc7885ba7, 0xf990, 0x4fe7, 0x92, 0x2d, 0x85, 0x15, 0xe4, 0x77, 0xdd, 0x85); - #undef INTERFACE #define INTERFACE ID3DXMatrixStack @@ -1478,7 +1461,6 @@ HRESULT WINAPI D3DXSHProjectCubeMap ( UINT uOrder, LPDIRECT3DCUBETEXTURE9 pCubeMap, FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut ); - #ifdef __cplusplus } #endif diff --git a/gfx/include/d3d9/d3dx9mesh.h b/gfx/include/d3d9/d3dx9mesh.h index 3d15c50542..6a43483607 100644 --- a/gfx/include/d3d9/d3dx9mesh.h +++ b/gfx/include/d3d9/d3dx9mesh.h @@ -151,7 +151,6 @@ typedef struct ID3DXPatchMesh *LPD3DXPATCHMESH; typedef interface ID3DXTextureGutterHelper *LPD3DXTEXTUREGUTTERHELPER; typedef interface ID3DXPRTBuffer *LPD3DXPRTBUFFER; - typedef struct _D3DXATTRIBUTERANGE { DWORD AttribId; @@ -244,7 +243,6 @@ typedef struct _D3DXWELDEPSILONS typedef D3DXWELDEPSILONS* LPD3DXWELDEPSILONS; - #undef INTERFACE #define INTERFACE ID3DXBaseMesh @@ -284,7 +282,6 @@ DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown) STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; }; - #undef INTERFACE #define INTERFACE ID3DXMesh @@ -334,7 +331,6 @@ DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh) STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE *pAttribTable, DWORD cAttribTableSize) PURE; }; - #undef INTERFACE #define INTERFACE ID3DXPMesh @@ -401,7 +397,6 @@ DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh) STDMETHOD(GenerateVertexHistory)(THIS_ DWORD* pVertexHistory) PURE; }; - #undef INTERFACE #define INTERFACE ID3DXSPMesh @@ -753,7 +748,6 @@ HRESULT WINAPI DWORD NumBytes, LPD3DXBUFFER *ppBuffer); - HRESULT WINAPI D3DXLoadMeshFromXA( LPCSTR pFilename, @@ -835,7 +829,6 @@ HRESULT WINAPI #define D3DXSaveMeshToX D3DXSaveMeshToXA #endif - HRESULT WINAPI D3DXCreatePMeshFromStream( IStream *pStream, @@ -895,7 +888,6 @@ HRESULT WINAPI LPD3DXSKININFO* ppSkinInfo, LPD3DXMESH* ppMesh); - /* The inverse of D3DXConvertTo{Indexed}BlendedMesh() functions. It figures out the skinning info from * the mesh and the bone combination table and populates a skin info object with that data. The bone * names and initial bone transforms are not filled in the skin info object by this method. This works @@ -918,7 +910,6 @@ HRESULT WINAPI LPD3DXMESH *ppMeshOut, LPD3DXBUFFER *ppAdjacencyOut); - /* generates implied outputdecl from input decl * the decl generated from this should be used to generate the output decl for * the tessellator subroutines. @@ -958,7 +949,6 @@ HRESULT WINAPI DWORD *pdwTriangles, /* output number of triangles */ DWORD *pdwVertices); /* output number of vertices */ - /*tessellates a patch into a created mesh *similar to D3D RT patch */ HRESULT WINAPI @@ -969,7 +959,6 @@ HRESULT WINAPI CONST D3DRECTPATCH_INFO *pRectPatchInfo, LPD3DXMESH pMesh); - HRESULT WINAPI D3DXTessellateTriPatch( LPDIRECT3DVERTEXBUFFER9 pVB, @@ -995,7 +984,6 @@ HRESULT WINAPI LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXPATCHMESH *pPatchMesh); - /*returns the number of degenerates in a patch mesh - *text output put in string. */ HRESULT WINAPI @@ -1041,7 +1029,6 @@ typedef struct _D3DXINTERSECTINFO FLOAT Dist; /* Ray-Intersection Parameter Distance */ } D3DXINTERSECTINFO, *LPD3DXINTERSECTINFO; - HRESULT WINAPI D3DXIntersect( LPD3DXBASEMESH pMesh, @@ -1069,7 +1056,6 @@ HRESULT WINAPI LPD3DXBUFFER *ppAllHits, /* Array of D3DXINTERSECTINFOs for all hits (not just closest) */ DWORD *pCountOfHits); /* Number of entries in AllHits array */ - HRESULT WINAPI D3DXSplitMesh ( LPD3DXMESH pMeshIn, @@ -1108,7 +1094,6 @@ BOOL WINAPI CONST D3DXVECTOR3 *pRayPosition, CONST D3DXVECTOR3 *pRayDirection); - HRESULT WINAPI D3DXComputeTangentFrame(ID3DXMesh *pMesh, DWORD dwOptions); @@ -1129,7 +1114,6 @@ HRESULT WINAPI D3DXComputeTangentFrameEx(ID3DXMesh *pMesh, ID3DXMesh **ppMeshOut, ID3DXBuffer **ppVertexMapping); - /*D3DXComputeTangent * *Computes the Tangent vectors for the TexStage texture coordinates @@ -1325,7 +1309,6 @@ HRESULT WINAPI D3DXUVAtlasPack(ID3DXMesh *pMesh, DWORD dwOptions, LPD3DXBUFFER pFacePartitioning); - /* * * IMT Calculation apis @@ -1480,7 +1463,6 @@ HRESULT WINAPI LPD3DXBUFFER *ppStripLengths, DWORD *pNumStrips); - /* * * D3DXOptimizeFaces: @@ -1547,7 +1529,6 @@ HRESULT WINAPI } #endif /* __cplusplus */ - /* * * Data structures for Spherical Harmonic Precomputation @@ -1773,7 +1754,6 @@ DECLARE_INTERFACE_(ID3DXPRTCompBuffer, IUnknown) LPD3DXMESH pScene) PURE; }; - #undef INTERFACE #define INTERFACE ID3DXTextureGutterHelper @@ -1809,7 +1789,6 @@ DECLARE_INTERFACE_(ID3DXTextureGutterHelper, IUnknown) STDMETHOD_(UINT, GetWidth)(THIS) PURE; STDMETHOD_(UINT, GetHeight)(THIS) PURE; - /* Applying gutters recomputes all of the gutter texels of class "2" * based on texels of class "1" or "4" */ @@ -1911,7 +1890,6 @@ DECLARE_INTERFACE_(ID3DXTextureGutterHelper, IUnknown) STDMETHOD(SetGutterMap)(THIS_ BYTE *pGutterData) PURE; }; - typedef interface ID3DXPRTEngine ID3DXPRTEngine; typedef interface ID3DXPRTEngine *LPD3DXPRTENGINE; @@ -2124,7 +2102,6 @@ DECLARE_INTERFACE_(ID3DXPRTEngine, IUnknown) FLOAT ZAngleBias, LPD3DXPRTBUFFER pDataOut) PURE; - /* Functions that computes subsurface scattering (using material properties) * Albedo is not multiplied by result. This only works for per-vertex data * use ResampleBuffer to move per-vertex data into a texture and back. @@ -2255,7 +2232,6 @@ DECLARE_INTERFACE_(ID3DXPRTEngine, IUnknown) CONST D3DXVECTOR3 *pSampleNorms, LPD3DXPRTBUFFER pDataOut) PURE; - /* given the solution for PRT or light maps, computes transfer vector at arbitrary * position/normal pairs in space * @@ -2361,7 +2337,6 @@ DECLARE_INTERFACE_(ID3DXPRTEngine, IUnknown) DWORD *pFaceIndex, FLOAT *pU, FLOAT *pV, FLOAT *pDist) PURE; }; - /* API functions for creating interfaces */ #ifdef __cplusplus @@ -2455,7 +2430,6 @@ HRESULT WINAPI #define D3DXLoadPRTBufferFromFile D3DXLoadPRTBufferFromFileA #endif - /* * * D3DXSavePRTBufferToFile: @@ -2486,7 +2460,6 @@ HRESULT WINAPI #define D3DXSavePRTBufferToFile D3DXSavePRTBufferToFileA #endif - /* * * D3DXLoadPRTCompBufferFromFile: @@ -2572,7 +2545,6 @@ HRESULT WINAPI * */ - HRESULT WINAPI D3DXCreatePRTCompBuffer( D3DXSHCOMPRESSQUALITYTYPE Quality, @@ -2607,7 +2579,6 @@ HRESULT WINAPI * */ - HRESULT WINAPI D3DXCreateTextureGutterHelper( UINT Width, @@ -2616,7 +2587,6 @@ HRESULT WINAPI FLOAT GutterSize, LPD3DXTEXTUREGUTTERHELPER* ppBuffer); - /* * * D3DXCreatePRTEngine: @@ -2640,7 +2610,6 @@ HRESULT WINAPI * */ - HRESULT WINAPI D3DXCreatePRTEngine( LPD3DXMESH pMesh, @@ -2682,7 +2651,6 @@ HRESULT WINAPI * */ - HRESULT WINAPI D3DXConcatenateMeshes( LPD3DXMESH *ppMeshes, @@ -2803,7 +2771,6 @@ HRESULT WINAPI UINT *pSCClusterList, D3DXSHPRTSPLITMESHCLUSTERDATA *pSCData); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gfx/include/d3d9/d3dx9shader.h b/gfx/include/d3d9/d3dx9shader.h index a700b5244f..d972c9a075 100644 --- a/gfx/include/d3d9/d3dx9shader.h +++ b/gfx/include/d3d9/d3dx9shader.h @@ -55,7 +55,6 @@ typedef struct _D3DXMACRO } D3DXMACRO, *LPD3DXMACRO; - /* * D3DXSEMANTIC: */ @@ -67,8 +66,6 @@ typedef struct _D3DXSEMANTIC } D3DXSEMANTIC, *LPD3DXSEMANTIC; - - /* * D3DXREGISTER_SET: */ @@ -85,7 +82,6 @@ typedef enum _D3DXREGISTER_SET } D3DXREGISTER_SET, *LPD3DXREGISTER_SET; - /* * D3DXPARAMETER_CLASS: */ @@ -104,7 +100,6 @@ typedef enum _D3DXPARAMETER_CLASS } D3DXPARAMETER_CLASS, *LPD3DXPARAMETER_CLASS; - /* * D3DXPARAMETER_TYPE: */ @@ -137,7 +132,6 @@ typedef enum _D3DXPARAMETER_TYPE } D3DXPARAMETER_TYPE, *LPD3DXPARAMETER_TYPE; - /* * D3DXCONSTANTTABLE_DESC: */ @@ -150,7 +144,6 @@ typedef struct _D3DXCONSTANTTABLE_DESC } D3DXCONSTANTTABLE_DESC, *LPD3DXCONSTANTTABLE_DESC; - /* * D3DXCONSTANT_DESC: */ @@ -176,8 +169,6 @@ typedef struct _D3DXCONSTANT_DESC } D3DXCONSTANT_DESC, *LPD3DXCONSTANT_DESC; - - /* * ID3DXConstantTable: */ @@ -189,7 +180,6 @@ typedef interface ID3DXConstantTable *LPD3DXCONSTANTTABLE; DEFINE_GUID(IID_ID3DXConstantTable, 0xab3c758f, 0x93e, 0x4356, 0xb7, 0x62, 0x4d, 0xb1, 0x8f, 0x1b, 0x3a, 0x1); - #undef INTERFACE #define INTERFACE ID3DXConstantTable @@ -308,7 +298,6 @@ DECLARE_INTERFACE(ID3DXInclude) STDMETHOD(Close)(THIS_ LPCVOID pData) PURE; }; - /* * APIs */ @@ -341,7 +330,6 @@ HRESULT WINAPI #define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileA #endif - HRESULT WINAPI D3DXAssembleShaderFromResourceA( HMODULE hSrcModule, @@ -368,7 +356,6 @@ HRESULT WINAPI #define D3DXAssembleShaderFromResource D3DXAssembleShaderFromResourceA #endif - HRESULT WINAPI D3DXAssembleShader( LPCSTR pSrcData, @@ -409,7 +396,6 @@ HRESULT WINAPI #define D3DXCompileShaderFromFile D3DXCompileShaderFromFileA #endif - HRESULT WINAPI D3DXCompileShaderFromResourceA( HMODULE hSrcModule, @@ -442,7 +428,6 @@ HRESULT WINAPI #define D3DXCompileShaderFromResource D3DXCompileShaderFromResourceA #endif - HRESULT WINAPI D3DXCompileShader( LPCSTR pSrcData, @@ -575,12 +560,10 @@ HRESULT WINAPI LPD3DXBUFFER* ppShaderText, LPD3DXBUFFER* ppErrorMsgs); - #ifdef __cplusplus } #endif - /* * Shader comment block layouts */ @@ -605,7 +588,6 @@ typedef struct _D3DXSHADER_CONSTANTTABLE } D3DXSHADER_CONSTANTTABLE, *LPD3DXSHADER_CONSTANTTABLE; - typedef struct _D3DXSHADER_CONSTANTINFO { DWORD Name; /* LPCSTR offset */ @@ -618,7 +600,6 @@ typedef struct _D3DXSHADER_CONSTANTINFO } D3DXSHADER_CONSTANTINFO, *LPD3DXSHADER_CONSTANTINFO; - typedef struct _D3DXSHADER_TYPEINFO { WORD Class; /* D3DXPARAMETER_CLASS */ @@ -631,7 +612,6 @@ typedef struct _D3DXSHADER_TYPEINFO } D3DXSHADER_TYPEINFO, *LPD3DXSHADER_TYPEINFO; - typedef struct _D3DXSHADER_STRUCTMEMBERINFO { DWORD Name; /* LPCSTR offset */ @@ -639,6 +619,4 @@ typedef struct _D3DXSHADER_STRUCTMEMBERINFO } D3DXSHADER_STRUCTMEMBERINFO, *LPD3DXSHADER_STRUCTMEMBERINFO; - - #endif /* __D3DX9SHADER_H__ */ diff --git a/gfx/include/d3d9/d3dx9tex.h b/gfx/include/d3d9/d3dx9tex.h index f34574d25f..757f4f65c3 100644 --- a/gfx/include/d3d9/d3dx9tex.h +++ b/gfx/include/d3d9/d3dx9tex.h @@ -99,7 +99,6 @@ HRESULT WINAPI #define D3DXGetImageInfoFromFile D3DXGetImageInfoFromFileA #endif - HRESULT WINAPI D3DXGetImageInfoFromResourceA( HMODULE hSrcModule, @@ -118,7 +117,6 @@ HRESULT WINAPI #define D3DXGetImageInfoFromResource D3DXGetImageInfoFromResourceA #endif - HRESULT WINAPI D3DXGetImageInfoFromFileInMemory( LPCVOID pSrcData, @@ -153,8 +151,6 @@ HRESULT WINAPI #define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileA #endif - - HRESULT WINAPI D3DXLoadSurfaceFromResourceA( LPDIRECT3DSURFACE9 pDestSurface, @@ -179,15 +175,12 @@ HRESULT WINAPI D3DCOLOR ColorKey, D3DXIMAGE_INFO* pSrcInfo); - #ifdef UNICODE #define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceW #else #define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceA #endif - - HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory( LPDIRECT3DSURFACE9 pDestSurface, @@ -200,7 +193,6 @@ HRESULT WINAPI D3DCOLOR ColorKey, D3DXIMAGE_INFO* pSrcInfo); - HRESULT WINAPI D3DXLoadSurfaceFromSurface( LPDIRECT3DSURFACE9 pDestSurface, @@ -255,7 +247,6 @@ HRESULT WINAPI CONST PALETTEENTRY* pSrcPalette, CONST RECT* pSrcRect); - /* * Load/Save Volume APIs */ @@ -288,7 +279,6 @@ HRESULT WINAPI #define D3DXLoadVolumeFromFile D3DXLoadVolumeFromFileA #endif - HRESULT WINAPI D3DXLoadVolumeFromResourceA( LPDIRECT3DVOLUME9 pDestVolume, @@ -319,8 +309,6 @@ HRESULT WINAPI #define D3DXLoadVolumeFromResource D3DXLoadVolumeFromResourceA #endif - - HRESULT WINAPI D3DXLoadVolumeFromFileInMemory( LPDIRECT3DVOLUME9 pDestVolume, @@ -333,7 +321,6 @@ HRESULT WINAPI D3DCOLOR ColorKey, D3DXIMAGE_INFO* pSrcInfo); - HRESULT WINAPI D3DXLoadVolumeFromVolume( LPDIRECT3DVOLUME9 pDestVolume, @@ -474,7 +461,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromFile D3DXCreateTextureFromFileA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromFileA( LPDIRECT3DDEVICE9 pDevice, @@ -493,7 +479,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromFileA( LPDIRECT3DDEVICE9 pDevice, @@ -532,7 +517,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromResourceA( LPDIRECT3DDEVICE9 pDevice, @@ -553,7 +537,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromResource D3DXCreateCubeTextureFromResourceA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA( LPDIRECT3DDEVICE9 pDevice, @@ -616,7 +599,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromFileExA( LPDIRECT3DDEVICE9 pDevice, @@ -655,7 +637,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA( LPDIRECT3DDEVICE9 pDevice, @@ -742,7 +723,6 @@ HRESULT WINAPI #define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExA #endif - HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA( LPDIRECT3DDEVICE9 pDevice, @@ -783,7 +763,6 @@ HRESULT WINAPI #define D3DXCreateCubeTextureFromResourceEx D3DXCreateCubeTextureFromResourceExA #endif - HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA( LPDIRECT3DDEVICE9 pDevice, @@ -851,7 +830,6 @@ HRESULT WINAPI UINT SrcDataSize, LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - /* FromFileInMemoryEx */ HRESULT WINAPI @@ -935,9 +913,6 @@ HRESULT WINAPI LPDIRECT3DBASETEXTURE9 pSrcTexture, CONST PALETTEENTRY* pSrcPalette); - - - /* * Misc Texture APIs */ @@ -975,13 +950,11 @@ HRESULT WINAPI LPDIRECT3DTEXTURE9 pTexture, LPD3DXTEXTURESHADER pTextureShader); - HRESULT WINAPI D3DXFillCubeTextureTX( LPDIRECT3DCUBETEXTURE9 pCubeTexture, LPD3DXTEXTURESHADER pTextureShader); - HRESULT WINAPI D3DXFillVolumeTextureTX( LPDIRECT3DVOLUMETEXTURE9 pVolumeTexture, diff --git a/gfx/include/d3d9caps.h b/gfx/include/d3d9caps.h index cd89f29450..2821e3f152 100644 --- a/gfx/include/d3d9caps.h +++ b/gfx/include/d3d9caps.h @@ -17,8 +17,6 @@ /* include this file content only if compiling for DX9 interfaces */ #if(DIRECT3D_VERSION >= 0x0900) - - #if defined(_X86_) || defined(_IA64_) #pragma pack(4) #endif @@ -86,7 +84,6 @@ typedef struct _D3DOVERLAYCAPS #define D3DOVERLAYCAPS_STRETCHX 0x00000040 #define D3DOVERLAYCAPS_STRETCHY 0x00000080 - typedef struct _D3DCONTENTPROTECTIONCAPS { DWORD Caps; @@ -326,7 +323,6 @@ typedef struct _D3DCAPS9 #endif /* !D3D_DISABLE_9EX */ /* -- D3D9Ex only */ - /* * LineCaps */ @@ -554,9 +550,7 @@ typedef struct _D3DCAPS9 #define D3DDTCAPS_FLOAT16_2 0x00000100L #define D3DDTCAPS_FLOAT16_4 0x00000200L - #pragma pack() - #endif /* (DIRECT3D_VERSION >= 0x0900) */ #endif /* _d3d9CAPS_H_ */ diff --git a/gfx/include/d3d9types.h b/gfx/include/d3d9types.h index c1c5573baa..cb02742a5d 100644 --- a/gfx/include/d3d9types.h +++ b/gfx/include/d3d9types.h @@ -10,7 +10,6 @@ #ifndef _d3d9TYPES_H_ #define _d3d9TYPES_H_ - #ifndef DIRECT3D_VERSION #define DIRECT3D_VERSION 0x0900 #endif @@ -47,7 +46,6 @@ typedef DWORD D3DCOLOR; #define D3DCOLOR_COLORVALUE(r,g,b,a) \ D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f)) - #ifndef D3DVECTOR_DEFINED typedef struct _D3DVECTOR { float x; @@ -77,8 +75,6 @@ typedef struct _D3DRECT { #define D3DRECT_DEFINED #endif - - #ifndef D3DMATRIX_DEFINED typedef struct _D3DMATRIX { union { @@ -95,8 +91,6 @@ typedef struct _D3DMATRIX { #define D3DMATRIX_DEFINED #endif - - typedef struct _D3DVIEWPORT9 { DWORD X; DWORD Y; /* Viewport Top left */ @@ -439,7 +433,6 @@ typedef enum _D3DRENDERSTATETYPE { D3DRS_DESTBLENDALPHA = 208, /* DST blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */ D3DRS_BLENDOPALPHA = 209, /* Blending operation for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */ - D3DRS_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */ } D3DRENDERSTATETYPE; @@ -500,7 +493,6 @@ typedef enum _D3DTEXTURESTAGESTATETYPE D3DTSS_RESULTARG = 28, /* D3DTA_* arg for result (CURRENT or TEMP) */ D3DTSS_CONSTANT = 32, /* Per-stage constant D3DTA_CONSTANT */ - D3DTSS_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */ } D3DTEXTURESTAGESTATETYPE; @@ -782,8 +774,6 @@ typedef struct _D3DVERTEXELEMENT9 #define D3DSTREAMSOURCE_INDEXEDDATA (1<<30) #define D3DSTREAMSOURCE_INSTANCEDATA (2<<30) - - /*--------------------------------------------------------------------- * * The internal format of Pixel Shader (PS) & Vertex Shader (VS) @@ -1203,7 +1193,6 @@ typedef enum _D3DSHADER_MIN_PRECISION #define D3DPS_END() 0x0000FFFF #define D3DVS_END() 0x0000FFFF - /*--------------------------------------------------------------------- */ /* High order surfaces */ @@ -1273,7 +1262,6 @@ typedef enum _D3DTEXTURETRANSFORMFLAGS { #define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16)) #define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16)) - /*--------------------------------------------------------------------- */ /* Direct3D9 Device types */ @@ -1351,7 +1339,6 @@ typedef enum _D3DMULTISAMPLE_TYPE ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) #endif /* defined(MAKEFOURCC) */ - typedef enum _D3DFORMAT { D3DFMT_UNKNOWN = 0, @@ -1419,7 +1406,6 @@ typedef enum _D3DFORMAT #endif /* !D3D_DISABLE_9EX */ /* -- D3D9Ex only */ - D3DFMT_L16 = 81, D3DFMT_VERTEXDATA =100, @@ -1453,14 +1439,12 @@ typedef enum _D3DFORMAT /* 2.8 biased fixed point */ D3DFMT_A2B10G10R10_XR_BIAS = 119, - /* Binary format indicating that the data has no inherent type */ D3DFMT_BINARYBUFFER = 199, #endif /* !D3D_DISABLE_9EX */ /* -- D3D9Ex only */ - D3DFMT_FORCE_DWORD =0x7fffffff } D3DFORMAT; @@ -1482,7 +1466,6 @@ typedef struct _D3DDEVICE_CREATION_PARAMETERS DWORD BehaviorFlags; } D3DDEVICE_CREATION_PARAMETERS; - /* SwapEffects */ typedef enum _D3DSWAPEFFECT { @@ -1510,11 +1493,9 @@ typedef enum _D3DPOOL { D3DPOOL_FORCE_DWORD = 0x7fffffff } D3DPOOL; - /* RefreshRate pre-defines */ #define D3DPRESENT_RATE_DEFAULT 0x00000000 - /* Resize Optional Parameters */ typedef struct _D3DPRESENT_PARAMETERS_ { @@ -1578,7 +1559,6 @@ typedef enum _D3DBACKBUFFER_TYPE D3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff } D3DBACKBUFFER_TYPE; - /* Types */ typedef enum _D3DRESOURCETYPE { D3DRTYPE_SURFACE = 1, @@ -1589,7 +1569,6 @@ typedef enum _D3DRESOURCETYPE { D3DRTYPE_VERTEXBUFFER = 6, D3DRTYPE_INDEXBUFFER = 7, /* if this changes, change _D3DDEVINFO_RESOURCEMANAGER definition */ - D3DRTYPE_FORCE_DWORD = 0x7fffffff } D3DRESOURCETYPE; @@ -1655,7 +1634,6 @@ typedef enum _D3DCUBEMAP_FACES D3DCUBEMAP_FACE_FORCE_DWORD = 0x7fffffff } D3DCUBEMAP_FACES; - /* Lock flags */ #define D3DLOCK_READONLY 0x00000010L @@ -1666,12 +1644,6 @@ typedef enum _D3DCUBEMAP_FACES #define D3DLOCK_NO_DIRTY_UPDATE 0x00008000L - - - - - - /* Vertex Buffer Description */ typedef struct _D3DVERTEXBUFFER_DESC { @@ -1695,7 +1667,6 @@ typedef struct _D3DINDEXBUFFER_DESC UINT Size; } D3DINDEXBUFFER_DESC; - /* Surface Description */ typedef struct _D3DSURFACE_DESC { @@ -1801,7 +1772,6 @@ typedef struct _D3DADAPTER_IDENTIFIER9 } D3DADAPTER_IDENTIFIER9; - /* Raster Status structure returned by GetRasterStatus */ typedef struct _D3DRASTER_STATUS { @@ -1809,8 +1779,6 @@ typedef struct _D3DRASTER_STATUS UINT ScanLine; } D3DRASTER_STATUS; - - /* Debug monitor tokens (DEBUG only) Note that if D3DRS_DEBUGMONITORTOKEN is set, the call is treated as @@ -1860,7 +1828,6 @@ typedef enum _D3DQUERYTYPE { /* Flags field for GetData */ #define D3DGETDATA_FLUSH (1 << 0) /* Tells the runtime to flush if the query is outstanding. */ - typedef struct _D3DRESOURCESTATS { /* Data collected since last Present() */ @@ -1895,7 +1862,6 @@ typedef struct _D3DDEVINFO_D3DVERTEXSTATS DWORD NumExtraClippingTriangles; /* Number of new triangles generated by clipping */ } D3DDEVINFO_D3DVERTEXSTATS, *LPD3DDEVINFO_D3DVERTEXSTATS; - typedef struct _D3DDEVINFO_VCACHE { DWORD Pattern; /* bit pattern, return value must be FOUR_CC('C', 'A', 'C', 'H') */ DWORD OptMethod; /* optimization method 0 means longest strips, 1 means vertex cache based */ @@ -1978,7 +1944,6 @@ typedef struct _D3DCOMPOSERECTDESTINATION #define D3DFMT_A1_SURFACE_MAXWIDTH 8192 #define D3DFMT_A1_SURFACE_MAXHEIGHT 2048 - typedef struct _D3DPRESENTSTATS { UINT PresentCount; UINT PresentRefreshCount; @@ -1994,7 +1959,6 @@ typedef enum D3DSCANLINEORDERING D3DSCANLINEORDERING_INTERLACED = 2 } D3DSCANLINEORDERING; - typedef struct D3DDISPLAYMODEEX { UINT Size; @@ -2012,7 +1976,6 @@ typedef struct D3DDISPLAYMODEFILTER D3DSCANLINEORDERING ScanLineOrdering; } D3DDISPLAYMODEFILTER; - typedef enum D3DDISPLAYROTATION { D3DDISPLAYROTATION_IDENTITY = 1, /* No rotation. */ @@ -2084,7 +2047,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_CHANNELTYPE, 0xbc1b18a5, 0xb1fb, 0x42ab, 0xbd, 0x94, 0xb5, 0x82, 0x8b, 0x4b, 0xf7, 0xbe); @@ -2096,7 +2058,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_DEVICEHANDLE, 0xec1c539d, 0x8cff, 0x4e2a, 0xbc, 0xc4, 0xf5, 0x69, 0x2f, 0x99, 0xf4, 0x80); @@ -2108,7 +2069,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_CRYPTOSESSION, 0x2634499e, 0xd018, 0x4d74, 0xac, 0x17, 0x7f, 0x72, 0x40, 0x59, 0x52, 0x8d); @@ -2130,7 +2090,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESSCOUNT, 0xdb207b3, 0x9450, 0x46a6, 0x82, 0xde, 0x1b, 0x96, 0xd4, 0x4f, 0x9c, 0xf2); @@ -2142,7 +2101,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUN } D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESS, 0x649bbadb, 0xf0f4, 0x4639, 0xa1, 0x5b, 0x24, 0x39, 0x3f, 0xc3, 0xab, 0xac); @@ -2171,7 +2129,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUT } D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_UNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT, 0x12f0bd6, 0xe662, 0x4474, 0xbe, 0xfd, 0xaa, 0x53, 0xe5, 0x14, 0x3c, 0x6d); @@ -2183,7 +2140,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCE } D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_OUTPUTIDCOUNT, 0x2c042b5e, 0x8c07, 0x46d5, 0xaa, 0xbe, 0x8f, 0x75, 0xcb, 0xad, 0x4c, 0x31); @@ -2206,7 +2162,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_OUTPUTID, 0x839ddca3, 0x9b4e, 0x41e4, 0xb0, 0x53, 0x89, 0x2b, 0xd2, 0xa1, 0x1e, 0xe7); @@ -2231,7 +2186,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_ACCESSIBILITYATTRIBUTES, 0x6214d9d2, 0x432c, 0x4abb, 0x9f, 0xce, 0x21, 0x6e, 0xea, 0x26, 0x9e, 0x3b); @@ -2260,7 +2214,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUIDCOUNT, 0xb30f7066, 0x203c, 0x4b07, 0x93, 0xfc, 0xce, 0xaa, 0xfd, 0x61, 0x24, 0x1e); @@ -2272,7 +2225,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUID, 0xf83a5958, 0xe986, 0x4bda, 0xbe, 0xb0, 0x41, 0x1f, 0x6a, 0x7a, 0x1, 0xb7); @@ -2293,7 +2245,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT; - DEFINE_GUID(D3DAUTHENTICATEDQUERY_CURRENTENCRYPTIONWHENACCESSIBLE, 0xec1791c7, 0xdad3, 0x4f15, 0x9e, 0xc3, 0xfa, 0xa9, 0x3d, 0x60, 0xd4, 0xf0); @@ -2305,7 +2256,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT } D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT; - typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT { D3D_OMAC omac; @@ -2337,7 +2287,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE } D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE; - DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_PROTECTION, 0x50455658, 0x3f47, 0x4362, 0xbf, 0x99, 0xbf, 0xdf, 0xcd, 0xe9, 0xed, 0x29); @@ -2349,7 +2298,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION } D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION; - DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_CRYPTOSESSION, 0x6346cc54, 0x2cfc, 0x4ad4, 0x82, 0x24, 0xd1, 0x58, 0x37, 0xde, 0x77, 0x0); @@ -2363,7 +2311,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION } D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION; - DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_SHAREDRESOURCE, 0x772d047, 0x1b40, 0x48e8, 0x9c, 0xa6, 0xb5, 0xf5, 0x10, 0xde, 0x9f, 0x1); @@ -2377,7 +2324,6 @@ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE } D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE; - DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_ENCRYPTIONWHENACCESSIBLE, 0x41fff286, 0x6ae0, 0x4d43, 0x9d, 0x55, 0xa4, 0x6e, 0x9e, 0xfd, 0x15, 0x8a); @@ -2402,8 +2348,6 @@ typedef struct _D3DAES_CTR_IV UINT64 Count; /* Big-Endian Block Count */ } D3DAES_CTR_IV; - - #endif /* !D3D_DISABLE_9EX */ /* -- D3D9Ex only */ @@ -2412,6 +2356,5 @@ typedef struct _D3DAES_CTR_IV #pragma warning(pop) #endif - #endif /* (DIRECT3D_VERSION >= 0x0900) */ #endif /* _d3d9TYPES(P)_H_ */ diff --git a/gfx/include/dxsdk/audiodefs.h b/gfx/include/dxsdk/audiodefs.h index 089612758a..a4da92c050 100644 --- a/gfx/include/dxsdk/audiodefs.h +++ b/gfx/include/dxsdk/audiodefs.h @@ -25,7 +25,6 @@ #pragma pack(push, 1) // Pack structures to 1-byte boundaries - /************************************************************************** * * WAVEFORMATEX: Base structure for many audio formats. Format-specific @@ -56,7 +55,6 @@ typedef WAVEFORMATEX *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX; typedef const WAVEFORMATEX *PCWAVEFORMATEX, *LPCWAVEFORMATEX; - /************************************************************************** * * WAVEFORMATEXTENSIBLE: Extended version of WAVEFORMATEX that should be @@ -90,8 +88,6 @@ typedef const WAVEFORMATEX *PCWAVEFORMATEX, *LPCWAVEFORMATEX; typedef WAVEFORMATEXTENSIBLE *PWAVEFORMATEXTENSIBLE, *LPWAVEFORMATEXTENSIBLE; typedef const WAVEFORMATEXTENSIBLE *PCWAVEFORMATEXTENSIBLE, *LPCWAVEFORMATEXTENSIBLE; - - /************************************************************************** * * Define the most common wave format tags used in WAVEFORMATEX formats. @@ -184,7 +180,6 @@ typedef const WAVEFORMATEXTENSIBLE *PCWAVEFORMATEXTENSIBLE, *LPCWAVEFORMATEXTENS #define WAVE_FORMAT_EXTENSIBLE 0xFFFE // All WAVEFORMATEXTENSIBLE formats #endif - /************************************************************************** * * Define the most common wave format GUIDs used in WAVEFORMATEXTENSIBLE @@ -213,7 +208,6 @@ typedef const WAVEFORMATEXTENSIBLE *PCWAVEFORMATEXTENSIBLE, *LPCWAVEFORMATEXTENS #endif - /************************************************************************** * * Speaker positions used in the WAVEFORMATEXTENSIBLE dwChannelMask field. @@ -257,7 +251,6 @@ typedef const WAVEFORMATEXTENSIBLE *PCWAVEFORMATEXTENSIBLE, *LPCWAVEFORMATEXTENS #define SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT) #endif - #pragma pack(pop) #endif // #ifndef __AUDIODEFS_INCLUDED__ diff --git a/gfx/include/dxsdk/d2d1.h b/gfx/include/dxsdk/d2d1.h index 6891e9b394..adc43ff476 100644 --- a/gfx/include/dxsdk/d2d1.h +++ b/gfx/include/dxsdk/d2d1.h @@ -81,7 +81,6 @@ typedef interface ID2D1Brush ID2D1Brush; #define D2D1_INVALID_TAG ULONGLONG_MAX #define D2D1_DEFAULT_FLATTENING_TOLERANCE (0.25f) - /// /// This defines the superset of interpolation mode supported by D2D APIs /// and built-in effects @@ -99,7 +98,6 @@ enum }; - /// /// This determines what gamma is used for interpolation/blending. /// @@ -119,7 +117,6 @@ typedef enum D2D1_GAMMA } D2D1_GAMMA; - /// /// Specifies what the contents are of an opacity mask. /// @@ -144,7 +141,6 @@ typedef enum D2D1_OPACITY_MASK_CONTENT } D2D1_OPACITY_MASK_CONTENT; - /// /// Enum which describes how to sample from a source outside its base tile. /// @@ -172,7 +168,6 @@ typedef enum D2D1_EXTEND_MODE } D2D1_EXTEND_MODE; - /// /// Enum which describes the manner in which we render edges of non-text primitives. /// @@ -192,7 +187,6 @@ typedef enum D2D1_ANTIALIAS_MODE } D2D1_ANTIALIAS_MODE; - /// /// Describes the antialiasing mode used for drawing text. /// @@ -222,7 +216,6 @@ typedef enum D2D1_TEXT_ANTIALIAS_MODE } D2D1_TEXT_ANTIALIAS_MODE; - /// /// Specifies the algorithm that is used when images are scaled or rotated. Note /// Starting in Windows 8, more interpolations modes are available. See @@ -245,7 +238,6 @@ typedef enum D2D1_BITMAP_INTERPOLATION_MODE } D2D1_BITMAP_INTERPOLATION_MODE; - /// /// Modifications made to the draw text call that influence how the text is /// rendered. @@ -300,7 +292,6 @@ typedef struct D2D1_BITMAP_PROPERTIES } D2D1_BITMAP_PROPERTIES; - /// /// Contains the position and color of a gradient stop. /// @@ -311,7 +302,6 @@ typedef struct D2D1_GRADIENT_STOP } D2D1_GRADIENT_STOP; - /// /// Describes the opacity and transformation of a brush. /// @@ -322,7 +312,6 @@ typedef struct D2D1_BRUSH_PROPERTIES } D2D1_BRUSH_PROPERTIES; - /// /// Describes the extend modes and the interpolation mode of an ID2D1BitmapBrush. /// @@ -334,7 +323,6 @@ typedef struct D2D1_BITMAP_BRUSH_PROPERTIES } D2D1_BITMAP_BRUSH_PROPERTIES; - /// /// Contains the starting point and endpoint of the gradient axis for an /// ID2D1LinearGradientBrush. @@ -346,7 +334,6 @@ typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES } D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES; - /// /// Contains the gradient origin offset and the size and position of the gradient /// ellipse for an ID2D1RadialGradientBrush. @@ -360,7 +347,6 @@ typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES } D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES; - /// /// Differentiates which of the two possible arcs could match the given arc /// parameters. @@ -373,7 +359,6 @@ typedef enum D2D1_ARC_SIZE } D2D1_ARC_SIZE; - /// /// Enum which describes the drawing of the ends of a line. /// @@ -403,7 +388,6 @@ typedef enum D2D1_CAP_STYLE } D2D1_CAP_STYLE; - /// /// Describes the sequence of dashes and gaps in a stroke. /// @@ -419,7 +403,6 @@ typedef enum D2D1_DASH_STYLE } D2D1_DASH_STYLE; - /// /// Enum which describes the drawing of the corners on the line. /// @@ -449,7 +432,6 @@ typedef enum D2D1_LINE_JOIN } D2D1_LINE_JOIN; - /// /// This enumeration describes the type of combine operation to be performed. /// @@ -483,7 +465,6 @@ typedef enum D2D1_COMBINE_MODE } D2D1_COMBINE_MODE; - /// /// Describes how one geometry object is spatially related to another geometry /// object. @@ -520,7 +501,6 @@ typedef enum D2D1_GEOMETRY_RELATION } D2D1_GEOMETRY_RELATION; - /// /// Specifies how simple the output of a simplified geometry sink should be. /// @@ -532,7 +512,6 @@ typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION } D2D1_GEOMETRY_SIMPLIFICATION_OPTION; - /// /// Indicates whether the given figure is filled or hollow. /// @@ -544,7 +523,6 @@ typedef enum D2D1_FIGURE_BEGIN } D2D1_FIGURE_BEGIN; - /// /// Indicates whether the figure is open or closed on its end point. /// @@ -556,7 +534,6 @@ typedef enum D2D1_FIGURE_END } D2D1_FIGURE_END; - /// /// Describes a cubic bezier in a path. /// @@ -568,7 +545,6 @@ typedef struct D2D1_BEZIER_SEGMENT } D2D1_BEZIER_SEGMENT; - /// /// Describes a triangle. /// @@ -580,7 +556,6 @@ typedef struct D2D1_TRIANGLE } D2D1_TRIANGLE; - /// /// Indicates whether the given segment should be stroked, or, if the join between /// this segment and the previous one should be smooth. @@ -596,7 +571,6 @@ typedef enum D2D1_PATH_SEGMENT DEFINE_ENUM_FLAG_OPERATORS(D2D1_PATH_SEGMENT); - /// /// Defines the direction that an elliptical arc is drawn. /// @@ -608,7 +582,6 @@ typedef enum D2D1_SWEEP_DIRECTION } D2D1_SWEEP_DIRECTION; - /// /// Specifies how the intersecting areas of geometries or figures are combined to /// form the area of the composite geometry. @@ -621,7 +594,6 @@ typedef enum D2D1_FILL_MODE } D2D1_FILL_MODE; - /// /// Describes an arc that is defined as part of a path. /// @@ -635,7 +607,6 @@ typedef struct D2D1_ARC_SEGMENT } D2D1_ARC_SEGMENT; - /// /// Contains the control point and end point for a quadratic Bezier segment. /// @@ -646,7 +617,6 @@ typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT } D2D1_QUADRATIC_BEZIER_SEGMENT; - /// /// Contains the center point, x-radius, and y-radius of an ellipse. /// @@ -658,7 +628,6 @@ typedef struct D2D1_ELLIPSE } D2D1_ELLIPSE; - /// /// Contains the dimensions and corner radii of a rounded rectangle. /// @@ -670,7 +639,6 @@ typedef struct D2D1_ROUNDED_RECT } D2D1_ROUNDED_RECT; - /// /// Properties, aside from the width, that allow geometric penning to be specified. /// @@ -686,7 +654,6 @@ typedef struct D2D1_STROKE_STYLE_PROPERTIES } D2D1_STROKE_STYLE_PROPERTIES; - /// /// Specified options that can be applied when a layer resource is applied to create /// a layer. @@ -710,7 +677,6 @@ typedef enum D2D1_LAYER_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS); - /// /// Contains the content bounds, mask information, opacity settings, and other /// options for a layer resource. @@ -761,7 +727,6 @@ typedef struct D2D1_LAYER_PARAMETERS } D2D1_LAYER_PARAMETERS; - /// /// Describes whether a window is occluded. /// @@ -775,7 +740,6 @@ typedef enum D2D1_WINDOW_STATE DEFINE_ENUM_FLAG_OPERATORS(D2D1_WINDOW_STATE); - /// /// Describes whether a render target uses hardware or software rendering, or if /// Direct2D should select the rendering mode. @@ -801,7 +765,6 @@ typedef enum D2D1_RENDER_TARGET_TYPE } D2D1_RENDER_TARGET_TYPE; - /// /// Describes the minimum DirectX support required for hardware rendering by a /// render target. @@ -827,7 +790,6 @@ typedef enum D2D1_FEATURE_LEVEL } D2D1_FEATURE_LEVEL; - /// /// Describes how a render target is remoted and whether it should be /// GDI-compatible. This enumeration allows a bitwise combination of its member @@ -854,7 +816,6 @@ typedef enum D2D1_RENDER_TARGET_USAGE DEFINE_ENUM_FLAG_OPERATORS(D2D1_RENDER_TARGET_USAGE); - /// /// Describes how present should behave. /// @@ -877,7 +838,6 @@ typedef enum D2D1_PRESENT_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_PRESENT_OPTIONS); - /// /// Contains rendering options (hardware or software), pixel format, DPI /// information, remoting options, and Direct3D support requirements for a render @@ -894,7 +854,6 @@ typedef struct D2D1_RENDER_TARGET_PROPERTIES } D2D1_RENDER_TARGET_PROPERTIES; - /// /// Contains the HWND, pixel size, and presentation options for an /// ID2D1HwndRenderTarget. @@ -907,7 +866,6 @@ typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES } D2D1_HWND_RENDER_TARGET_PROPERTIES; - /// /// Specifies additional features supportable by a compatible render target when it /// is created. This enumeration allows a bitwise combination of its member values. @@ -928,7 +886,6 @@ typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS); - /// /// Allows the drawing state to be atomically created. This also specifies the /// drawing state that is saved into an IDrawingStateBlock object. @@ -943,7 +900,6 @@ typedef struct D2D1_DRAWING_STATE_DESCRIPTION } D2D1_DRAWING_STATE_DESCRIPTION; - /// /// Specifies how a device context is initialized for GDI rendering when it is /// retrieved from the render target. @@ -964,7 +920,6 @@ typedef enum D2D1_DC_INITIALIZE_MODE } D2D1_DC_INITIALIZE_MODE; - /// /// Indicates the debug level to be output by the debug layer. /// @@ -978,7 +933,6 @@ typedef enum D2D1_DEBUG_LEVEL } D2D1_DEBUG_LEVEL; - /// /// Specifies the threading model of the created factory and all of its derived /// resources. @@ -1002,7 +956,6 @@ typedef enum D2D1_FACTORY_TYPE } D2D1_FACTORY_TYPE; - /// /// Allows additional parameters for factory creation. /// @@ -1017,15 +970,12 @@ typedef struct D2D1_FACTORY_OPTIONS } D2D1_FACTORY_OPTIONS; - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ - /*#pragma region Application Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ - EXTERN_C CONST IID IID_ID2D1Resource; EXTERN_C CONST IID IID_ID2D1Image; EXTERN_C CONST IID IID_ID2D1Bitmap; @@ -1055,24 +1005,19 @@ EXTERN_C CONST IID IID_ID2D1HwndRenderTarget; EXTERN_C CONST IID IID_ID2D1DCRenderTarget; EXTERN_C CONST IID IID_ID2D1Factory; - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ /*#pragma region Desktop Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ - EXTERN_C CONST IID IID_ID2D1GdiInteropRenderTarget; - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ /*#pragma endregion*/ - #ifndef D2D_USE_C_DEFINITIONS - /*#pragma region Application Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ @@ -1090,7 +1035,6 @@ interface DX_DECLARE_INTERFACE("2cd90691-12e2-11dc-9fed-001143a055f9") ID2D1Reso ) CONST PURE; }; // interface ID2D1Resource - /// /// Represents a producer of pixels that can fill an arbitrary 2D plane. /// @@ -1098,7 +1042,6 @@ interface DX_DECLARE_INTERFACE("65019f75-8da2-497c-b32c-dfa34e48ede6") ID2D1Imag { }; // interface ID2D1Image - /// /// Root bitmap resource, linearly scaled on a draw call. /// @@ -1150,7 +1093,6 @@ interface DX_DECLARE_INTERFACE("a2296057-ea42-4099-983b-539fb6505426") ID2D1Bitm ) PURE; }; // interface ID2D1Bitmap - /// /// Represents an collection of gradient stops that can then be the source resource /// for either a linear or radial gradient brush. @@ -1183,7 +1125,6 @@ interface DX_DECLARE_INTERFACE("2cd906a7-12e2-11dc-9fed-001143a055f9") ID2D1Grad ) CONST PURE; }; // interface ID2D1GradientStopCollection - /// /// The root brush interface. All brushes can be used to fill or pen a geometry. /// @@ -1221,7 +1162,6 @@ interface DX_DECLARE_INTERFACE("2cd906a8-12e2-11dc-9fed-001143a055f9") ID2D1Brus } }; // interface ID2D1Brush - /// /// A bitmap brush allows a bitmap to be used to fill a geometry. /// @@ -1272,7 +1212,6 @@ interface DX_DECLARE_INTERFACE("2cd906aa-12e2-11dc-9fed-001143a055f9") ID2D1Bitm ) CONST PURE; }; // interface ID2D1BitmapBrush - /// /// Paints an area with a solid color. /// @@ -1296,7 +1235,6 @@ interface DX_DECLARE_INTERFACE("2cd906a9-12e2-11dc-9fed-001143a055f9") ID2D1Soli } }; // interface ID2D1SolidColorBrush - /// /// Paints an area with a linear gradient. /// @@ -1326,7 +1264,6 @@ interface DX_DECLARE_INTERFACE("2cd906ab-12e2-11dc-9fed-001143a055f9") ID2D1Line ) CONST PURE; }; // interface ID2D1LinearGradientBrush - /// /// Paints an area with a radial gradient. /// @@ -1373,7 +1310,6 @@ interface DX_DECLARE_INTERFACE("2cd906ac-12e2-11dc-9fed-001143a055f9") ID2D1Radi ) CONST PURE; }; // interface ID2D1RadialGradientBrush - /// /// Resource interface that holds pen style properties. /// @@ -1414,7 +1350,6 @@ interface DX_DECLARE_INTERFACE("2cd9069d-12e2-11dc-9fed-001143a055f9") ID2D1Stro ) CONST PURE; }; // interface ID2D1StrokeStyle - /// /// Represents a geometry resource and defines a set of helper methods for /// manipulating and measuring geometric shapes. Interfaces that inherit from @@ -2095,7 +2030,6 @@ interface DX_DECLARE_INTERFACE("2cd906a1-12e2-11dc-9fed-001143a055f9") ID2D1Geom } }; // interface ID2D1Geometry - /// /// Describes a two-dimensional rectangle. /// @@ -2107,7 +2041,6 @@ interface DX_DECLARE_INTERFACE("2cd906a2-12e2-11dc-9fed-001143a055f9") ID2D1Rect ) CONST PURE; }; // interface ID2D1RectangleGeometry - /// /// Describes a rounded rectangle. /// @@ -2119,7 +2052,6 @@ interface DX_DECLARE_INTERFACE("2cd906a3-12e2-11dc-9fed-001143a055f9") ID2D1Roun ) CONST PURE; }; // interface ID2D1RoundedRectangleGeometry - /// /// Represents an ellipse. /// @@ -2131,7 +2063,6 @@ interface DX_DECLARE_INTERFACE("2cd906a4-12e2-11dc-9fed-001143a055f9") ID2D1Elli ) CONST PURE; }; // interface ID2D1EllipseGeometry - /// /// Represents a composite geometry, composed of other ID2D1Geometry objects. /// @@ -2150,7 +2081,6 @@ interface DX_DECLARE_INTERFACE("2cd906a6-12e2-11dc-9fed-001143a055f9") ID2D1Geom ) CONST PURE; }; // interface ID2D1GeometryGroup - /// /// Represents a geometry that has been transformed. /// @@ -2166,7 +2096,6 @@ interface DX_DECLARE_INTERFACE("2cd906bb-12e2-11dc-9fed-001143a055f9") ID2D1Tran ) CONST PURE; }; // interface ID2D1TransformedGeometry - /// /// Describes a geometric path that does not contain quadratic bezier curves or /// arcs. @@ -2205,7 +2134,6 @@ interface DX_DECLARE_INTERFACE("2cd9069e-12e2-11dc-9fed-001143a055f9") ID2D1Simp ) PURE; }; // interface ID2D1SimplifiedGeometrySink - /// /// Describes a geometric path that can contain lines, arcs, cubic Bezier curves, /// and quadratic Bezier curves. @@ -2262,7 +2190,6 @@ interface DX_DECLARE_INTERFACE("2cd9069f-12e2-11dc-9fed-001143a055f9") ID2D1Geom } }; // interface ID2D1GeometrySink - /// /// Populates an ID2D1Mesh object with triangles. /// @@ -2278,7 +2205,6 @@ interface DX_DECLARE_INTERFACE("2cd906c1-12e2-11dc-9fed-001143a055f9") ID2D1Tess ) PURE; }; // interface ID2D1TessellationSink - /// /// Represents a complex shape that may be composed of arcs, curves, and lines. /// @@ -2309,7 +2235,6 @@ interface DX_DECLARE_INTERFACE("2cd906a5-12e2-11dc-9fed-001143a055f9") ID2D1Path ) CONST PURE; }; // interface ID2D1PathGeometry - /// /// Represents a set of vertices that form a list of triangles. /// @@ -2324,7 +2249,6 @@ interface DX_DECLARE_INTERFACE("2cd906c2-12e2-11dc-9fed-001143a055f9") ID2D1Mesh ) PURE; }; // interface ID2D1Mesh - /// /// Represents the backing store required to render a layer. /// @@ -2335,7 +2259,6 @@ interface DX_DECLARE_INTERFACE("2cd9069b-12e2-11dc-9fed-001143a055f9") ID2D1Laye ) CONST PURE; }; // interface ID2D1Layer - /// /// Represents the drawing state of a render target: the antialiasing mode, /// transform, tags, and text-rendering options. @@ -2383,7 +2306,6 @@ interface DX_DECLARE_INTERFACE("28506e39-ebf6-46a1-bb47-fd85565ab957") ID2D1Draw } }; // interface ID2D1DrawingStateBlock - /// /// Represents an object that can receive drawing commands. Interfaces that inherit /// from ID2D1RenderTarget render the drawing commands they receive in different @@ -3242,7 +3164,6 @@ interface DX_DECLARE_INTERFACE("2cd90694-12e2-11dc-9fed-001143a055f9") ID2D1Rend } }; // interface ID2D1RenderTarget - /// /// Renders to an intermediate texture created by the CreateCompatibleRenderTarget /// method. @@ -3255,7 +3176,6 @@ interface DX_DECLARE_INTERFACE("2cd90695-12e2-11dc-9fed-001143a055f9") ID2D1Bitm ) PURE; }; // interface ID2D1BitmapRenderTarget - /// /// Renders drawing instructions to a window. /// @@ -3290,8 +3210,6 @@ interface DX_DECLARE_INTERFACE("2cd90698-12e2-11dc-9fed-001143a055f9") ID2D1Hwnd } }; // interface ID2D1HwndRenderTarget - - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ @@ -3314,8 +3232,6 @@ interface DX_DECLARE_INTERFACE("e0db51c3-6f77-4bae-b3d5-e47509b35838") ID2D1GdiI ) PURE; }; // interface ID2D1GdiInteropRenderTarget - - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ /*#pragma endregion*/ @@ -3334,7 +3250,6 @@ interface DX_DECLARE_INTERFACE("1c51bc64-de61-46fd-9899-63a5d8f03950") ID2D1DCRe ) PURE; }; // interface ID2D1DCRenderTarget - /// /// The root factory interface for all of D2D's objects. /// @@ -3558,18 +3473,13 @@ interface DX_DECLARE_INTERFACE("06152247-6f50-465a-9245-118bfd3b6007") ID2D1Fact } }; // interface ID2D1Factory - - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ - #endif - #ifdef D2D_USE_C_DEFINITIONS - /*#pragma region Application Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ @@ -3646,10 +3556,8 @@ typedef interface ID2D1Factory ID2D1Factory; /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ - #endif - /*#pragma region Application Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ @@ -3670,7 +3578,6 @@ extern "C" _Out_ void **ppIFactory ); - void WINAPI D2D1MakeRotateMatrix( _In_ FLOAT angle, @@ -3707,7 +3614,6 @@ extern "C" #include - #ifndef D2D_USE_C_DEFINITIONS COM_DECLSPEC_NOTHROW @@ -3727,7 +3633,6 @@ D2D1CreateFactory( factory); } - template COM_DECLSPEC_NOTHROW HRESULT diff --git a/gfx/include/dxsdk/d2d1_1.h b/gfx/include/dxsdk/d2d1_1.h index 359f05c052..f6d909e9eb 100644 --- a/gfx/include/dxsdk/d2d1_1.h +++ b/gfx/include/dxsdk/d2d1_1.h @@ -86,7 +86,6 @@ typedef enum D2D1_PROPERTY_TYPE } D2D1_PROPERTY_TYPE; - /// /// This defines the list of system properties present on the root effect property /// interface. @@ -107,7 +106,6 @@ typedef enum D2D1_PROPERTY } D2D1_PROPERTY; - /// /// This defines the indices of sub-properties that may be present on any parent /// property. @@ -125,7 +123,6 @@ typedef enum D2D1_SUBPROPERTY } D2D1_SUBPROPERTY; - /// /// Specifies how the bitmap can be used. /// @@ -163,7 +160,6 @@ typedef enum D2D1_BITMAP_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_BITMAP_OPTIONS); - /// /// Specifies the composite mode that will be applied. /// @@ -186,7 +182,6 @@ typedef enum D2D1_COMPOSITE_MODE } D2D1_COMPOSITE_MODE; - /// /// This specifies the precision that should be used in buffers allocated by D2D. /// @@ -202,7 +197,6 @@ typedef enum D2D1_BUFFER_PRECISION } D2D1_BUFFER_PRECISION; - /// /// This describes how the individual mapping operation should be performed. /// @@ -234,7 +228,6 @@ typedef enum D2D1_MAP_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_MAP_OPTIONS); - /// /// This is used to specify the quality of image scaling with /// ID2D1DeviceContext::DrawImage and with the 2D Affine Transform Effect. @@ -251,7 +244,6 @@ typedef enum D2D1_INTERPOLATION_MODE } D2D1_INTERPOLATION_MODE; - /// /// This specifies what units should be accepted by the D2D API. /// @@ -263,7 +255,6 @@ typedef enum D2D1_UNIT_MODE } D2D1_UNIT_MODE; - /// /// Defines a color space. /// @@ -288,7 +279,6 @@ typedef enum D2D1_COLOR_SPACE } D2D1_COLOR_SPACE; - /// /// This specifies options that apply to the device context for its lifetime. /// @@ -307,7 +297,6 @@ typedef enum D2D1_DEVICE_CONTEXT_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_DEVICE_CONTEXT_OPTIONS); - /// /// Defines how the world transform, dots per inch (dpi), and stroke width affect /// the shape of the pen used to stroke a primitive. @@ -334,7 +323,6 @@ typedef enum D2D1_STROKE_TRANSFORM_TYPE } D2D1_STROKE_TRANSFORM_TYPE; - /// /// A blend mode that applies to all primitives drawn on the context. /// @@ -349,7 +337,6 @@ typedef enum D2D1_PRIMITIVE_BLEND } D2D1_PRIMITIVE_BLEND; - /// /// This specifies the threading mode used while simultaneously creating the device, /// factory, and device context. @@ -373,7 +360,6 @@ typedef enum D2D1_THREADING_MODE } D2D1_THREADING_MODE; - /// /// This specifies how colors are interpolated. /// @@ -414,7 +400,6 @@ typedef struct D2D1_BITMAP_PROPERTIES1 } D2D1_BITMAP_PROPERTIES1; - /// /// Describes mapped memory from the ID2D1Bitmap1::Map API. /// @@ -425,7 +410,6 @@ typedef struct D2D1_MAPPED_RECT } D2D1_MAPPED_RECT; - /// /// This controls advanced settings of the Direct2D imaging pipeline. /// @@ -444,7 +428,6 @@ typedef struct D2D1_RENDERING_CONTROLS } D2D1_RENDERING_CONTROLS; - /// /// This identifies a certain input connection of a certain effect. /// @@ -486,7 +469,6 @@ typedef struct D2D1_POINT_DESCRIPTION } D2D1_POINT_DESCRIPTION; - /// /// Creation properties for an image brush. /// @@ -499,7 +481,6 @@ typedef struct D2D1_IMAGE_BRUSH_PROPERTIES } D2D1_IMAGE_BRUSH_PROPERTIES; - /// /// Describes the extend modes and the interpolation mode of an ID2D1BitmapBrush. /// @@ -511,7 +492,6 @@ typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1 } D2D1_BITMAP_BRUSH_PROPERTIES1; - /// /// This defines how geometries should be drawn and widened. /// @@ -532,7 +512,6 @@ typedef struct D2D1_STROKE_STYLE_PROPERTIES1 } D2D1_STROKE_STYLE_PROPERTIES1; - /// /// Specifies how the layer contents should be prepared. /// @@ -547,7 +526,6 @@ typedef enum D2D1_LAYER_OPTIONS1 DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS1); - /// /// All parameters related to pushing a layer. /// @@ -563,7 +541,6 @@ typedef struct D2D1_LAYER_PARAMETERS1 } D2D1_LAYER_PARAMETERS1; - /// /// Defines when font resources should be subset during printing. /// @@ -588,7 +565,6 @@ typedef enum D2D1_PRINT_FONT_SUBSET_MODE } D2D1_PRINT_FONT_SUBSET_MODE; - /// /// This describes the drawing state. /// @@ -604,7 +580,6 @@ typedef struct D2D1_DRAWING_STATE_DESCRIPTION1 } D2D1_DRAWING_STATE_DESCRIPTION1; - /// /// The creation properties for a ID2D1PrintControl object. /// @@ -625,7 +600,6 @@ typedef struct D2D1_PRINT_CONTROL_PROPERTIES } D2D1_PRINT_CONTROL_PROPERTIES; - /// /// This specifies the options while simultaneously creating the device, factory, /// and device context. @@ -642,7 +616,6 @@ typedef struct D2D1_CREATION_PROPERTIES } D2D1_CREATION_PROPERTIES; - EXTERN_C CONST IID IID_ID2D1GdiMetafileSink; EXTERN_C CONST IID IID_ID2D1GdiMetafile; EXTERN_C CONST IID IID_ID2D1CommandSink; @@ -663,10 +636,8 @@ EXTERN_C CONST IID IID_ID2D1Device; EXTERN_C CONST IID IID_ID2D1Factory1; EXTERN_C CONST IID IID_ID2D1Multithread; - #ifndef D2D_USE_C_DEFINITIONS - /// /// User-implementable interface for introspecting on a metafile. /// @@ -683,7 +654,6 @@ interface DX_DECLARE_INTERFACE("82237326-8111-4f7c-bcf4-b5c1175564fe") ID2D1GdiM ) PURE; }; // interface ID2D1GdiMetafileSink - /// /// Interface encapsulating a GDI/GDI+ metafile. /// @@ -705,7 +675,6 @@ interface DX_DECLARE_INTERFACE("2f543dc3-cfc1-4211-864f-cfd91c6f3395") ID2D1GdiM ) PURE; }; // interface ID2D1GdiMetafile - /// /// Caller-supplied implementation of an interface to receive the recorded command /// list. @@ -844,7 +813,6 @@ interface DX_DECLARE_INTERFACE("54d7898a-a061-40a7-bec7-e465bcba2c4f") ID2D1Comm ) PURE; }; // interface ID2D1CommandSink - /// /// The commandList interface. /// @@ -865,7 +833,6 @@ interface DX_DECLARE_INTERFACE("b4f34a19-2383-4d76-94f6-ec343657c3dc") ID2D1Comm ) PURE; }; // interface ID2D1CommandList - /// /// Converts Direct2D primitives stored in an ID2D1CommandList into a fixed page /// representation. The print sub-system then consumes the primitives. @@ -885,7 +852,6 @@ interface DX_DECLARE_INTERFACE("2c1d867d-c290-41c8-ae7e-34a98702e9a5") ID2D1Prin ) PURE; }; // interface ID2D1PrintControl - /// /// Provides a brush that can take any effect, command list or bitmap and use it to /// fill a 2D shape. @@ -931,7 +897,6 @@ interface DX_DECLARE_INTERFACE("fe9e984d-3f95-407c-b5db-cb94d4e8f87c") ID2D1Imag ) CONST PURE; }; // interface ID2D1ImageBrush - /// /// A bitmap brush allows a bitmap to be used to fill a geometry. Interpolation /// mode is specified with D2D1_INTERPOLATION_MODE @@ -950,7 +915,6 @@ interface DX_DECLARE_INTERFACE("41343a53-e41a-49a2-91cd-21793bbb62e5") ID2D1Bitm ) CONST PURE; }; // interface ID2D1BitmapBrush1 - /// /// Extends a stroke style to allow nominal width strokes. /// @@ -961,7 +925,6 @@ interface DX_DECLARE_INTERFACE("10a72a66-e91c-43f4-993f-ddf4b82b0b4a") ID2D1Stro ) CONST PURE; }; // interface ID2D1StrokeStyle1 - /// /// The ID2D1PathGeometry1 interface adds functionality to ID2D1PathGeometry. In /// particular, it provides the path geometry-specific @@ -1016,7 +979,6 @@ interface DX_DECLARE_INTERFACE("62baa2d2-ab54-41b7-b872-787e0106a421") ID2D1Path } }; // interface ID2D1PathGeometry1 - /// /// Represents a set of run-time bindable and discoverable properties that allow a /// data-driven application to modify the state of a Direct2D effect. @@ -1291,7 +1253,6 @@ interface DX_DECLARE_INTERFACE("483473d7-cd46-4f9d-9d3a-3112aa80159d") ID2D1Prop } }; // interface ID2D1Properties - /// /// The effect interface. Properties control how the effect is rendered. The effect /// is Drawn with the DrawImage call. @@ -1362,7 +1323,6 @@ interface DX_DECLARE_INTERFACE("28211a43-7d89-476f-8181-2d6159b220ad") ID2D1Effe } }; // interface ID2D1Effect - /// /// Represents a bitmap that can be used as a surface for an ID2D1DeviceContext or /// mapped into system memory, and can contain additional color context information. @@ -1407,7 +1367,6 @@ interface DX_DECLARE_INTERFACE("a898a84c-3873-4588-b08b-ebbf978df041") ID2D1Bitm ) PURE; }; // interface ID2D1Bitmap1 - /// /// Represents a color context that can be used with an ID2D1Bitmap1 object. /// @@ -1435,7 +1394,6 @@ interface DX_DECLARE_INTERFACE("1c4820bb-5771-4518-a581-2fe4dd0ec657") ID2D1Colo ) CONST PURE; }; // interface ID2D1ColorContext - /// /// Represents an collection of gradient stops that can then be the source resource /// for either a linear or radial gradient brush. @@ -1488,7 +1446,6 @@ interface DX_DECLARE_INTERFACE("ae1572f4-5dd0-4777-998b-9279472ae63b") ID2D1Grad ) CONST PURE; }; // interface ID2D1GradientStopCollection1 - /// /// Represents drawing state. /// @@ -1514,7 +1471,6 @@ interface DX_DECLARE_INTERFACE("689f1f85-c72e-4e33-8f19-85754efd5ace") ID2D1Draw using ID2D1DrawingStateBlock::SetDescription; }; // interface ID2D1DrawingStateBlock1 - /// /// The device context represents a set of state and a command buffer that is used /// to render to a target bitmap. @@ -2156,7 +2112,6 @@ interface DX_DECLARE_INTERFACE("e8f7fe7a-191c-466d-ad95-975678bda998") ID2D1Devi } }; // interface ID2D1DeviceContext - /// /// The device defines a resource domain whose objects and device contexts can be /// used together. @@ -2216,7 +2171,6 @@ interface DX_DECLARE_INTERFACE("47dd575d-ac05-4cdd-8049-9b02cd16f44c") ID2D1Devi } }; // interface ID2D1Device - /// /// Creates Direct2D resources. /// @@ -2363,7 +2317,6 @@ interface DX_DECLARE_INTERFACE("bb12d362-daee-4b9a-aa1d-14ba401cfa1f") ID2D1Fact } }; // interface ID2D1Factory1 - /// /// A locking mechanism from a Direct2D factory that Direct2D uses to control /// exclusive resource access in an app that is uses multiple threads. @@ -2391,14 +2344,10 @@ interface DX_DECLARE_INTERFACE("31e6e7bc-e0ff-4d46-8c64-a0a8c41c15d3") ID2D1Mult ) PURE; }; // interface ID2D1Multithread - - #endif - #ifdef D2D_USE_C_DEFINITIONS - typedef interface ID2D1GdiMetafileSink ID2D1GdiMetafileSink; typedef interface ID2D1GdiMetafile ID2D1GdiMetafile; @@ -2491,7 +2440,6 @@ extern "C" #include - #ifndef D2D_USE_C_DEFINITIONS inline HRESULT diff --git a/gfx/include/dxsdk/d2d1_1helper.h b/gfx/include/dxsdk/d2d1_1helper.h index 9e680b8f7e..8d0f941871 100644 --- a/gfx/include/dxsdk/d2d1_1helper.h +++ b/gfx/include/dxsdk/d2d1_1helper.h @@ -359,7 +359,6 @@ namespace D2D1 return skewY; } - static COM_DECLSPEC_NOTHROW inline @@ -468,7 +467,6 @@ namespace D2D1 } }; - class Matrix5x4F : public D2D1_MATRIX_5X4_F { public: @@ -921,4 +919,3 @@ namespace D2D1 #endif // #ifndef D2D_USE_C_DEFINITIONS #endif // #ifndef _D2D1_HELPER_H_ - diff --git a/gfx/include/dxsdk/d2d1_2.h b/gfx/include/dxsdk/d2d1_2.h index 2441769ab8..69bf3be627 100644 --- a/gfx/include/dxsdk/d2d1_2.h +++ b/gfx/include/dxsdk/d2d1_2.h @@ -44,17 +44,14 @@ typedef enum D2D1_RENDERING_PRIORITY } D2D1_RENDERING_PRIORITY; - EXTERN_C CONST IID IID_ID2D1GeometryRealization; EXTERN_C CONST IID IID_ID2D1DeviceContext1; EXTERN_C CONST IID IID_ID2D1Device1; EXTERN_C CONST IID IID_ID2D1Factory2; EXTERN_C CONST IID IID_ID2D1CommandSink1; - #ifndef D2D_USE_C_DEFINITIONS - /// /// Encapsulates a device- and transform-dependent representation of a filled or /// stroked geometry. @@ -63,7 +60,6 @@ interface DX_DECLARE_INTERFACE("a16907d7-bc02-4801-99e8-8cf7f485f774") ID2D1Geom { }; // interface ID2D1GeometryRealization - /// /// Enables creation and drawing of geometry realization objects. /// @@ -90,7 +86,6 @@ interface DX_DECLARE_INTERFACE("d37f57e4-6908-459f-a199-e72f24f79987") ID2D1Devi ) PURE; }; // interface ID2D1DeviceContext1 - /// /// Represents a resource domain whose objects and device contexts can be used /// together. @@ -122,7 +117,6 @@ interface DX_DECLARE_INTERFACE("d21768e1-23a4-4823-a14b-7c3eba85d658") ID2D1Devi using ID2D1Device::CreateDeviceContext; }; // interface ID2D1Device1 - /// /// Creates Direct2D resources. This interface also enables the creation of /// ID2D1Device1 objects. @@ -141,7 +135,6 @@ interface DX_DECLARE_INTERFACE("94f81a73-9212-4376-9c58-b16a3a0d3992") ID2D1Fact using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory2 - /// /// This interface performs all the same functions as the existing ID2D1CommandSink /// interface. It also enables access to the new primitive blend modes, MIN and ADD, @@ -159,14 +152,10 @@ interface DX_DECLARE_INTERFACE("9eb767fd-4269-4467-b8c2-eb30cb305743") ID2D1Comm ) PURE; }; // interface ID2D1CommandSink1 - - #endif - #ifdef D2D_USE_C_DEFINITIONS - typedef interface ID2D1GeometryRealization ID2D1GeometryRealization; typedef interface ID2D1DeviceContext1 ID2D1DeviceContext1; @@ -197,7 +186,6 @@ extern "C" #endif - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ #include diff --git a/gfx/include/dxsdk/d2d1_2helper.h b/gfx/include/dxsdk/d2d1_2helper.h index d5f57fbc61..0918a214f7 100644 --- a/gfx/include/dxsdk/d2d1_2helper.h +++ b/gfx/include/dxsdk/d2d1_2helper.h @@ -62,4 +62,3 @@ namespace D2D1 #endif // #if NTDDI_VERSION >= NTDDI_WINBLUE #endif // #ifndef _D2D1_HELPER_H_ - diff --git a/gfx/include/dxsdk/d2d1_3.h b/gfx/include/dxsdk/d2d1_3.h index eaf33b073e..d1028077a3 100644 --- a/gfx/include/dxsdk/d2d1_3.h +++ b/gfx/include/dxsdk/d2d1_3.h @@ -42,7 +42,6 @@ typedef enum D2D1_INK_NIB_SHAPE } D2D1_INK_NIB_SHAPE; - /// /// Specifies the orientation of an image. /// @@ -60,7 +59,6 @@ typedef enum D2D1_ORIENTATION } D2D1_ORIENTATION; - /// /// Option flags controlling how images sources are loaded during /// CreateImageSourceFromWic. @@ -76,7 +74,6 @@ typedef enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_IMAGE_SOURCE_LOADING_OPTIONS); - /// /// Option flags controlling primary conversion performed by /// CreateImageSourceFromDxgi, if any. @@ -91,7 +88,6 @@ typedef enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS); - /// /// Option flags for transformed image sources. /// @@ -110,7 +106,6 @@ typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS); - /// /// Properties of a transformed image source. /// @@ -145,7 +140,6 @@ typedef struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES } D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES; - /// /// Represents a point, radius pair that makes up part of a D2D1_INK_BEZIER_SEGMENT. /// @@ -157,7 +151,6 @@ typedef struct D2D1_INK_POINT } D2D1_INK_POINT; - /// /// Represents a Bezier segment to be used in the creation of an ID2D1Ink object. /// This structure differs from D2D1_BEZIER_SEGMENT in that it is composed of @@ -171,7 +164,6 @@ typedef struct D2D1_INK_BEZIER_SEGMENT } D2D1_INK_BEZIER_SEGMENT; - /// /// Defines the general pen tip shape and the transform used in an ID2D1InkStyle /// object. @@ -191,7 +183,6 @@ typedef struct D2D1_INK_STYLE_PROPERTIES } D2D1_INK_STYLE_PROPERTIES; - /// /// Specifies how to render gradient mesh edges. /// @@ -216,7 +207,6 @@ typedef enum D2D1_PATCH_EDGE_MODE } D2D1_PATCH_EDGE_MODE; - /// /// Represents a tensor patch with 16 control points, 4 corner colors, and boundary /// flags. An ID2D1GradientMesh is made up of 1 or more gradient mesh patches. Use @@ -366,7 +356,6 @@ typedef enum D2D1_SPRITE_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_SPRITE_OPTIONS); - /// /// Specifies the pixel snapping policy when rendering color bitmap glyphs. /// @@ -387,7 +376,6 @@ typedef enum D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION } D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION; - /// /// This determines what gamma is used for interpolation/blending. /// @@ -412,7 +400,6 @@ typedef enum D2D1_GAMMA1 } D2D1_GAMMA1; - /// /// Simple description of a color space. /// @@ -447,7 +434,6 @@ typedef struct D2D1_SIMPLE_COLOR_PROFILE } D2D1_SIMPLE_COLOR_PROFILE; - /// /// Specifies which way a color profile is defined. /// @@ -460,7 +446,6 @@ typedef enum D2D1_COLOR_CONTEXT_TYPE } D2D1_COLOR_CONTEXT_TYPE; - EXTERN_C CONST IID IID_ID2D1InkStyle; EXTERN_C CONST IID IID_ID2D1Ink; EXTERN_C CONST IID IID_ID2D1GradientMesh; @@ -493,10 +478,8 @@ EXTERN_C CONST IID IID_ID2D1DeviceContext6; EXTERN_C CONST IID IID_ID2D1Device6; EXTERN_C CONST IID IID_ID2D1Factory7; - #ifndef D2D_USE_C_DEFINITIONS - /// /// Represents a collection of style properties to be used by methods like /// ID2D1DeviceContext2::DrawInk when rendering ink. The ink style defines the nib @@ -530,7 +513,6 @@ interface DX_DECLARE_INTERFACE("bae8b344-23fc-4071-8cb5-d05d6f073848") ID2D1InkS } }; // interface ID2D1InkStyle - /// /// Represents a single continuous stroke of variable-width ink, as defined by a /// series of Bezier segments and widths. @@ -681,7 +663,6 @@ interface DX_DECLARE_INTERFACE("b499923b-7029-478f-a8b3-432c7c5f5312") ID2D1Ink } }; // interface ID2D1Ink - /// /// Represents a device-dependent representation of a gradient mesh composed of /// patches. Use the ID2D1DeviceContext2::CreateGradientMesh method to create an @@ -706,7 +687,6 @@ interface DX_DECLARE_INTERFACE("f292e401-c050-4cde-83d7-04962d3b23c2") ID2D1Grad ) CONST PURE; }; // interface ID2D1GradientMesh - /// /// Represents a producer of pixels that can fill an arbitrary 2D plane. /// @@ -721,7 +701,6 @@ interface DX_DECLARE_INTERFACE("c9b664e5-74a1-4378-9ac2-eefc37a3f4d8") ID2D1Imag ) PURE; }; // interface ID2D1ImageSource - /// /// Produces 2D pixel data that has been sourced from WIC. /// @@ -759,7 +738,6 @@ interface DX_DECLARE_INTERFACE("77395441-1c8f-4555-8683-f50dab0fe792") ID2D1Imag } }; // interface ID2D1ImageSourceFromWic - /// /// Represents an image source which shares resources with an original image source. /// @@ -775,7 +753,6 @@ interface DX_DECLARE_INTERFACE("7f1f79e5-2796-416c-8f55-700f911445e5") ID2D1Tran ) CONST PURE; }; // interface ID2D1TransformedImageSource - /// /// A container for 3D lookup table data that can be passed to the LookupTable3D /// effect. @@ -784,7 +761,6 @@ interface DX_DECLARE_INTERFACE("53dd9855-a3b0-4d5b-82e1-26e25c5e5797") ID2D1Look { }; // interface ID2D1LookupTable3D - /// /// This interface performs all the same functions as the ID2D1DeviceContext1 /// interface, plus it enables functionality such as ink rendering, gradient mesh @@ -952,7 +928,6 @@ interface DX_DECLARE_INTERFACE("394ea6a3-0c34-4321-950b-6ca20f0be6c7") ID2D1Devi } }; // interface ID2D1DeviceContext2 - /// /// Represents a resource domain whose objects and device contexts can be used /// together. This interface performs all the same functions as the existing @@ -989,7 +964,6 @@ interface DX_DECLARE_INTERFACE("a44472e1-8dfb-4e60-8492-6e2861c9ca8b") ID2D1Devi ) PURE; }; // interface ID2D1Device2 - /// /// Creates Direct2D resources. This interface also enables the creation of /// ID2D1Device2 objects. @@ -1010,7 +984,6 @@ interface DX_DECLARE_INTERFACE("0869759f-4f00-413f-b03e-2bda45404d0f") ID2D1Fact using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory3 - /// /// This interface performs all the same functions as the existing ID2D1CommandSink1 /// interface. It also enables access to ink rendering and gradient mesh rendering. @@ -1037,7 +1010,6 @@ interface DX_DECLARE_INTERFACE("3bab440e-417e-47df-a2e2-bc0be6a00916") ID2D1Comm using ID2D1CommandSink::DrawGdiMetafile; }; // interface ID2D1CommandSink2 - /// /// Interface encapsulating a GDI/GDI+ metafile. /// @@ -1061,7 +1033,6 @@ interface DX_DECLARE_INTERFACE("2e69f9e8-dd3f-4bf9-95ba-c04f49d788df") ID2D1GdiM ) PURE; }; // interface ID2D1GdiMetafile1 - /// /// User-implementable interface for introspecting on a metafile. /// @@ -1081,7 +1052,6 @@ interface DX_DECLARE_INTERFACE("fd0ecb6b-91e6-411e-8655-395e760f91b4") ID2D1GdiM using ID2D1GdiMetafileSink::ProcessRecord; }; // interface ID2D1GdiMetafileSink1 - #if NTDDI_VERSION >= NTDDI_WIN10_TH2 interface DX_DECLARE_INTERFACE("4dc583bf-3a10-438a-8722-e9765224f1f1") ID2D1SpriteBatch : public ID2D1Resource @@ -1144,7 +1114,6 @@ interface DX_DECLARE_INTERFACE("4dc583bf-3a10-438a-8722-e9765224f1f1") ID2D1Spri ) PURE; }; // interface ID2D1SpriteBatch - interface DX_DECLARE_INTERFACE("235a7496-8351-414c-bcd4-6672ab2d8e00") ID2D1DeviceContext3 : public ID2D1DeviceContext2 { @@ -1183,7 +1152,6 @@ interface DX_DECLARE_INTERFACE("235a7496-8351-414c-bcd4-6672ab2d8e00") ID2D1Devi } }; // interface ID2D1DeviceContext3 - interface DX_DECLARE_INTERFACE("852f2087-802c-4037-ab60-ff2e7ee6fc01") ID2D1Device3 : public ID2D1Device2 { @@ -1202,7 +1170,6 @@ interface DX_DECLARE_INTERFACE("852f2087-802c-4037-ab60-ff2e7ee6fc01") ID2D1Devi using ID2D1Device::CreateDeviceContext; }; // interface ID2D1Device3 - /// /// Creates Direct2D resources. This interface also enables the creation of /// ID2D1Device3 objects. @@ -1225,7 +1192,6 @@ interface DX_DECLARE_INTERFACE("bd4ec2d2-0662-4bee-ba8e-6f29f032e096") ID2D1Fact using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory4 - interface DX_DECLARE_INTERFACE("18079135-4cf3-4868-bc8e-06067e6d242d") ID2D1CommandSink3 : public ID2D1CommandSink2 { @@ -1239,7 +1205,6 @@ interface DX_DECLARE_INTERFACE("18079135-4cf3-4868-bc8e-06067e6d242d") ID2D1Comm ) PURE; }; // interface ID2D1CommandSink3 - #endif // #if NTDDI_VERSION >= NTDDI_WIN10_TH2 #if NTDDI_VERSION >= NTDDI_WIN10_RS1 @@ -1309,7 +1274,6 @@ interface DX_DECLARE_INTERFACE("af671749-d241-4db8-8e41-dcc2e5c1a438") ID2D1SvgG ) PURE; }; // interface ID2D1SvgGlyphStyle - interface DX_DECLARE_INTERFACE("8c427831-3d90-4476-b647-c4fae349e4db") ID2D1DeviceContext4 : public ID2D1DeviceContext3 { @@ -1475,7 +1439,6 @@ interface DX_DECLARE_INTERFACE("8c427831-3d90-4476-b647-c4fae349e4db") ID2D1Devi } }; // interface ID2D1DeviceContext4 - interface DX_DECLARE_INTERFACE("d7bdb159-5683-4a46-bc9c-72dc720b858b") ID2D1Device4 : public ID2D1Device3 { @@ -1513,7 +1476,6 @@ interface DX_DECLARE_INTERFACE("d7bdb159-5683-4a46-bc9c-72dc720b858b") ID2D1Devi ) CONST PURE; }; // interface ID2D1Device4 - /// /// Creates Direct2D resources. This interface also enables the creation of /// ID2D1Device4 objects. @@ -1538,7 +1500,6 @@ interface DX_DECLARE_INTERFACE("c4349994-838e-4b0f-8cab-44997d9eeacc") ID2D1Fact using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory5 - #endif // #if NTDDI_VERSION >= NTDDI_WIN10_RS1 #if NTDDI_VERSION >= NTDDI_WIN10_RS2 @@ -1562,7 +1523,6 @@ interface DX_DECLARE_INTERFACE("c78a6519-40d6-4218-b2de-beeeb744bb3e") ID2D1Comm ) PURE; }; // interface ID2D1CommandSink4 - /// /// Represents a color context to be used with the Color Management Effect. /// @@ -1590,7 +1550,6 @@ interface DX_DECLARE_INTERFACE("1ab42875-c57f-4be9-bd85-9cd78d6f55ee") ID2D1Colo ) CONST PURE; }; // interface ID2D1ColorContext1 - interface DX_DECLARE_INTERFACE("7836d248-68cc-4df6-b9e8-de991bf62eb7") ID2D1DeviceContext5 : public ID2D1DeviceContext4 { @@ -1647,7 +1606,6 @@ interface DX_DECLARE_INTERFACE("7836d248-68cc-4df6-b9e8-de991bf62eb7") ID2D1Devi } }; // interface ID2D1DeviceContext5 - interface DX_DECLARE_INTERFACE("d55ba0a4-6405-4694-aef5-08ee1a4358b4") ID2D1Device5 : public ID2D1Device4 { @@ -1670,7 +1628,6 @@ interface DX_DECLARE_INTERFACE("d55ba0a4-6405-4694-aef5-08ee1a4358b4") ID2D1Devi using ID2D1Device::CreateDeviceContext; }; // interface ID2D1Device5 - /// /// Creates Direct2D resources. This interface also enables the creation of /// ID2D1Device5 objects. @@ -1697,7 +1654,6 @@ interface DX_DECLARE_INTERFACE("f9976f46-f642-44c1-97ca-da32ea2a2635") ID2D1Fact using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory6 - #endif #if NTDDI_VERSION >= NTDDI_WIN10_RS3 @@ -1713,7 +1669,6 @@ interface DX_DECLARE_INTERFACE("7047dd26-b1e7-44a7-959a-8349e2144fa8") ID2D1Comm ) PURE; }; // interface ID2D1CommandSink5 - interface DX_DECLARE_INTERFACE("985f7e37-4ed0-4a19-98a3-15b0edfde306") ID2D1DeviceContext6 : public ID2D1DeviceContext5 { @@ -1729,7 +1684,6 @@ interface DX_DECLARE_INTERFACE("985f7e37-4ed0-4a19-98a3-15b0edfde306") ID2D1Devi ) PURE; }; // interface ID2D1DeviceContext6 - interface DX_DECLARE_INTERFACE("7bfef914-2d75-4bad-be87-e18ddb077b6d") ID2D1Device6 : public ID2D1Device5 { @@ -1754,7 +1708,6 @@ interface DX_DECLARE_INTERFACE("7bfef914-2d75-4bad-be87-e18ddb077b6d") ID2D1Devi using ID2D1Device::CreateDeviceContext; }; // interface ID2D1Device6 - /// /// Creates Direct2D resources. This interface also enables the creation of /// ID2D1Device6 objects. @@ -1783,15 +1736,12 @@ interface DX_DECLARE_INTERFACE("bdc2bdd3-b96c-4de6-bdf7-99d4745454de") ID2D1Fact using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory7 - #endif #endif - #ifdef D2D_USE_C_DEFINITIONS - typedef interface ID2D1InkStyle ID2D1InkStyle; typedef interface ID2D1Ink ID2D1Ink; @@ -1853,7 +1803,6 @@ extern "C" #endif - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ #include diff --git a/gfx/include/dxsdk/d2d1_3helper.h b/gfx/include/dxsdk/d2d1_3helper.h index b5b5153cdd..94ef7c52d8 100644 --- a/gfx/include/dxsdk/d2d1_3helper.h +++ b/gfx/include/dxsdk/d2d1_3helper.h @@ -257,4 +257,3 @@ namespace D2D1 #endif // #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD #endif // #ifndef _D2D1_HELPER_H_ - diff --git a/gfx/include/dxsdk/d2d1effectauthor.h b/gfx/include/dxsdk/d2d1effectauthor.h index 9b4dc7996a..36821c6742 100644 --- a/gfx/include/dxsdk/d2d1effectauthor.h +++ b/gfx/include/dxsdk/d2d1effectauthor.h @@ -16,7 +16,6 @@ #include #endif // #ifndef _D2D1_1_H_ - /// /// Function pointer that sets a property on an effect. /// @@ -48,7 +47,6 @@ typedef interface ID2D1TransformNode ID2D1TransformNode; #endif - /// /// Indicates what has changed since the last time the effect was asked to prepare /// to render. @@ -81,7 +79,6 @@ typedef enum D2D1_CHANGE_TYPE DEFINE_ENUM_FLAG_OPERATORS(D2D1_CHANGE_TYPE); - /// /// Indicates options for drawing using a pixel shader. /// @@ -105,7 +102,6 @@ typedef enum D2D1_PIXEL_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_PIXEL_OPTIONS); - /// /// Indicates options for drawing custom vertices set by transforms. /// @@ -140,7 +136,6 @@ typedef enum D2D1_VERTEX_OPTIONS DEFINE_ENUM_FLAG_OPERATORS(D2D1_VERTEX_OPTIONS); - /// /// Describes how a vertex buffer is to be managed. /// @@ -160,7 +155,6 @@ typedef enum D2D1_VERTEX_USAGE } D2D1_VERTEX_USAGE; - /// /// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure. /// @@ -175,7 +169,6 @@ typedef enum D2D1_BLEND_OPERATION } D2D1_BLEND_OPERATION; - /// /// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure. /// @@ -198,7 +191,6 @@ typedef enum D2D1_BLEND } D2D1_BLEND; - /// /// Allows a caller to control the channel depth of a stage in the rendering /// pipeline. @@ -212,7 +204,6 @@ typedef enum D2D1_CHANNEL_DEPTH } D2D1_CHANNEL_DEPTH; - /// /// Represents filtering modes transforms may select to use on their input textures. /// @@ -231,7 +222,6 @@ typedef enum D2D1_FILTER } D2D1_FILTER; - /// /// Defines capabilities of the underlying D3D device which may be queried using /// CheckFeatureSupport. @@ -244,7 +234,6 @@ typedef enum D2D1_FEATURE } D2D1_FEATURE; - /// /// Defines a property binding to a function. The name must match the property /// defined in the registration schema. @@ -269,7 +258,6 @@ typedef struct D2D1_PROPERTY_BINDING } D2D1_PROPERTY_BINDING; - /// /// This is used to define a resource texture when that resource texture is created. /// @@ -284,7 +272,6 @@ typedef struct D2D1_RESOURCE_TEXTURE_PROPERTIES } D2D1_RESOURCE_TEXTURE_PROPERTIES; - /// /// This defines a single element of the vertex layout. /// @@ -298,14 +285,12 @@ typedef struct D2D1_INPUT_ELEMENT_DESC } D2D1_INPUT_ELEMENT_DESC; - // // Set to alignedByteOffset within D2D1_INPUT_ELEMENT_DESC for elements that // immediately follow preceding elements in memory // #define D2D1_APPEND_ALIGNED_ELEMENT ( 0xffffffff ) - /// /// This defines the properties of a vertex buffer which uses the default vertex /// layout. @@ -319,7 +304,6 @@ typedef struct D2D1_VERTEX_BUFFER_PROPERTIES } D2D1_VERTEX_BUFFER_PROPERTIES; - /// /// This defines the input layout of vertices and the vertex shader which processes /// them. @@ -334,7 +318,6 @@ typedef struct D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES } D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES; - /// /// This defines the range of vertices from a vertex buffer to draw. /// @@ -345,7 +328,6 @@ typedef struct D2D1_VERTEX_RANGE } D2D1_VERTEX_RANGE; - /// /// Blend description which configures a blend transform object. /// @@ -361,7 +343,6 @@ typedef struct D2D1_BLEND_DESCRIPTION } D2D1_BLEND_DESCRIPTION; - /// /// Describes options transforms may select to use on their input textures. /// @@ -372,7 +353,6 @@ typedef struct D2D1_INPUT_DESCRIPTION } D2D1_INPUT_DESCRIPTION; - /// /// Indicates whether shader support for doubles is present on the underlying /// hardware. This may be populated using CheckFeatureSupport. @@ -383,7 +363,6 @@ typedef struct D2D1_FEATURE_DATA_DOUBLES } D2D1_FEATURE_DATA_DOUBLES; - /// /// Indicates support for features which are optional on D3D10 feature levels. This /// may be populated using CheckFeatureSupport. @@ -394,7 +373,6 @@ typedef struct D2D1_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS } D2D1_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS; - EXTERN_C CONST IID IID_ID2D1VertexBuffer; EXTERN_C CONST IID IID_ID2D1ResourceTexture; EXTERN_C CONST IID IID_ID2D1RenderInfo; @@ -415,10 +393,8 @@ EXTERN_C CONST IID IID_ID2D1BoundsAdjustmentTransform; EXTERN_C CONST IID IID_ID2D1EffectImpl; EXTERN_C CONST IID IID_ID2D1EffectContext; - #ifndef D2D_USE_C_DEFINITIONS - /// /// A transform uses this interface to write new vertices to a vertex buffer. /// @@ -434,7 +410,6 @@ interface DX_DECLARE_INTERFACE("9b8b1336-00a5-4668-92b7-ced5d8bf9b7b") ID2D1Vert ) PURE; }; // interface ID2D1VertexBuffer - interface DX_DECLARE_INTERFACE("688d15c3-02b0-438d-b13a-d1b44c32c39a") ID2D1ResourceTexture : public IUnknown { @@ -451,7 +426,6 @@ interface DX_DECLARE_INTERFACE("688d15c3-02b0-438d-b13a-d1b44c32c39a") ID2D1Reso ) PURE; }; // interface ID2D1ResourceTexture - /// /// A transform uses this interface to specify how to render a particular pass in /// D2D. @@ -492,7 +466,6 @@ interface DX_DECLARE_INTERFACE("519ae1bd-d19a-420d-b849-364f594776b7") ID2D1Rend ) PURE; }; // interface ID2D1RenderInfo - /// /// A transform uses this interface to specify how to render a particular pass using /// pixel and vertex shaders. @@ -545,7 +518,6 @@ interface DX_DECLARE_INTERFACE("693ce632-7f2f-45de-93fe-18d88b37aa21") ID2D1Draw ) PURE; }; // interface ID2D1DrawInfo - /// /// A transform uses this interface to specify how to render a particular pass using /// compute shader. @@ -577,7 +549,6 @@ interface DX_DECLARE_INTERFACE("5598b14b-9fd7-48b7-9bdb-8f0964eb38bc") ID2D1Comp ) PURE; }; // interface ID2D1ComputeInfo - /// /// A base object which can be inserted into a transform graph. /// @@ -591,7 +562,6 @@ interface DX_DECLARE_INTERFACE("b2efe1e7-729f-4102-949f-505fa21bf666") ID2D1Tran ) CONST PURE; }; // interface ID2D1TransformNode - /// /// The implementation of the actual graph. /// @@ -667,7 +637,6 @@ interface DX_DECLARE_INTERFACE("13d29038-c3e6-4034-9081-13b53a417992") ID2D1Tran ) PURE; }; // interface ID2D1TransformGraph - /// /// The interface implemented by a transform author. /// @@ -695,7 +664,6 @@ interface DX_DECLARE_INTERFACE("ef1a287d-342a-4f76-8fdb-da0d6ea9f92b") ID2D1Tran ) CONST PURE; }; // interface ID2D1Transform - /// /// The interface implemented by a transform author to provide a GPU-based effect. /// @@ -707,7 +675,6 @@ interface DX_DECLARE_INTERFACE("36bfdcb6-9739-435d-a30d-a653beff6a6f") ID2D1Draw ) PURE; }; // interface ID2D1DrawTransform - /// /// The interface implemented by a transform author to provide a Compute Shader /// based effect. @@ -727,7 +694,6 @@ interface DX_DECLARE_INTERFACE("0d85573c-01e3-4f7d-bfd9-0d60608bf3c3") ID2D1Comp ) PURE; }; // interface ID2D1ComputeTransform - /// /// The interface implemented by a transform author to indicate that it should /// receive an analysis result callback. @@ -741,7 +707,6 @@ interface DX_DECLARE_INTERFACE("0359dc30-95e6-4568-9055-27720d130e93") ID2D1Anal ) PURE; }; // interface ID2D1AnalysisTransform - /// /// The interface implemented by a transform author to provide a CPU based source /// effect. @@ -760,7 +725,6 @@ interface DX_DECLARE_INTERFACE("db1800dd-0c34-4cf9-be90-31cc0a5653e1") ID2D1Sour ) PURE; }; // interface ID2D1SourceTransform - /// /// Base interface for built-in transforms on which precision and caching may be /// controlled. @@ -784,7 +748,6 @@ interface DX_DECLARE_INTERFACE("1a799d8a-69f7-4e4c-9fed-437ccc6684cc") ID2D1Conc ) PURE; }; // interface ID2D1ConcreteTransform - /// /// An effect uses this interface to configure a blending operation. /// @@ -800,7 +763,6 @@ interface DX_DECLARE_INTERFACE("63ac0b32-ba44-450f-8806-7f4ca1ff2f1b") ID2D1Blen ) CONST PURE; }; // interface ID2D1BlendTransform - /// /// An effect uses this interface to configure border generation. /// @@ -822,7 +784,6 @@ interface DX_DECLARE_INTERFACE("4998735c-3a19-473c-9781-656847e3a347") ID2D1Bord ) CONST PURE; }; // interface ID2D1BorderTransform - /// /// An effect uses this interface to offset an image without inserting a rendering /// pass. @@ -838,7 +799,6 @@ interface DX_DECLARE_INTERFACE("3fe6adea-7643-4f53-bd14-a0ce63f24042") ID2D1Offs ) CONST PURE; }; // interface ID2D1OffsetTransform - /// /// An effect uses this interface to alter the image rectangle of its input. /// @@ -854,7 +814,6 @@ interface DX_DECLARE_INTERFACE("90f732e2-5092-4606-a819-8651970baccd") ID2D1Boun ) CONST PURE; }; // interface ID2D1BoundsAdjustmentTransform - /// /// This is the interface implemented by an effect author, along with the /// constructor and registration information. @@ -888,7 +847,6 @@ interface DX_DECLARE_INTERFACE("a248fd3f-3e6c-4e63-9f03-7f68ecc91db9") ID2D1Effe ) PURE; }; // interface ID2D1EffectImpl - /// /// The internal context handed to effect authors to create transforms from effects /// and any other operation tied to context which is not useful to the application @@ -1032,14 +990,10 @@ interface DX_DECLARE_INTERFACE("3d9f916b-27dc-4ad7-b4f1-64945340f563") ID2D1Effe ) CONST PURE; }; // interface ID2D1EffectContext - - #endif - #ifdef D2D_USE_C_DEFINITIONS - typedef interface ID2D1VertexBuffer ID2D1VertexBuffer; typedef interface ID2D1ResourceTexture ID2D1ResourceTexture; diff --git a/gfx/include/dxsdk/d2d1effectauthor_1.h b/gfx/include/dxsdk/d2d1effectauthor_1.h index d1da35e889..9ee6167f8f 100644 --- a/gfx/include/dxsdk/d2d1effectauthor_1.h +++ b/gfx/include/dxsdk/d2d1effectauthor_1.h @@ -22,10 +22,8 @@ EXTERN_C CONST IID IID_ID2D1EffectContext1; EXTERN_C CONST IID IID_ID2D1EffectContext2; - #ifndef D2D_USE_C_DEFINITIONS - /// /// The internal context handed to effect authors to create transforms from effects /// and any other operation tied to context which is not useful to the application @@ -48,7 +46,6 @@ interface DX_DECLARE_INTERFACE("84ab595a-fc81-4546-bacd-e8ef4d8abe7a") ID2D1Effe ) PURE; }; // interface ID2D1EffectContext1 - #if NTDDI_VERSION >= NTDDI_WIN10_RS2 /// @@ -78,15 +75,12 @@ interface DX_DECLARE_INTERFACE("577ad2a0-9fc7-4dda-8b18-dab810140052") ID2D1Effe ) PURE; }; // interface ID2D1EffectContext2 - #endif #endif - #ifdef D2D_USE_C_DEFINITIONS - typedef interface ID2D1EffectContext1 ID2D1EffectContext1; #if NTDDI_VERSION >= NTDDI_WIN10_RS2 diff --git a/gfx/include/dxsdk/d2d1effecthelpers.hlsli b/gfx/include/dxsdk/d2d1effecthelpers.hlsli index aaa56597eb..de523bf4ba 100644 --- a/gfx/include/dxsdk/d2d1effecthelpers.hlsli +++ b/gfx/include/dxsdk/d2d1effecthelpers.hlsli @@ -313,4 +313,3 @@ inline float4 D2DGetScenePosition() #define D2DSampleInputAtOffset(index, offset) InputTexture##index.Sample(InputSampler##index, __d2dstatic_uv##index.xy + offset * __d2dstatic_uv##index.zw) #define D2DSampleInputAtPosition(index, pos) InputTexture##index.Sample(InputSampler##index, __d2dstatic_uv##index.xy + __d2dstatic_uv##index.zw * (pos - __d2dstatic_scenePos.xy)) - diff --git a/gfx/include/dxsdk/d2d1effects.h b/gfx/include/dxsdk/d2d1effects.h index 0903c91e06..225119e921 100644 --- a/gfx/include/dxsdk/d2d1effects.h +++ b/gfx/include/dxsdk/d2d1effects.h @@ -12,7 +12,6 @@ #ifndef _D2D1_EFFECTS_ #define _D2D1_EFFECTS_ - /*#include */ @@ -62,7 +61,6 @@ DEFINE_GUID(CLSID_D2D1Tile, 0xB0784138, 0x3B76, 0x4bc5, 0xB1 DEFINE_GUID(CLSID_D2D1Turbulence, 0xCF2BB6AE, 0x889A, 0x4ad7, 0xBA, 0x29, 0xA2, 0xFD, 0x73, 0x2C, 0x9F, 0xC9); DEFINE_GUID(CLSID_D2D1UnPremultiply, 0xfb9ac489, 0xad8d, 0x41ed, 0x99, 0x99, 0xbb, 0x63, 0x47, 0xd1, 0x10, 0xf7); - /// /// Specifies how the Crop effect handles the crop rectangle falling on fractional /// pixel coordinates. @@ -75,7 +73,6 @@ typedef enum D2D1_BORDER_MODE } D2D1_BORDER_MODE; - /// /// Specifies the color channel the Displacement map effect extracts the intensity /// from and uses it to spatially displace the image in the X or Y direction. @@ -90,7 +87,6 @@ typedef enum D2D1_CHANNEL_SELECTOR } D2D1_CHANNEL_SELECTOR; - /// /// Speficies whether a flip and/or rotation operation should be performed by the /// Bitmap source effect @@ -109,7 +105,6 @@ typedef enum D2D1_BITMAPSOURCE_ORIENTATION } D2D1_BITMAPSOURCE_ORIENTATION; - /// /// The enumeration of the Gaussian Blur effect's top level properties. /// @@ -146,7 +141,6 @@ typedef enum D2D1_GAUSSIANBLUR_OPTIMIZATION } D2D1_GAUSSIANBLUR_OPTIMIZATION; - /// /// The enumeration of the Directional Blur effect's top level properties. /// @@ -189,7 +183,6 @@ typedef enum D2D1_DIRECTIONALBLUR_OPTIMIZATION } D2D1_DIRECTIONALBLUR_OPTIMIZATION; - /// /// The enumeration of the Shadow effect's top level properties. /// @@ -226,7 +219,6 @@ typedef enum D2D1_SHADOW_OPTIMIZATION } D2D1_SHADOW_OPTIMIZATION; - /// /// The enumeration of the Blend effect's top level properties. /// @@ -274,7 +266,6 @@ typedef enum D2D1_BLEND_MODE } D2D1_BLEND_MODE; - /// /// The enumeration of the Saturation effect's top level properties. /// @@ -290,7 +281,6 @@ typedef enum D2D1_SATURATION_PROP } D2D1_SATURATION_PROP; - /// /// The enumeration of the Hue Rotation effect's top level properties. /// @@ -306,7 +296,6 @@ typedef enum D2D1_HUEROTATION_PROP } D2D1_HUEROTATION_PROP; - /// /// The enumeration of the Color Matrix effect's top level properties. /// @@ -342,7 +331,6 @@ typedef enum D2D1_COLORMATRIX_ALPHA_MODE } D2D1_COLORMATRIX_ALPHA_MODE; - /// /// The enumeration of the Bitmap Source effect's top level properties. /// @@ -407,7 +395,6 @@ typedef enum D2D1_BITMAPSOURCE_ALPHA_MODE } D2D1_BITMAPSOURCE_ALPHA_MODE; - /// /// The enumeration of the Composite effect's top level properties. /// @@ -423,7 +410,6 @@ typedef enum D2D1_COMPOSITE_PROP } D2D1_COMPOSITE_PROP; - /// /// The enumeration of the 3D Transform effect's top level properties. /// @@ -462,7 +448,6 @@ typedef enum D2D1_3DTRANSFORM_INTERPOLATION_MODE } D2D1_3DTRANSFORM_INTERPOLATION_MODE; - /// /// The enumeration of the 3D Perspective Transform effect's top level properties. /// @@ -531,7 +516,6 @@ typedef enum D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE } D2D1_3DPERSPECTIVETRANSFORM_INTERPOLATION_MODE; - /// /// The enumeration of the 2D Affine Transform effect's top level properties. /// @@ -577,7 +561,6 @@ typedef enum D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE } D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE; - /// /// The enumeration of the DPI Compensation effect's top level properties. /// @@ -617,7 +600,6 @@ typedef enum D2D1_DPICOMPENSATION_INTERPOLATION_MODE } D2D1_DPICOMPENSATION_INTERPOLATION_MODE; - /// /// The enumeration of the Scale effect's top level properties. /// @@ -669,7 +651,6 @@ typedef enum D2D1_SCALE_INTERPOLATION_MODE } D2D1_SCALE_INTERPOLATION_MODE; - /// /// The enumeration of the Turbulence effect's top level properties. /// @@ -729,7 +710,6 @@ typedef enum D2D1_TURBULENCE_NOISE } D2D1_TURBULENCE_NOISE; - /// /// The enumeration of the Displacement Map effect's top level properties. /// @@ -757,7 +737,6 @@ typedef enum D2D1_DISPLACEMENTMAP_PROP } D2D1_DISPLACEMENTMAP_PROP; - /// /// The enumeration of the Color Management effect's top level properties. /// @@ -820,7 +799,6 @@ typedef enum D2D1_COLORMANAGEMENT_QUALITY } D2D1_COLORMANAGEMENT_QUALITY; - /// /// Specifies which ICC rendering intent the Color management effect should use. /// @@ -834,7 +812,6 @@ typedef enum D2D1_COLORMANAGEMENT_RENDERING_INTENT } D2D1_COLORMANAGEMENT_RENDERING_INTENT; - /// /// The enumeration of the Histogram effect's top level properties. /// @@ -862,7 +839,6 @@ typedef enum D2D1_HISTOGRAM_PROP } D2D1_HISTOGRAM_PROP; - /// /// The enumeration of the Point-Specular effect's top level properties. /// @@ -926,7 +902,6 @@ typedef enum D2D1_POINTSPECULAR_SCALE_MODE } D2D1_POINTSPECULAR_SCALE_MODE; - /// /// The enumeration of the Spot-Specular effect's top level properties. /// @@ -1008,7 +983,6 @@ typedef enum D2D1_SPOTSPECULAR_SCALE_MODE } D2D1_SPOTSPECULAR_SCALE_MODE; - /// /// The enumeration of the Distant-Specular effect's top level properties. /// @@ -1078,7 +1052,6 @@ typedef enum D2D1_DISTANTSPECULAR_SCALE_MODE } D2D1_DISTANTSPECULAR_SCALE_MODE; - /// /// The enumeration of the Point-Diffuse effect's top level properties. /// @@ -1136,7 +1109,6 @@ typedef enum D2D1_POINTDIFFUSE_SCALE_MODE } D2D1_POINTDIFFUSE_SCALE_MODE; - /// /// The enumeration of the Spot-Diffuse effect's top level properties. /// @@ -1212,7 +1184,6 @@ typedef enum D2D1_SPOTDIFFUSE_SCALE_MODE } D2D1_SPOTDIFFUSE_SCALE_MODE; - /// /// The enumeration of the Distant-Diffuse effect's top level properties. /// @@ -1276,7 +1247,6 @@ typedef enum D2D1_DISTANTDIFFUSE_SCALE_MODE } D2D1_DISTANTDIFFUSE_SCALE_MODE; - /// /// The enumeration of the Flood effect's top level properties. /// @@ -1292,7 +1262,6 @@ typedef enum D2D1_FLOOD_PROP } D2D1_FLOOD_PROP; - /// /// The enumeration of the Linear Transfer effect's top level properties. /// @@ -1380,7 +1349,6 @@ typedef enum D2D1_LINEARTRANSFER_PROP } D2D1_LINEARTRANSFER_PROP; - /// /// The enumeration of the Gamma Transfer effect's top level properties. /// @@ -1492,7 +1460,6 @@ typedef enum D2D1_GAMMATRANSFER_PROP } D2D1_GAMMATRANSFER_PROP; - /// /// The enumeration of the Table Transfer effect's top level properties. /// @@ -1556,7 +1523,6 @@ typedef enum D2D1_TABLETRANSFER_PROP } D2D1_TABLETRANSFER_PROP; - /// /// The enumeration of the Discrete Transfer effect's top level properties. /// @@ -1620,7 +1586,6 @@ typedef enum D2D1_DISCRETETRANSFER_PROP } D2D1_DISCRETETRANSFER_PROP; - /// /// The enumeration of the Convolve Matrix effect's top level properties. /// @@ -1708,7 +1673,6 @@ typedef enum D2D1_CONVOLVEMATRIX_SCALE_MODE } D2D1_CONVOLVEMATRIX_SCALE_MODE; - /// /// The enumeration of the Brightness effect's top level properties. /// @@ -1730,7 +1694,6 @@ typedef enum D2D1_BRIGHTNESS_PROP } D2D1_BRIGHTNESS_PROP; - /// /// The enumeration of the Arithmetic Composite effect's top level properties. /// @@ -1752,7 +1715,6 @@ typedef enum D2D1_ARITHMETICCOMPOSITE_PROP } D2D1_ARITHMETICCOMPOSITE_PROP; - /// /// The enumeration of the Crop effect's top level properties. /// @@ -1774,7 +1736,6 @@ typedef enum D2D1_CROP_PROP } D2D1_CROP_PROP; - /// /// The enumeration of the Border effect's top level properties. /// @@ -1796,7 +1757,6 @@ typedef enum D2D1_BORDER_PROP } D2D1_BORDER_PROP; - /// /// The edge mode for the Border effect. /// @@ -1809,7 +1769,6 @@ typedef enum D2D1_BORDER_EDGE_MODE } D2D1_BORDER_EDGE_MODE; - /// /// The enumeration of the Morphology effect's top level properties. /// @@ -1845,7 +1804,6 @@ typedef enum D2D1_MORPHOLOGY_MODE } D2D1_MORPHOLOGY_MODE; - /// /// The enumeration of the Tile effect's top level properties. /// @@ -1861,7 +1819,6 @@ typedef enum D2D1_TILE_PROP } D2D1_TILE_PROP; - /// /// The enumeration of the Atlas effect's top level properties. /// @@ -1883,7 +1840,6 @@ typedef enum D2D1_ATLAS_PROP } D2D1_ATLAS_PROP; - /// /// The enumeration of the Opacity Metadata effect's top level properties. /// @@ -1899,7 +1855,6 @@ typedef enum D2D1_OPACITYMETADATA_PROP } D2D1_OPACITYMETADATA_PROP; - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ diff --git a/gfx/include/dxsdk/d2d1effects_1.h b/gfx/include/dxsdk/d2d1effects_1.h index bbeee6fb07..083834338c 100644 --- a/gfx/include/dxsdk/d2d1effects_1.h +++ b/gfx/include/dxsdk/d2d1effects_1.h @@ -75,7 +75,6 @@ typedef enum D2D1_YCBCR_INTERPOLATION_MODE } D2D1_YCBCR_INTERPOLATION_MODE; - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ diff --git a/gfx/include/dxsdk/d2d1effects_2.h b/gfx/include/dxsdk/d2d1effects_2.h index a8083b7f15..64944ea15d 100644 --- a/gfx/include/dxsdk/d2d1effects_2.h +++ b/gfx/include/dxsdk/d2d1effects_2.h @@ -71,7 +71,6 @@ typedef enum D2D1_CONTRAST_PROP } D2D1_CONTRAST_PROP; - /// /// The enumeration of the RgbToHue effect's top level properties. /// @@ -95,7 +94,6 @@ typedef enum D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE } D2D1_RGBTOHUE_OUTPUT_COLOR_SPACE; - /// /// The enumeration of the HueToRgb effect's top level properties. /// @@ -119,7 +117,6 @@ typedef enum D2D1_HUETORGB_INPUT_COLOR_SPACE } D2D1_HUETORGB_INPUT_COLOR_SPACE; - /// /// The enumeration of the Chroma Key effect's top level properties. /// @@ -153,7 +150,6 @@ typedef enum D2D1_CHROMAKEY_PROP } D2D1_CHROMAKEY_PROP; - /// /// The enumeration of the Emboss effect's top level properties. /// @@ -175,7 +171,6 @@ typedef enum D2D1_EMBOSS_PROP } D2D1_EMBOSS_PROP; - /// /// The enumeration of the Exposure effect's top level properties. /// @@ -191,7 +186,6 @@ typedef enum D2D1_EXPOSURE_PROP } D2D1_EXPOSURE_PROP; - /// /// The enumeration of the Posterize effect's top level properties. /// @@ -219,7 +213,6 @@ typedef enum D2D1_POSTERIZE_PROP } D2D1_POSTERIZE_PROP; - /// /// The enumeration of the Sepia effect's top level properties. /// @@ -241,7 +234,6 @@ typedef enum D2D1_SEPIA_PROP } D2D1_SEPIA_PROP; - /// /// The enumeration of the Sharpen effect's top level properties. /// @@ -263,7 +255,6 @@ typedef enum D2D1_SHARPEN_PROP } D2D1_SHARPEN_PROP; - /// /// The enumeration of the Straighten effect's top level properties. /// @@ -302,7 +293,6 @@ typedef enum D2D1_STRAIGHTEN_SCALE_MODE } D2D1_STRAIGHTEN_SCALE_MODE; - /// /// The enumeration of the Temperature And Tint effect's top level properties. /// @@ -324,7 +314,6 @@ typedef enum D2D1_TEMPERATUREANDTINT_PROP } D2D1_TEMPERATUREANDTINT_PROP; - /// /// The enumeration of the Vignette effect's top level properties. /// @@ -352,7 +341,6 @@ typedef enum D2D1_VIGNETTE_PROP } D2D1_VIGNETTE_PROP; - /// /// The enumeration of the Edge Detection effect's top level properties. /// @@ -400,7 +388,6 @@ typedef enum D2D1_EDGEDETECTION_MODE } D2D1_EDGEDETECTION_MODE; - /// /// The enumeration of the Highlights and Shadows effect's top level properties. /// @@ -448,7 +435,6 @@ typedef enum D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA } D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA; - /// /// The enumeration of the Lookup Table 3D effect's top level properties. /// @@ -470,7 +456,6 @@ typedef enum D2D1_LOOKUPTABLE3D_PROP } D2D1_LOOKUPTABLE3D_PROP; - #if NTDDI_VERSION >= NTDDI_WIN10_RS1 /// @@ -488,7 +473,6 @@ typedef enum D2D1_OPACITY_PROP } D2D1_OPACITY_PROP; - /// /// The enumeration of the Cross Fade effect's top level properties. /// @@ -504,7 +488,6 @@ typedef enum D2D1_CROSSFADE_PROP } D2D1_CROSSFADE_PROP; - /// /// The enumeration of the Tint effect's top level properties. /// @@ -526,7 +509,6 @@ typedef enum D2D1_TINT_PROP } D2D1_TINT_PROP; - #endif // #if NTDDI_VERSION >= NTDDI_WIN10_RS1 /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ diff --git a/gfx/include/dxsdk/d2d1helper.h b/gfx/include/dxsdk/d2d1helper.h index 46bcbd12e7..4012cc90ad 100644 --- a/gfx/include/dxsdk/d2d1helper.h +++ b/gfx/include/dxsdk/d2d1helper.h @@ -809,7 +809,6 @@ namespace D2D1 return Translation(SizeF(x, y)); } - static COM_DECLSPEC_NOTHROW D2D1FORCEINLINE @@ -1030,4 +1029,3 @@ operator==(const D2D1_RECT_U &rect1, const D2D1_RECT_U &rect2) #endif // #ifndef D2D_USE_C_DEFINITIONS #endif // #ifndef _D2D1_HELPER_H_ - diff --git a/gfx/include/dxsdk/d2d1svg.h b/gfx/include/dxsdk/d2d1svg.h index 5611d3cdb1..6abb0b9777 100644 --- a/gfx/include/dxsdk/d2d1svg.h +++ b/gfx/include/dxsdk/d2d1svg.h @@ -72,7 +72,6 @@ typedef enum D2D1_SVG_PAINT_TYPE } D2D1_SVG_PAINT_TYPE; - /// /// Specifies the units for an SVG length. /// @@ -92,7 +91,6 @@ typedef enum D2D1_SVG_LENGTH_UNITS } D2D1_SVG_LENGTH_UNITS; - /// /// Specifies a value for the SVG display property. /// @@ -112,7 +110,6 @@ typedef enum D2D1_SVG_DISPLAY } D2D1_SVG_DISPLAY; - /// /// Specifies a value for the SVG visibility property. /// @@ -132,7 +129,6 @@ typedef enum D2D1_SVG_VISIBILITY } D2D1_SVG_VISIBILITY; - /// /// Specifies a value for the SVG overflow property. /// @@ -152,7 +148,6 @@ typedef enum D2D1_SVG_OVERFLOW } D2D1_SVG_OVERFLOW; - /// /// Specifies a value for the SVG stroke-linecap property. /// @@ -177,7 +172,6 @@ typedef enum D2D1_SVG_LINE_CAP } D2D1_SVG_LINE_CAP; - /// /// Specifies a value for the SVG stroke-linejoin property. /// @@ -203,7 +197,6 @@ typedef enum D2D1_SVG_LINE_JOIN } D2D1_SVG_LINE_JOIN; - /// /// The alignment portion of the SVG preserveAspectRatio attribute. /// @@ -263,7 +256,6 @@ typedef enum D2D1_SVG_ASPECT_ALIGN } D2D1_SVG_ASPECT_ALIGN; - /// /// The meetOrSlice portion of the SVG preserveAspectRatio attribute. /// @@ -285,7 +277,6 @@ typedef enum D2D1_SVG_ASPECT_SCALING } D2D1_SVG_ASPECT_SCALING; - /// /// Represents a path commmand. Each command may reference floats from the segment /// data. Commands ending in _ABSOLUTE interpret data as absolute coordinate. @@ -407,7 +398,6 @@ typedef enum D2D1_SVG_PATH_COMMAND } D2D1_SVG_PATH_COMMAND; - /// /// Defines the coordinate system used for SVG gradient or clipPath elements. /// @@ -427,7 +417,6 @@ typedef enum D2D1_SVG_UNIT_TYPE } D2D1_SVG_UNIT_TYPE; - /// /// Defines the type of SVG string attribute to set or get. /// @@ -451,7 +440,6 @@ typedef enum D2D1_SVG_ATTRIBUTE_STRING_TYPE } D2D1_SVG_ATTRIBUTE_STRING_TYPE; - /// /// Defines the type of SVG POD attribute to set or get. /// @@ -531,7 +519,6 @@ typedef enum D2D1_SVG_ATTRIBUTE_POD_TYPE } D2D1_SVG_ATTRIBUTE_POD_TYPE; - /// /// Represents an SVG length. /// @@ -542,7 +529,6 @@ typedef struct D2D1_SVG_LENGTH } D2D1_SVG_LENGTH; - /// /// Represents all SVG preserveAspectRatio settings. /// @@ -568,7 +554,6 @@ typedef struct D2D1_SVG_PRESERVE_ASPECT_RATIO } D2D1_SVG_PRESERVE_ASPECT_RATIO; - /// /// Represents an SVG viewBox. /// @@ -581,7 +566,6 @@ typedef struct D2D1_SVG_VIEWBOX } D2D1_SVG_VIEWBOX; - EXTERN_C CONST IID IID_ID2D1SvgAttribute; EXTERN_C CONST IID IID_ID2D1SvgPaint; EXTERN_C CONST IID IID_ID2D1SvgStrokeDashArray; @@ -590,7 +574,6 @@ EXTERN_C CONST IID IID_ID2D1SvgPathData; EXTERN_C CONST IID IID_ID2D1SvgElement; EXTERN_C CONST IID IID_ID2D1SvgDocument; - #ifndef D2D_USE_C_DEFINITIONS #if NTDDI_VERSION >= NTDDI_WIN10_RS2 @@ -618,7 +601,6 @@ interface DX_DECLARE_INTERFACE("c9cdb0dd-f8c9-4e70-b7c2-301c80292c5e") ID2D1SvgA ) PURE; }; // interface ID2D1SvgAttribute - /// /// Interface describing an SVG 'fill' or 'stroke' value. /// @@ -693,7 +675,6 @@ interface DX_DECLARE_INTERFACE("d59bab0a-68a2-455b-a5dc-9eb2854e2490") ID2D1SvgP } }; // interface ID2D1SvgPaint - /// /// Interface describing an SVG 'stroke-dasharray' value. /// @@ -767,7 +748,6 @@ interface DX_DECLARE_INTERFACE("f1c0ca52-92a3-4f00-b4ce-f35691efd9d9") ID2D1SvgS ) PURE; }; // interface ID2D1SvgStrokeDashArray - /// /// Interface describing an SVG 'points' value in a 'polyline' or 'polygon' element. /// @@ -816,7 +796,6 @@ interface DX_DECLARE_INTERFACE("9dbe4c0d-3572-4dd9-9825-5530813bb712") ID2D1SvgP ) PURE; }; // interface ID2D1SvgPointCollection - /// /// Interface describing SVG path data. Path data can be set as the 'd' attribute on /// a 'path' element. @@ -924,7 +903,6 @@ interface DX_DECLARE_INTERFACE("c095e4f4-bb98-43d6-9745-4d1b84ec9888") ID2D1SvgP ) PURE; }; // interface ID2D1SvgPathData - /// /// Interface for all SVG elements. /// @@ -1679,7 +1657,6 @@ interface DX_DECLARE_INTERFACE("ac7b67a6-183e-49c1-a823-0ebe40b0db29") ID2D1SvgE } }; // interface ID2D1SvgElement - interface DX_DECLARE_INTERFACE("86b88e4d-afa4-4d7b-88e4-68a51c4a0aec") ID2D1SvgDocument : public ID2D1Resource { @@ -1814,19 +1791,14 @@ interface DX_DECLARE_INTERFACE("86b88e4d-afa4-4d7b-88e4-68a51c4a0aec") ID2D1SvgD } }; // interface ID2D1SvgDocument - #endif #endif - #ifdef D2D_USE_C_DEFINITIONS - #endif - - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ #endif // #ifndef _D2D1_SVG_ diff --git a/gfx/include/dxsdk/d2derr.h b/gfx/include/dxsdk/d2derr.h index 86924be4e1..de94ec53f8 100644 --- a/gfx/include/dxsdk/d2derr.h +++ b/gfx/include/dxsdk/d2derr.h @@ -23,7 +23,6 @@ #define MAKE_D2DHR_ERR( code )\ MAKE_D2DHR( 1, code ) - //+---------------------------------------------------------------------------- // // D2D error codes @@ -53,13 +52,11 @@ // #define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) - // // The file specified was not found. // #define D2DERR_FILE_NOT_FOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) - #ifndef D2DERR_WRONG_STATE // diff --git a/gfx/include/dxsdk/d3d10.h b/gfx/include/dxsdk/d3d10.h index c0d91ad9ec..145b1ff336 100644 --- a/gfx/include/dxsdk/d3d10.h +++ b/gfx/include/dxsdk/d3d10.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,168 +46,144 @@ typedef interface ID3D10DeviceChild ID3D10DeviceChild; #endif /* __ID3D10DeviceChild_FWD_DEFINED__ */ - #ifndef __ID3D10DepthStencilState_FWD_DEFINED__ #define __ID3D10DepthStencilState_FWD_DEFINED__ typedef interface ID3D10DepthStencilState ID3D10DepthStencilState; #endif /* __ID3D10DepthStencilState_FWD_DEFINED__ */ - #ifndef __ID3D10BlendState_FWD_DEFINED__ #define __ID3D10BlendState_FWD_DEFINED__ typedef interface ID3D10BlendState ID3D10BlendState; #endif /* __ID3D10BlendState_FWD_DEFINED__ */ - #ifndef __ID3D10RasterizerState_FWD_DEFINED__ #define __ID3D10RasterizerState_FWD_DEFINED__ typedef interface ID3D10RasterizerState ID3D10RasterizerState; #endif /* __ID3D10RasterizerState_FWD_DEFINED__ */ - #ifndef __ID3D10Resource_FWD_DEFINED__ #define __ID3D10Resource_FWD_DEFINED__ typedef interface ID3D10Resource ID3D10Resource; #endif /* __ID3D10Resource_FWD_DEFINED__ */ - #ifndef __ID3D10Buffer_FWD_DEFINED__ #define __ID3D10Buffer_FWD_DEFINED__ typedef interface ID3D10Buffer ID3D10Buffer; #endif /* __ID3D10Buffer_FWD_DEFINED__ */ - #ifndef __ID3D10Texture1D_FWD_DEFINED__ #define __ID3D10Texture1D_FWD_DEFINED__ typedef interface ID3D10Texture1D ID3D10Texture1D; #endif /* __ID3D10Texture1D_FWD_DEFINED__ */ - #ifndef __ID3D10Texture2D_FWD_DEFINED__ #define __ID3D10Texture2D_FWD_DEFINED__ typedef interface ID3D10Texture2D ID3D10Texture2D; #endif /* __ID3D10Texture2D_FWD_DEFINED__ */ - #ifndef __ID3D10Texture3D_FWD_DEFINED__ #define __ID3D10Texture3D_FWD_DEFINED__ typedef interface ID3D10Texture3D ID3D10Texture3D; #endif /* __ID3D10Texture3D_FWD_DEFINED__ */ - #ifndef __ID3D10View_FWD_DEFINED__ #define __ID3D10View_FWD_DEFINED__ typedef interface ID3D10View ID3D10View; #endif /* __ID3D10View_FWD_DEFINED__ */ - #ifndef __ID3D10ShaderResourceView_FWD_DEFINED__ #define __ID3D10ShaderResourceView_FWD_DEFINED__ typedef interface ID3D10ShaderResourceView ID3D10ShaderResourceView; #endif /* __ID3D10ShaderResourceView_FWD_DEFINED__ */ - #ifndef __ID3D10RenderTargetView_FWD_DEFINED__ #define __ID3D10RenderTargetView_FWD_DEFINED__ typedef interface ID3D10RenderTargetView ID3D10RenderTargetView; #endif /* __ID3D10RenderTargetView_FWD_DEFINED__ */ - #ifndef __ID3D10DepthStencilView_FWD_DEFINED__ #define __ID3D10DepthStencilView_FWD_DEFINED__ typedef interface ID3D10DepthStencilView ID3D10DepthStencilView; #endif /* __ID3D10DepthStencilView_FWD_DEFINED__ */ - #ifndef __ID3D10VertexShader_FWD_DEFINED__ #define __ID3D10VertexShader_FWD_DEFINED__ typedef interface ID3D10VertexShader ID3D10VertexShader; #endif /* __ID3D10VertexShader_FWD_DEFINED__ */ - #ifndef __ID3D10GeometryShader_FWD_DEFINED__ #define __ID3D10GeometryShader_FWD_DEFINED__ typedef interface ID3D10GeometryShader ID3D10GeometryShader; #endif /* __ID3D10GeometryShader_FWD_DEFINED__ */ - #ifndef __ID3D10PixelShader_FWD_DEFINED__ #define __ID3D10PixelShader_FWD_DEFINED__ typedef interface ID3D10PixelShader ID3D10PixelShader; #endif /* __ID3D10PixelShader_FWD_DEFINED__ */ - #ifndef __ID3D10InputLayout_FWD_DEFINED__ #define __ID3D10InputLayout_FWD_DEFINED__ typedef interface ID3D10InputLayout ID3D10InputLayout; #endif /* __ID3D10InputLayout_FWD_DEFINED__ */ - #ifndef __ID3D10SamplerState_FWD_DEFINED__ #define __ID3D10SamplerState_FWD_DEFINED__ typedef interface ID3D10SamplerState ID3D10SamplerState; #endif /* __ID3D10SamplerState_FWD_DEFINED__ */ - #ifndef __ID3D10Asynchronous_FWD_DEFINED__ #define __ID3D10Asynchronous_FWD_DEFINED__ typedef interface ID3D10Asynchronous ID3D10Asynchronous; #endif /* __ID3D10Asynchronous_FWD_DEFINED__ */ - #ifndef __ID3D10Query_FWD_DEFINED__ #define __ID3D10Query_FWD_DEFINED__ typedef interface ID3D10Query ID3D10Query; #endif /* __ID3D10Query_FWD_DEFINED__ */ - #ifndef __ID3D10Predicate_FWD_DEFINED__ #define __ID3D10Predicate_FWD_DEFINED__ typedef interface ID3D10Predicate ID3D10Predicate; #endif /* __ID3D10Predicate_FWD_DEFINED__ */ - #ifndef __ID3D10Counter_FWD_DEFINED__ #define __ID3D10Counter_FWD_DEFINED__ typedef interface ID3D10Counter ID3D10Counter; #endif /* __ID3D10Counter_FWD_DEFINED__ */ - #ifndef __ID3D10Device_FWD_DEFINED__ #define __ID3D10Device_FWD_DEFINED__ typedef interface ID3D10Device ID3D10Device; #endif /* __ID3D10Device_FWD_DEFINED__ */ - #ifndef __ID3D10Multithread_FWD_DEFINED__ #define __ID3D10Multithread_FWD_DEFINED__ typedef interface ID3D10Multithread ID3D10Multithread; #endif /* __ID3D10Multithread_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -222,7 +194,6 @@ typedef interface ID3D10Multithread ID3D10Multithread; extern "C"{ #endif - /* interface __MIDL_itf_d3d10_0000_0000 */ /* [local] */ @@ -807,9 +778,6 @@ typedef struct D3D10_BOX UINT back; } D3D10_BOX; - - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0000_v0_0_s_ifspec; @@ -819,7 +787,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0000_v0_0_s_ifspec; /* interface ID3D10DeviceChild */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10DeviceChild; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -917,7 +884,6 @@ EXTERN_C const IID IID_ID3D10DeviceChild; #ifdef COBJMACROS - #define ID3D10DeviceChild_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -927,7 +893,6 @@ EXTERN_C const IID IID_ID3D10DeviceChild; #define ID3D10DeviceChild_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10DeviceChild_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -942,15 +907,10 @@ EXTERN_C const IID IID_ID3D10DeviceChild; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10DeviceChild_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0001 */ /* [local] */ @@ -1007,8 +967,6 @@ typedef struct D3D10_DEPTH_STENCIL_DESC D3D10_DEPTH_STENCILOP_DESC BackFace; } D3D10_DEPTH_STENCIL_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0001_v0_0_s_ifspec; @@ -1018,7 +976,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0001_v0_0_s_ifspec; /* interface ID3D10DepthStencilState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10DepthStencilState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1099,7 +1056,6 @@ EXTERN_C const IID IID_ID3D10DepthStencilState; #ifdef COBJMACROS - #define ID3D10DepthStencilState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1109,7 +1065,6 @@ EXTERN_C const IID IID_ID3D10DepthStencilState; #define ID3D10DepthStencilState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10DepthStencilState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1122,21 +1077,15 @@ EXTERN_C const IID IID_ID3D10DepthStencilState; #define ID3D10DepthStencilState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10DepthStencilState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10DepthStencilState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0002 */ /* [local] */ @@ -1195,8 +1144,6 @@ typedef struct D3D10_BLEND_DESC UINT8 RenderTargetWriteMask[ 8 ]; } D3D10_BLEND_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0002_v0_0_s_ifspec; @@ -1206,7 +1153,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0002_v0_0_s_ifspec; /* interface ID3D10BlendState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10BlendState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1287,7 +1233,6 @@ EXTERN_C const IID IID_ID3D10BlendState; #ifdef COBJMACROS - #define ID3D10BlendState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1297,7 +1242,6 @@ EXTERN_C const IID IID_ID3D10BlendState; #define ID3D10BlendState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10BlendState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1310,21 +1254,15 @@ EXTERN_C const IID IID_ID3D10BlendState; #define ID3D10BlendState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10BlendState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10BlendState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0003 */ /* [local] */ @@ -1342,8 +1280,6 @@ typedef struct D3D10_RASTERIZER_DESC BOOL AntialiasedLineEnable; } D3D10_RASTERIZER_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0003_v0_0_s_ifspec; @@ -1353,7 +1289,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0003_v0_0_s_ifspec; /* interface ID3D10RasterizerState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10RasterizerState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1434,7 +1369,6 @@ EXTERN_C const IID IID_ID3D10RasterizerState; #ifdef COBJMACROS - #define ID3D10RasterizerState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1444,7 +1378,6 @@ EXTERN_C const IID IID_ID3D10RasterizerState; #define ID3D10RasterizerState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10RasterizerState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1457,21 +1390,15 @@ EXTERN_C const IID IID_ID3D10RasterizerState; #define ID3D10RasterizerState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10RasterizerState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10RasterizerState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0004 */ /* [local] */ @@ -1486,8 +1413,6 @@ typedef struct D3D10_SUBRESOURCE_DATA UINT SysMemSlicePitch; } D3D10_SUBRESOURCE_DATA; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0004_v0_0_s_ifspec; @@ -1497,7 +1422,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0004_v0_0_s_ifspec; /* interface ID3D10Resource */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Resource; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1592,7 +1516,6 @@ EXTERN_C const IID IID_ID3D10Resource; #ifdef COBJMACROS - #define ID3D10Resource_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1602,7 +1525,6 @@ EXTERN_C const IID IID_ID3D10Resource; #define ID3D10Resource_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Resource_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1615,7 +1537,6 @@ EXTERN_C const IID IID_ID3D10Resource; #define ID3D10Resource_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Resource_GetType(This,rType) \ ( (This)->lpVtbl -> GetType(This,rType) ) @@ -1627,15 +1548,10 @@ EXTERN_C const IID IID_ID3D10Resource; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Resource_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0005 */ /* [local] */ @@ -1674,7 +1590,6 @@ struct CD3D10_BUFFER_DESC : public D3D10_BUFFER_DESC }; #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0005_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0005_v0_0_s_ifspec; @@ -1684,7 +1599,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0005_v0_0_s_ifspec; /* interface ID3D10Buffer */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Buffer; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1800,7 +1714,6 @@ EXTERN_C const IID IID_ID3D10Buffer; #ifdef COBJMACROS - #define ID3D10Buffer_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1810,7 +1723,6 @@ EXTERN_C const IID IID_ID3D10Buffer; #define ID3D10Buffer_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Buffer_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1823,7 +1735,6 @@ EXTERN_C const IID IID_ID3D10Buffer; #define ID3D10Buffer_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Buffer_GetType(This,rType) \ ( (This)->lpVtbl -> GetType(This,rType) ) @@ -1833,7 +1744,6 @@ EXTERN_C const IID IID_ID3D10Buffer; #define ID3D10Buffer_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D10Buffer_Map(This,MapType,MapFlags,ppData) \ ( (This)->lpVtbl -> Map(This,MapType,MapFlags,ppData) ) @@ -1845,15 +1755,10 @@ EXTERN_C const IID IID_ID3D10Buffer; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Buffer_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0006 */ /* [local] */ @@ -1901,7 +1806,6 @@ struct CD3D10_TEXTURE1D_DESC : public D3D10_TEXTURE1D_DESC }; #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0006_v0_0_s_ifspec; @@ -1911,7 +1815,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0006_v0_0_s_ifspec; /* interface ID3D10Texture1D */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Texture1D; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2035,7 +1938,6 @@ EXTERN_C const IID IID_ID3D10Texture1D; #ifdef COBJMACROS - #define ID3D10Texture1D_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2045,7 +1947,6 @@ EXTERN_C const IID IID_ID3D10Texture1D; #define ID3D10Texture1D_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Texture1D_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2058,7 +1959,6 @@ EXTERN_C const IID IID_ID3D10Texture1D; #define ID3D10Texture1D_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Texture1D_GetType(This,rType) \ ( (This)->lpVtbl -> GetType(This,rType) ) @@ -2068,7 +1968,6 @@ EXTERN_C const IID IID_ID3D10Texture1D; #define ID3D10Texture1D_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D10Texture1D_Map(This,Subresource,MapType,MapFlags,ppData) \ ( (This)->lpVtbl -> Map(This,Subresource,MapType,MapFlags,ppData) ) @@ -2080,15 +1979,10 @@ EXTERN_C const IID IID_ID3D10Texture1D; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Texture1D_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0007 */ /* [local] */ @@ -2149,8 +2043,6 @@ typedef struct D3D10_MAPPED_TEXTURE2D UINT RowPitch; } D3D10_MAPPED_TEXTURE2D; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0007_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0007_v0_0_s_ifspec; @@ -2160,7 +2052,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0007_v0_0_s_ifspec; /* interface ID3D10Texture2D */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Texture2D; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2284,7 +2175,6 @@ EXTERN_C const IID IID_ID3D10Texture2D; #ifdef COBJMACROS - #define ID3D10Texture2D_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2294,7 +2184,6 @@ EXTERN_C const IID IID_ID3D10Texture2D; #define ID3D10Texture2D_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Texture2D_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2307,7 +2196,6 @@ EXTERN_C const IID IID_ID3D10Texture2D; #define ID3D10Texture2D_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Texture2D_GetType(This,rType) \ ( (This)->lpVtbl -> GetType(This,rType) ) @@ -2317,7 +2205,6 @@ EXTERN_C const IID IID_ID3D10Texture2D; #define ID3D10Texture2D_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D10Texture2D_Map(This,Subresource,MapType,MapFlags,pMappedTex2D) \ ( (This)->lpVtbl -> Map(This,Subresource,MapType,MapFlags,pMappedTex2D) ) @@ -2329,15 +2216,10 @@ EXTERN_C const IID IID_ID3D10Texture2D; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Texture2D_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0008 */ /* [local] */ @@ -2394,8 +2276,6 @@ typedef struct D3D10_MAPPED_TEXTURE3D UINT DepthPitch; } D3D10_MAPPED_TEXTURE3D; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0008_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0008_v0_0_s_ifspec; @@ -2405,7 +2285,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0008_v0_0_s_ifspec; /* interface ID3D10Texture3D */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Texture3D; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2529,7 +2408,6 @@ EXTERN_C const IID IID_ID3D10Texture3D; #ifdef COBJMACROS - #define ID3D10Texture3D_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2539,7 +2417,6 @@ EXTERN_C const IID IID_ID3D10Texture3D; #define ID3D10Texture3D_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Texture3D_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2552,7 +2429,6 @@ EXTERN_C const IID IID_ID3D10Texture3D; #define ID3D10Texture3D_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Texture3D_GetType(This,rType) \ ( (This)->lpVtbl -> GetType(This,rType) ) @@ -2562,7 +2438,6 @@ EXTERN_C const IID IID_ID3D10Texture3D; #define ID3D10Texture3D_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D10Texture3D_Map(This,Subresource,MapType,MapFlags,pMappedTex3D) \ ( (This)->lpVtbl -> Map(This,Subresource,MapType,MapFlags,pMappedTex3D) ) @@ -2574,15 +2449,10 @@ EXTERN_C const IID IID_ID3D10Texture3D; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Texture3D_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0009 */ /* [local] */ @@ -2597,8 +2467,6 @@ enum D3D10_TEXTURECUBE_FACE D3D10_TEXTURECUBE_FACE_NEGATIVE_Z = 5 } D3D10_TEXTURECUBE_FACE; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0009_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0009_v0_0_s_ifspec; @@ -2608,7 +2476,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0009_v0_0_s_ifspec; /* interface ID3D10View */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10View; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2689,7 +2556,6 @@ EXTERN_C const IID IID_ID3D10View; #ifdef COBJMACROS - #define ID3D10View_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2699,7 +2565,6 @@ EXTERN_C const IID IID_ID3D10View; #define ID3D10View_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10View_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2712,21 +2577,15 @@ EXTERN_C const IID IID_ID3D10View; #define ID3D10View_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10View_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10View_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0010 */ /* [local] */ @@ -2813,8 +2672,6 @@ typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC } ; } D3D10_SHADER_RESOURCE_VIEW_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0010_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0010_v0_0_s_ifspec; @@ -2824,7 +2681,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0010_v0_0_s_ifspec; /* interface ID3D10ShaderResourceView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10ShaderResourceView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2910,7 +2766,6 @@ EXTERN_C const IID IID_ID3D10ShaderResourceView; #ifdef COBJMACROS - #define ID3D10ShaderResourceView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2920,7 +2775,6 @@ EXTERN_C const IID IID_ID3D10ShaderResourceView; #define ID3D10ShaderResourceView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10ShaderResourceView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2933,25 +2787,18 @@ EXTERN_C const IID IID_ID3D10ShaderResourceView; #define ID3D10ShaderResourceView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10ShaderResourceView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D10ShaderResourceView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10ShaderResourceView_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0011 */ /* [local] */ @@ -3028,8 +2875,6 @@ typedef struct D3D10_RENDER_TARGET_VIEW_DESC } ; } D3D10_RENDER_TARGET_VIEW_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0011_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0011_v0_0_s_ifspec; @@ -3039,7 +2884,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0011_v0_0_s_ifspec; /* interface ID3D10RenderTargetView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10RenderTargetView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3125,7 +2969,6 @@ EXTERN_C const IID IID_ID3D10RenderTargetView; #ifdef COBJMACROS - #define ID3D10RenderTargetView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3135,7 +2978,6 @@ EXTERN_C const IID IID_ID3D10RenderTargetView; #define ID3D10RenderTargetView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10RenderTargetView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3148,25 +2990,18 @@ EXTERN_C const IID IID_ID3D10RenderTargetView; #define ID3D10RenderTargetView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10RenderTargetView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D10RenderTargetView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10RenderTargetView_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0012 */ /* [local] */ @@ -3220,8 +3055,6 @@ typedef struct D3D10_DEPTH_STENCIL_VIEW_DESC } ; } D3D10_DEPTH_STENCIL_VIEW_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0012_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0012_v0_0_s_ifspec; @@ -3231,7 +3064,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0012_v0_0_s_ifspec; /* interface ID3D10DepthStencilView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10DepthStencilView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3317,7 +3149,6 @@ EXTERN_C const IID IID_ID3D10DepthStencilView; #ifdef COBJMACROS - #define ID3D10DepthStencilView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3327,7 +3158,6 @@ EXTERN_C const IID IID_ID3D10DepthStencilView; #define ID3D10DepthStencilView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10DepthStencilView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3340,32 +3170,24 @@ EXTERN_C const IID IID_ID3D10DepthStencilView; #define ID3D10DepthStencilView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10DepthStencilView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D10DepthStencilView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10DepthStencilView_INTERFACE_DEFINED__ */ - #ifndef __ID3D10VertexShader_INTERFACE_DEFINED__ #define __ID3D10VertexShader_INTERFACE_DEFINED__ /* interface ID3D10VertexShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10VertexShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3437,7 +3259,6 @@ EXTERN_C const IID IID_ID3D10VertexShader; #ifdef COBJMACROS - #define ID3D10VertexShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3447,7 +3268,6 @@ EXTERN_C const IID IID_ID3D10VertexShader; #define ID3D10VertexShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10VertexShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3460,25 +3280,18 @@ EXTERN_C const IID IID_ID3D10VertexShader; #define ID3D10VertexShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10VertexShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D10GeometryShader_INTERFACE_DEFINED__ #define __ID3D10GeometryShader_INTERFACE_DEFINED__ /* interface ID3D10GeometryShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10GeometryShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3550,7 +3363,6 @@ EXTERN_C const IID IID_ID3D10GeometryShader; #ifdef COBJMACROS - #define ID3D10GeometryShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3560,7 +3372,6 @@ EXTERN_C const IID IID_ID3D10GeometryShader; #define ID3D10GeometryShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10GeometryShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3573,25 +3384,18 @@ EXTERN_C const IID IID_ID3D10GeometryShader; #define ID3D10GeometryShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10GeometryShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D10PixelShader_INTERFACE_DEFINED__ #define __ID3D10PixelShader_INTERFACE_DEFINED__ /* interface ID3D10PixelShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10PixelShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3663,7 +3467,6 @@ EXTERN_C const IID IID_ID3D10PixelShader; #ifdef COBJMACROS - #define ID3D10PixelShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3673,7 +3476,6 @@ EXTERN_C const IID IID_ID3D10PixelShader; #define ID3D10PixelShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10PixelShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3686,25 +3488,18 @@ EXTERN_C const IID IID_ID3D10PixelShader; #define ID3D10PixelShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10PixelShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D10InputLayout_INTERFACE_DEFINED__ #define __ID3D10InputLayout_INTERFACE_DEFINED__ /* interface ID3D10InputLayout */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10InputLayout; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3776,7 +3571,6 @@ EXTERN_C const IID IID_ID3D10InputLayout; #ifdef COBJMACROS - #define ID3D10InputLayout_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3786,7 +3580,6 @@ EXTERN_C const IID IID_ID3D10InputLayout; #define ID3D10InputLayout_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10InputLayout_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3799,18 +3592,12 @@ EXTERN_C const IID IID_ID3D10InputLayout; #define ID3D10InputLayout_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10InputLayout_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0017 */ /* [local] */ @@ -3914,8 +3701,6 @@ typedef struct D3D10_SAMPLER_DESC FLOAT MaxLOD; } D3D10_SAMPLER_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0017_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0017_v0_0_s_ifspec; @@ -3925,7 +3710,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0017_v0_0_s_ifspec; /* interface ID3D10SamplerState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10SamplerState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4006,7 +3790,6 @@ EXTERN_C const IID IID_ID3D10SamplerState; #ifdef COBJMACROS - #define ID3D10SamplerState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4016,7 +3799,6 @@ EXTERN_C const IID IID_ID3D10SamplerState; #define ID3D10SamplerState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10SamplerState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4029,21 +3811,15 @@ EXTERN_C const IID IID_ID3D10SamplerState; #define ID3D10SamplerState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10SamplerState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10SamplerState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0018 */ /* [local] */ @@ -4077,8 +3853,6 @@ enum D3D10_FORMAT_SUPPORT D3D10_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000 } D3D10_FORMAT_SUPPORT; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0018_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0018_v0_0_s_ifspec; @@ -4088,7 +3862,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0018_v0_0_s_ifspec; /* interface ID3D10Asynchronous */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Asynchronous; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4192,7 +3965,6 @@ EXTERN_C const IID IID_ID3D10Asynchronous; #ifdef COBJMACROS - #define ID3D10Asynchronous_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4202,7 +3974,6 @@ EXTERN_C const IID IID_ID3D10Asynchronous; #define ID3D10Asynchronous_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Asynchronous_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4215,7 +3986,6 @@ EXTERN_C const IID IID_ID3D10Asynchronous; #define ID3D10Asynchronous_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Asynchronous_Begin(This) \ ( (This)->lpVtbl -> Begin(This) ) @@ -4230,15 +4000,10 @@ EXTERN_C const IID IID_ID3D10Asynchronous; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Asynchronous_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0019 */ /* [local] */ @@ -4273,8 +4038,6 @@ typedef struct D3D10_QUERY_DESC UINT MiscFlags; } D3D10_QUERY_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0019_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0019_v0_0_s_ifspec; @@ -4284,7 +4047,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0019_v0_0_s_ifspec; /* interface ID3D10Query */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Query; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4383,7 +4145,6 @@ EXTERN_C const IID IID_ID3D10Query; #ifdef COBJMACROS - #define ID3D10Query_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4393,7 +4154,6 @@ EXTERN_C const IID IID_ID3D10Query; #define ID3D10Query_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Query_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4406,7 +4166,6 @@ EXTERN_C const IID IID_ID3D10Query; #define ID3D10Query_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Query_Begin(This) \ ( (This)->lpVtbl -> Begin(This) ) @@ -4419,28 +4178,21 @@ EXTERN_C const IID IID_ID3D10Query; #define ID3D10Query_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) - #define ID3D10Query_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Query_INTERFACE_DEFINED__ */ - #ifndef __ID3D10Predicate_INTERFACE_DEFINED__ #define __ID3D10Predicate_INTERFACE_DEFINED__ /* interface ID3D10Predicate */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Predicate; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4535,7 +4287,6 @@ EXTERN_C const IID IID_ID3D10Predicate; #ifdef COBJMACROS - #define ID3D10Predicate_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4545,7 +4296,6 @@ EXTERN_C const IID IID_ID3D10Predicate; #define ID3D10Predicate_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Predicate_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4558,7 +4308,6 @@ EXTERN_C const IID IID_ID3D10Predicate; #define ID3D10Predicate_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Predicate_Begin(This) \ ( (This)->lpVtbl -> Begin(This) ) @@ -4571,22 +4320,15 @@ EXTERN_C const IID IID_ID3D10Predicate; #define ID3D10Predicate_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) - #define ID3D10Predicate_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Predicate_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0021 */ /* [local] */ @@ -4660,8 +4402,6 @@ typedef struct D3D10_COUNTER_INFO UINT8 NumDetectableParallelUnits; } D3D10_COUNTER_INFO; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0021_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0021_v0_0_s_ifspec; @@ -4671,7 +4411,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0021_v0_0_s_ifspec; /* interface ID3D10Counter */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Counter; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4770,7 +4509,6 @@ EXTERN_C const IID IID_ID3D10Counter; #ifdef COBJMACROS - #define ID3D10Counter_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4780,7 +4518,6 @@ EXTERN_C const IID IID_ID3D10Counter; #define ID3D10Counter_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Counter_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4793,7 +4530,6 @@ EXTERN_C const IID IID_ID3D10Counter; #define ID3D10Counter_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10Counter_Begin(This) \ ( (This)->lpVtbl -> Begin(This) ) @@ -4806,28 +4542,21 @@ EXTERN_C const IID IID_ID3D10Counter; #define ID3D10Counter_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) - #define ID3D10Counter_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Counter_INTERFACE_DEFINED__ */ - #ifndef __ID3D10Device_INTERFACE_DEFINED__ #define __ID3D10Device_INTERFACE_DEFINED__ /* interface ID3D10Device */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Device; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6318,7 +6047,6 @@ EXTERN_C const IID IID_ID3D10Device; #ifdef COBJMACROS - #define ID3D10Device_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6328,7 +6056,6 @@ EXTERN_C const IID IID_ID3D10Device; #define ID3D10Device_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Device_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) @@ -6616,15 +6343,10 @@ EXTERN_C const IID IID_ID3D10Device; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Device_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0023 */ /* [local] */ @@ -6634,7 +6356,6 @@ EXTERN_C const IID IID_ID3D10Device; /*#pragma region Application Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0023_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0023_v0_0_s_ifspec; @@ -6644,7 +6365,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0023_v0_0_s_ifspec; /* interface ID3D10Multithread */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Multithread; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6710,7 +6430,6 @@ EXTERN_C const IID IID_ID3D10Multithread; #ifdef COBJMACROS - #define ID3D10Multithread_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6720,7 +6439,6 @@ EXTERN_C const IID IID_ID3D10Multithread; #define ID3D10Multithread_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Multithread_Enter(This) \ ( (This)->lpVtbl -> Enter(This) ) @@ -6735,15 +6453,10 @@ EXTERN_C const IID IID_ID3D10Multithread; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Multithread_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_0000_0024 */ /* [local] */ @@ -6766,7 +6479,6 @@ enum D3D10_CREATE_DEVICE_FLAG D3D10_CREATE_DEVICE_DEBUGGABLE = 0x400 } D3D10_CREATE_DEVICE_FLAG; - #define D3D10_SDK_VERSION ( 29 ) #if !defined( D3D10_IGNORE_SDK_LAYERS ) @@ -6802,7 +6514,6 @@ DEFINE_GUID(IID_ID3D10Counter,0x9B7E4C11,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04, DEFINE_GUID(IID_ID3D10Device,0x9B7E4C0F,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); DEFINE_GUID(IID_ID3D10Multithread,0x9B7E4E00,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); - extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0024_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0024_v0_0_s_ifspec; @@ -6815,5 +6526,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_0000_0024_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d10_1.h b/gfx/include/dxsdk/d3d10_1.h index cf959831c2..c4f984ca6e 100644 --- a/gfx/include/dxsdk/d3d10_1.h +++ b/gfx/include/dxsdk/d3d10_1.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,21 +46,18 @@ typedef interface ID3D10BlendState1 ID3D10BlendState1; #endif /* __ID3D10BlendState1_FWD_DEFINED__ */ - #ifndef __ID3D10ShaderResourceView1_FWD_DEFINED__ #define __ID3D10ShaderResourceView1_FWD_DEFINED__ typedef interface ID3D10ShaderResourceView1 ID3D10ShaderResourceView1; #endif /* __ID3D10ShaderResourceView1_FWD_DEFINED__ */ - #ifndef __ID3D10Device1_FWD_DEFINED__ #define __ID3D10Device1_FWD_DEFINED__ typedef interface ID3D10Device1 ID3D10Device1; #endif /* __ID3D10Device1_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -73,7 +66,6 @@ typedef interface ID3D10Device1 ID3D10Device1; extern "C"{ #endif - /* interface __MIDL_itf_d3d10_1_0000_0000 */ /* [local] */ @@ -158,8 +150,6 @@ typedef struct D3D10_BLEND_DESC1 D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[ 8 ]; } D3D10_BLEND_DESC1; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0000_v0_0_s_ifspec; @@ -169,7 +159,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0000_v0_0_s_ifspec; /* interface ID3D10BlendState1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10BlendState1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -255,7 +244,6 @@ EXTERN_C const IID IID_ID3D10BlendState1; #ifdef COBJMACROS - #define ID3D10BlendState1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -265,7 +253,6 @@ EXTERN_C const IID IID_ID3D10BlendState1; #define ID3D10BlendState1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10BlendState1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -278,25 +265,18 @@ EXTERN_C const IID IID_ID3D10BlendState1; #define ID3D10BlendState1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10BlendState1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D10BlendState1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10BlendState1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_1_0000_0001 */ /* [local] */ @@ -329,8 +309,6 @@ typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC1 } ; } D3D10_SHADER_RESOURCE_VIEW_DESC1; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0001_v0_0_s_ifspec; @@ -340,7 +318,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0001_v0_0_s_ifspec; /* interface ID3D10ShaderResourceView1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10ShaderResourceView1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -431,7 +408,6 @@ EXTERN_C const IID IID_ID3D10ShaderResourceView1; #ifdef COBJMACROS - #define ID3D10ShaderResourceView1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -441,7 +417,6 @@ EXTERN_C const IID IID_ID3D10ShaderResourceView1; #define ID3D10ShaderResourceView1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10ShaderResourceView1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -454,29 +429,21 @@ EXTERN_C const IID IID_ID3D10ShaderResourceView1; #define ID3D10ShaderResourceView1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D10ShaderResourceView1_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D10ShaderResourceView1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D10ShaderResourceView1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10ShaderResourceView1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_1_0000_0002 */ /* [local] */ @@ -487,8 +454,6 @@ enum D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS D3D10_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe } D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS; - - extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0002_v0_0_s_ifspec; @@ -498,7 +463,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0002_v0_0_s_ifspec; /* interface ID3D10Device1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Device1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1347,7 +1311,6 @@ EXTERN_C const IID IID_ID3D10Device1; #ifdef COBJMACROS - #define ID3D10Device1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1357,7 +1320,6 @@ EXTERN_C const IID IID_ID3D10Device1; #define ID3D10Device1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Device1_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) @@ -1643,7 +1605,6 @@ EXTERN_C const IID IID_ID3D10Device1; #define ID3D10Device1_GetTextFilterSize(This,pWidth,pHeight) \ ( (This)->lpVtbl -> GetTextFilterSize(This,pWidth,pHeight) ) - #define ID3D10Device1_CreateShaderResourceView1(This,pResource,pDesc,ppSRView) \ ( (This)->lpVtbl -> CreateShaderResourceView1(This,pResource,pDesc,ppSRView) ) @@ -1655,15 +1616,10 @@ EXTERN_C const IID IID_ID3D10Device1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Device1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10_1_0000_0003 */ /* [local] */ @@ -1776,7 +1732,6 @@ DEFINE_GUID(IID_ID3D10BlendState1,0xEDAD8D99,0x8A35,0x4d6d,0x85,0x66,0x2E,0xA2,0 DEFINE_GUID(IID_ID3D10ShaderResourceView1,0x9B7E4C87,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); DEFINE_GUID(IID_ID3D10Device1,0x9B7E4C8F,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); - extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0003_v0_0_s_ifspec; @@ -1789,5 +1744,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10_1_0000_0003_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d10_1shader.h b/gfx/include/dxsdk/d3d10_1shader.h index 7da84274c3..b7db6fbc25 100644 --- a/gfx/include/dxsdk/d3d10_1shader.h +++ b/gfx/include/dxsdk/d3d10_1shader.h @@ -14,8 +14,6 @@ /*#include */ - - //---------------------------------------------------------------------------- // Shader debugging structures //---------------------------------------------------------------------------- @@ -249,7 +247,6 @@ typedef struct _D3D10_SHADER_DEBUG_INFO // Interface definitions // - typedef interface ID3D10ShaderReflection1 ID3D10ShaderReflection1; typedef interface ID3D10ShaderReflection1 *LPD3D10SHADERREFLECTION1; @@ -303,4 +300,3 @@ extern "C" { #endif //__cplusplus #endif //__D3D10_1SHADER_H__ - diff --git a/gfx/include/dxsdk/d3d10effect.h b/gfx/include/dxsdk/d3d10effect.h index 67582bd36f..8bfc8afb11 100644 --- a/gfx/include/dxsdk/d3d10effect.h +++ b/gfx/include/dxsdk/d3d10effect.h @@ -230,7 +230,6 @@ HRESULT WINAPI D3D10CreateStateBlock(_In_ ID3D10Device *pDevice, _In_ D3D10_STAT #define D3D10_EFFECT_COMPILE_ALLOW_SLOW_OPS (1 << 1) #define D3D10_EFFECT_SINGLE_THREADED (1 << 3) - //---------------------------------------------------------------------------- // D3D10_EFFECT_VARIABLE flags: // ---------------------------- @@ -661,7 +660,6 @@ typedef interface ID3D10EffectShaderResourceVariable *LPD3D10EFFECTSHADERRESOURC DEFINE_GUID(IID_ID3D10EffectShaderResourceVariable, 0xc0a7157b, 0xd872, 0x4b1d, 0x80, 0x73, 0xef, 0xc2, 0xac, 0xd4, 0xb1, 0xfc); - #undef INTERFACE #define INTERFACE ID3D10EffectShaderResourceVariable @@ -899,7 +897,6 @@ typedef struct _D3D10_EFFECT_SHADER_DESC UINT NumOutputSignatureEntries; // Number of entries in the output signature } D3D10_EFFECT_SHADER_DESC; - typedef interface ID3D10EffectShaderVariable ID3D10EffectShaderVariable; typedef interface ID3D10EffectShaderVariable *LPD3D10EFFECTSHADERVARIABLE; @@ -1434,7 +1431,6 @@ HRESULT WINAPI D3D10CreateEffectFromMemory(_In_reads_bytes_(DataLength) void *pD HRESULT WINAPI D3D10CreateEffectPoolFromMemory(_In_reads_bytes_(DataLength) void *pData, SIZE_T DataLength, UINT FXFlags, _In_ ID3D10Device *pDevice, _Out_ ID3D10EffectPool **ppEffectPool); - //---------------------------------------------------------------------------- // D3D10DisassembleEffect: // ----------------------- @@ -1459,5 +1455,3 @@ HRESULT WINAPI D3D10DisassembleEffect(_In_ ID3D10Effect *pEffect, BOOL EnableCol /*#pragma endregion*/ #endif //__D3D10EFFECT_H__ - - diff --git a/gfx/include/dxsdk/d3d10misc.h b/gfx/include/dxsdk/d3d10misc.h index 59da4e1c00..f6307b8949 100644 --- a/gfx/include/dxsdk/d3d10misc.h +++ b/gfx/include/dxsdk/d3d10misc.h @@ -130,7 +130,6 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain( _Out_opt_ IDXGISwapChain **ppSwapChain, _Out_opt_ ID3D10Device **ppDevice); - /////////////////////////////////////////////////////////////////////////// // D3D10CreateBlob: // ----------------- @@ -147,5 +146,3 @@ HRESULT WINAPI D3D10CreateBlob(SIZE_T NumBytes, _Out_ LPD3D10BLOB *ppBuffer); #endif //__cplusplus #endif //__D3D10EFFECT_H__ - - diff --git a/gfx/include/dxsdk/d3d10sdklayers.h b/gfx/include/dxsdk/d3d10sdklayers.h index c2ee81e700..168622b3e5 100644 --- a/gfx/include/dxsdk/d3d10sdklayers.h +++ b/gfx/include/dxsdk/d3d10sdklayers.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,21 +46,18 @@ typedef interface ID3D10Debug ID3D10Debug; #endif /* __ID3D10Debug_FWD_DEFINED__ */ - #ifndef __ID3D10SwitchToRef_FWD_DEFINED__ #define __ID3D10SwitchToRef_FWD_DEFINED__ typedef interface ID3D10SwitchToRef ID3D10SwitchToRef; #endif /* __ID3D10SwitchToRef_FWD_DEFINED__ */ - #ifndef __ID3D10InfoQueue_FWD_DEFINED__ #define __ID3D10InfoQueue_FWD_DEFINED__ typedef interface ID3D10InfoQueue ID3D10InfoQueue; #endif /* __ID3D10InfoQueue_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -74,7 +67,6 @@ typedef interface ID3D10InfoQueue ID3D10InfoQueue; extern "C"{ #endif - /* interface __MIDL_itf_d3d10sdklayers_0000_0000 */ /* [local] */ @@ -89,8 +81,6 @@ extern "C"{ #define D3D10_DEBUG_FEATURE_PRESENT_PER_RENDER_OP ( 0x4 ) - - extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0000_v0_0_s_ifspec; @@ -100,7 +90,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0000_v0_0_s_ifspec; /* interface ID3D10Debug */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Debug; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -189,7 +178,6 @@ EXTERN_C const IID IID_ID3D10Debug; #ifdef COBJMACROS - #define ID3D10Debug_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -199,7 +187,6 @@ EXTERN_C const IID IID_ID3D10Debug; #define ID3D10Debug_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Debug_SetFeatureMask(This,Mask) \ ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) @@ -223,22 +210,16 @@ EXTERN_C const IID IID_ID3D10Debug; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Debug_INTERFACE_DEFINED__ */ - #ifndef __ID3D10SwitchToRef_INTERFACE_DEFINED__ #define __ID3D10SwitchToRef_INTERFACE_DEFINED__ /* interface ID3D10SwitchToRef */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10SwitchToRef; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -292,7 +273,6 @@ EXTERN_C const IID IID_ID3D10SwitchToRef; #ifdef COBJMACROS - #define ID3D10SwitchToRef_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -302,7 +282,6 @@ EXTERN_C const IID IID_ID3D10SwitchToRef; #define ID3D10SwitchToRef_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10SwitchToRef_SetUseRef(This,UseRef) \ ( (This)->lpVtbl -> SetUseRef(This,UseRef) ) @@ -311,15 +290,10 @@ EXTERN_C const IID IID_ID3D10SwitchToRef; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10SwitchToRef_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10sdklayers_0000_0002 */ /* [local] */ @@ -908,7 +882,6 @@ typedef struct D3D10_INFO_QUEUE_FILTER #define D3D10_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 - extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0002_v0_0_s_ifspec; @@ -918,7 +891,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0002_v0_0_s_ifspec; /* interface ID3D10InfoQueue */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10InfoQueue; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1247,7 +1219,6 @@ EXTERN_C const IID IID_ID3D10InfoQueue; #ifdef COBJMACROS - #define ID3D10InfoQueue_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1257,7 +1228,6 @@ EXTERN_C const IID IID_ID3D10InfoQueue; #define ID3D10InfoQueue_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10InfoQueue_SetMessageCountLimit(This,MessageCountLimit) \ ( (This)->lpVtbl -> SetMessageCountLimit(This,MessageCountLimit) ) @@ -1365,15 +1335,10 @@ EXTERN_C const IID IID_ID3D10InfoQueue; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10InfoQueue_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d10sdklayers_0000_0003 */ /* [local] */ @@ -1383,7 +1348,6 @@ DEFINE_GUID(IID_ID3D10Debug,0x9B7E4E01,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0x DEFINE_GUID(IID_ID3D10SwitchToRef,0x9B7E4E02,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); DEFINE_GUID(IID_ID3D10InfoQueue,0x1b940b17,0x2642,0x4d1f,0xab,0x1f,0xb9,0x9b,0xad,0x0c,0x39,0x5f); - extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0003_v0_0_s_ifspec; @@ -1396,5 +1360,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d10sdklayers_0000_0003_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d10shader.h b/gfx/include/dxsdk/d3d10shader.h index c4a6227656..68091e3355 100644 --- a/gfx/include/dxsdk/d3d10shader.h +++ b/gfx/include/dxsdk/d3d10shader.h @@ -10,7 +10,6 @@ #ifndef __D3D10SHADER_H__ #define __D3D10SHADER_H__ - #include "d3d10.h" /*#include */ @@ -18,7 +17,6 @@ /*#pragma region Desktop Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ - //--------------------------------------------------------------------------- // D3D10_TX_VERSION: // -------------- @@ -27,7 +25,6 @@ //--------------------------------------------------------------------------- #define D3D10_TX_VERSION(_Major,_Minor) (('T' << 24) | ('X' << 16) | ((_Major) << 8) | (_Minor)) - //---------------------------------------------------------------------------- // D3D10SHADER flags: // ----------------- @@ -111,26 +108,20 @@ #define D3D10_SHADER_DEBUG_NAME_FOR_SOURCE (1 << 22) #define D3D10_SHADER_DEBUG_NAME_FOR_BINARY (1 << 23) - // optimization level flags #define D3D10_SHADER_OPTIMIZATION_LEVEL0 (1 << 14) #define D3D10_SHADER_OPTIMIZATION_LEVEL1 0 #define D3D10_SHADER_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15)) #define D3D10_SHADER_OPTIMIZATION_LEVEL3 (1 << 15) - // Force root signature flags. (Passed in Flags2) #define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST 0 #define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_1_0 (1 << 4) #define D3D10_SHADER_FLAGS2_FORCE_ROOT_SIGNATURE_1_1 (1 << 5) - - - typedef D3D_SHADER_MACRO D3D10_SHADER_MACRO; typedef D3D10_SHADER_MACRO* LPD3D10_SHADER_MACRO; - typedef D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS; typedef D3D10_SHADER_VARIABLE_CLASS* LPD3D10_SHADER_VARIABLE_CLASS; @@ -165,7 +156,6 @@ typedef interface ID3DInclude ID3D10Include; typedef interface ID3DInclude* LPD3D10INCLUDE; #define IID_ID3D10Include IID_ID3DInclude - //---------------------------------------------------------------------------- // ID3D10ShaderReflection: //---------------------------------------------------------------------------- @@ -266,14 +256,10 @@ typedef struct _D3D10_SIGNATURE_PARAMETER_DESC } D3D10_SIGNATURE_PARAMETER_DESC; - // // Interface definitions // - - - typedef interface ID3D10ShaderReflectionType ID3D10ShaderReflectionType; typedef interface ID3D10ShaderReflectionType *LPD3D10SHADERREFLECTIONTYPE; @@ -430,7 +416,6 @@ HRESULT WINAPI D3D10CompileShader(_In_reads_bytes_(SrcDataSize) LPCSTR pSrcData, HRESULT WINAPI D3D10DisassembleShader(_In_reads_bytes_(BytecodeLength) CONST void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, _In_opt_ LPCSTR pComments, _Out_ ID3D10Blob** ppDisassembly); - //---------------------------------------------------------------------------- // D3D10GetPixelShaderProfile/D3D10GetVertexShaderProfile/D3D10GetGeometryShaderProfile: // ----------------------------------------------------- @@ -557,4 +542,3 @@ HRESULT WINAPI D3D10GetShaderDebugInfo(_In_reads_bytes_(BytecodeLength) CONST vo /*#pragma endregion*/ #endif //__D3D10SHADER_H__ - diff --git a/gfx/include/dxsdk/d3d11.h b/gfx/include/dxsdk/d3d11.h index b597d4e850..04c9d3c1d7 100644 --- a/gfx/include/dxsdk/d3d11.h +++ b/gfx/include/dxsdk/d3d11.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,287 +46,246 @@ typedef interface ID3D11DeviceChild ID3D11DeviceChild; #endif /* __ID3D11DeviceChild_FWD_DEFINED__ */ - #ifndef __ID3D11DepthStencilState_FWD_DEFINED__ #define __ID3D11DepthStencilState_FWD_DEFINED__ typedef interface ID3D11DepthStencilState ID3D11DepthStencilState; #endif /* __ID3D11DepthStencilState_FWD_DEFINED__ */ - #ifndef __ID3D11BlendState_FWD_DEFINED__ #define __ID3D11BlendState_FWD_DEFINED__ typedef interface ID3D11BlendState ID3D11BlendState; #endif /* __ID3D11BlendState_FWD_DEFINED__ */ - #ifndef __ID3D11RasterizerState_FWD_DEFINED__ #define __ID3D11RasterizerState_FWD_DEFINED__ typedef interface ID3D11RasterizerState ID3D11RasterizerState; #endif /* __ID3D11RasterizerState_FWD_DEFINED__ */ - #ifndef __ID3D11Resource_FWD_DEFINED__ #define __ID3D11Resource_FWD_DEFINED__ typedef interface ID3D11Resource ID3D11Resource; #endif /* __ID3D11Resource_FWD_DEFINED__ */ - #ifndef __ID3D11Buffer_FWD_DEFINED__ #define __ID3D11Buffer_FWD_DEFINED__ typedef interface ID3D11Buffer ID3D11Buffer; #endif /* __ID3D11Buffer_FWD_DEFINED__ */ - #ifndef __ID3D11Texture1D_FWD_DEFINED__ #define __ID3D11Texture1D_FWD_DEFINED__ typedef interface ID3D11Texture1D ID3D11Texture1D; #endif /* __ID3D11Texture1D_FWD_DEFINED__ */ - #ifndef __ID3D11Texture2D_FWD_DEFINED__ #define __ID3D11Texture2D_FWD_DEFINED__ typedef interface ID3D11Texture2D ID3D11Texture2D; #endif /* __ID3D11Texture2D_FWD_DEFINED__ */ - #ifndef __ID3D11Texture3D_FWD_DEFINED__ #define __ID3D11Texture3D_FWD_DEFINED__ typedef interface ID3D11Texture3D ID3D11Texture3D; #endif /* __ID3D11Texture3D_FWD_DEFINED__ */ - #ifndef __ID3D11View_FWD_DEFINED__ #define __ID3D11View_FWD_DEFINED__ typedef interface ID3D11View ID3D11View; #endif /* __ID3D11View_FWD_DEFINED__ */ - #ifndef __ID3D11ShaderResourceView_FWD_DEFINED__ #define __ID3D11ShaderResourceView_FWD_DEFINED__ typedef interface ID3D11ShaderResourceView ID3D11ShaderResourceView; #endif /* __ID3D11ShaderResourceView_FWD_DEFINED__ */ - #ifndef __ID3D11RenderTargetView_FWD_DEFINED__ #define __ID3D11RenderTargetView_FWD_DEFINED__ typedef interface ID3D11RenderTargetView ID3D11RenderTargetView; #endif /* __ID3D11RenderTargetView_FWD_DEFINED__ */ - #ifndef __ID3D11DepthStencilView_FWD_DEFINED__ #define __ID3D11DepthStencilView_FWD_DEFINED__ typedef interface ID3D11DepthStencilView ID3D11DepthStencilView; #endif /* __ID3D11DepthStencilView_FWD_DEFINED__ */ - #ifndef __ID3D11UnorderedAccessView_FWD_DEFINED__ #define __ID3D11UnorderedAccessView_FWD_DEFINED__ typedef interface ID3D11UnorderedAccessView ID3D11UnorderedAccessView; #endif /* __ID3D11UnorderedAccessView_FWD_DEFINED__ */ - #ifndef __ID3D11VertexShader_FWD_DEFINED__ #define __ID3D11VertexShader_FWD_DEFINED__ typedef interface ID3D11VertexShader ID3D11VertexShader; #endif /* __ID3D11VertexShader_FWD_DEFINED__ */ - #ifndef __ID3D11HullShader_FWD_DEFINED__ #define __ID3D11HullShader_FWD_DEFINED__ typedef interface ID3D11HullShader ID3D11HullShader; #endif /* __ID3D11HullShader_FWD_DEFINED__ */ - #ifndef __ID3D11DomainShader_FWD_DEFINED__ #define __ID3D11DomainShader_FWD_DEFINED__ typedef interface ID3D11DomainShader ID3D11DomainShader; #endif /* __ID3D11DomainShader_FWD_DEFINED__ */ - #ifndef __ID3D11GeometryShader_FWD_DEFINED__ #define __ID3D11GeometryShader_FWD_DEFINED__ typedef interface ID3D11GeometryShader ID3D11GeometryShader; #endif /* __ID3D11GeometryShader_FWD_DEFINED__ */ - #ifndef __ID3D11PixelShader_FWD_DEFINED__ #define __ID3D11PixelShader_FWD_DEFINED__ typedef interface ID3D11PixelShader ID3D11PixelShader; #endif /* __ID3D11PixelShader_FWD_DEFINED__ */ - #ifndef __ID3D11ComputeShader_FWD_DEFINED__ #define __ID3D11ComputeShader_FWD_DEFINED__ typedef interface ID3D11ComputeShader ID3D11ComputeShader; #endif /* __ID3D11ComputeShader_FWD_DEFINED__ */ - #ifndef __ID3D11InputLayout_FWD_DEFINED__ #define __ID3D11InputLayout_FWD_DEFINED__ typedef interface ID3D11InputLayout ID3D11InputLayout; #endif /* __ID3D11InputLayout_FWD_DEFINED__ */ - #ifndef __ID3D11SamplerState_FWD_DEFINED__ #define __ID3D11SamplerState_FWD_DEFINED__ typedef interface ID3D11SamplerState ID3D11SamplerState; #endif /* __ID3D11SamplerState_FWD_DEFINED__ */ - #ifndef __ID3D11Asynchronous_FWD_DEFINED__ #define __ID3D11Asynchronous_FWD_DEFINED__ typedef interface ID3D11Asynchronous ID3D11Asynchronous; #endif /* __ID3D11Asynchronous_FWD_DEFINED__ */ - #ifndef __ID3D11Query_FWD_DEFINED__ #define __ID3D11Query_FWD_DEFINED__ typedef interface ID3D11Query ID3D11Query; #endif /* __ID3D11Query_FWD_DEFINED__ */ - #ifndef __ID3D11Predicate_FWD_DEFINED__ #define __ID3D11Predicate_FWD_DEFINED__ typedef interface ID3D11Predicate ID3D11Predicate; #endif /* __ID3D11Predicate_FWD_DEFINED__ */ - #ifndef __ID3D11Counter_FWD_DEFINED__ #define __ID3D11Counter_FWD_DEFINED__ typedef interface ID3D11Counter ID3D11Counter; #endif /* __ID3D11Counter_FWD_DEFINED__ */ - #ifndef __ID3D11ClassInstance_FWD_DEFINED__ #define __ID3D11ClassInstance_FWD_DEFINED__ typedef interface ID3D11ClassInstance ID3D11ClassInstance; #endif /* __ID3D11ClassInstance_FWD_DEFINED__ */ - #ifndef __ID3D11ClassLinkage_FWD_DEFINED__ #define __ID3D11ClassLinkage_FWD_DEFINED__ typedef interface ID3D11ClassLinkage ID3D11ClassLinkage; #endif /* __ID3D11ClassLinkage_FWD_DEFINED__ */ - #ifndef __ID3D11CommandList_FWD_DEFINED__ #define __ID3D11CommandList_FWD_DEFINED__ typedef interface ID3D11CommandList ID3D11CommandList; #endif /* __ID3D11CommandList_FWD_DEFINED__ */ - #ifndef __ID3D11DeviceContext_FWD_DEFINED__ #define __ID3D11DeviceContext_FWD_DEFINED__ typedef interface ID3D11DeviceContext ID3D11DeviceContext; #endif /* __ID3D11DeviceContext_FWD_DEFINED__ */ - #ifndef __ID3D11VideoDecoder_FWD_DEFINED__ #define __ID3D11VideoDecoder_FWD_DEFINED__ typedef interface ID3D11VideoDecoder ID3D11VideoDecoder; #endif /* __ID3D11VideoDecoder_FWD_DEFINED__ */ - #ifndef __ID3D11VideoProcessorEnumerator_FWD_DEFINED__ #define __ID3D11VideoProcessorEnumerator_FWD_DEFINED__ typedef interface ID3D11VideoProcessorEnumerator ID3D11VideoProcessorEnumerator; #endif /* __ID3D11VideoProcessorEnumerator_FWD_DEFINED__ */ - #ifndef __ID3D11VideoProcessor_FWD_DEFINED__ #define __ID3D11VideoProcessor_FWD_DEFINED__ typedef interface ID3D11VideoProcessor ID3D11VideoProcessor; #endif /* __ID3D11VideoProcessor_FWD_DEFINED__ */ - #ifndef __ID3D11AuthenticatedChannel_FWD_DEFINED__ #define __ID3D11AuthenticatedChannel_FWD_DEFINED__ typedef interface ID3D11AuthenticatedChannel ID3D11AuthenticatedChannel; #endif /* __ID3D11AuthenticatedChannel_FWD_DEFINED__ */ - #ifndef __ID3D11CryptoSession_FWD_DEFINED__ #define __ID3D11CryptoSession_FWD_DEFINED__ typedef interface ID3D11CryptoSession ID3D11CryptoSession; #endif /* __ID3D11CryptoSession_FWD_DEFINED__ */ - #ifndef __ID3D11VideoDecoderOutputView_FWD_DEFINED__ #define __ID3D11VideoDecoderOutputView_FWD_DEFINED__ typedef interface ID3D11VideoDecoderOutputView ID3D11VideoDecoderOutputView; #endif /* __ID3D11VideoDecoderOutputView_FWD_DEFINED__ */ - #ifndef __ID3D11VideoProcessorInputView_FWD_DEFINED__ #define __ID3D11VideoProcessorInputView_FWD_DEFINED__ typedef interface ID3D11VideoProcessorInputView ID3D11VideoProcessorInputView; #endif /* __ID3D11VideoProcessorInputView_FWD_DEFINED__ */ - #ifndef __ID3D11VideoProcessorOutputView_FWD_DEFINED__ #define __ID3D11VideoProcessorOutputView_FWD_DEFINED__ typedef interface ID3D11VideoProcessorOutputView ID3D11VideoProcessorOutputView; #endif /* __ID3D11VideoProcessorOutputView_FWD_DEFINED__ */ - #ifndef __ID3D11VideoContext_FWD_DEFINED__ #define __ID3D11VideoContext_FWD_DEFINED__ typedef interface ID3D11VideoContext ID3D11VideoContext; #endif /* __ID3D11VideoContext_FWD_DEFINED__ */ - #ifndef __ID3D11VideoDevice_FWD_DEFINED__ #define __ID3D11VideoDevice_FWD_DEFINED__ typedef interface ID3D11VideoDevice ID3D11VideoDevice; #endif /* __ID3D11VideoDevice_FWD_DEFINED__ */ - #ifndef __ID3D11Device_FWD_DEFINED__ #define __ID3D11Device_FWD_DEFINED__ typedef interface ID3D11Device ID3D11Device; #endif /* __ID3D11Device_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -341,7 +296,6 @@ typedef interface ID3D11Device ID3D11Device; extern "C"{ #endif - /* interface __MIDL_itf_d3d11_0000_0000 */ /* [local] */ @@ -1364,9 +1318,6 @@ inline bool operator!=( const D3D11_BOX& l, const D3D11_BOX& r ) extern "C"{ #endif - - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0000_v0_0_s_ifspec; @@ -1376,7 +1327,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0000_v0_0_s_ifspec; /* interface ID3D11DeviceChild */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DeviceChild; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1474,7 +1424,6 @@ EXTERN_C const IID IID_ID3D11DeviceChild; #ifdef COBJMACROS - #define ID3D11DeviceChild_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1484,7 +1433,6 @@ EXTERN_C const IID IID_ID3D11DeviceChild; #define ID3D11DeviceChild_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DeviceChild_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1499,15 +1447,10 @@ EXTERN_C const IID IID_ID3D11DeviceChild; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DeviceChild_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0001 */ /* [local] */ @@ -1623,7 +1566,6 @@ struct CD3D11_DEPTH_STENCIL_DESC : public D3D11_DEPTH_STENCIL_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0001_v0_0_s_ifspec; @@ -1633,7 +1575,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0001_v0_0_s_ifspec; /* interface ID3D11DepthStencilState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DepthStencilState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1714,7 +1655,6 @@ EXTERN_C const IID IID_ID3D11DepthStencilState; #ifdef COBJMACROS - #define ID3D11DepthStencilState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1724,7 +1664,6 @@ EXTERN_C const IID IID_ID3D11DepthStencilState; #define ID3D11DepthStencilState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DepthStencilState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1737,21 +1676,15 @@ EXTERN_C const IID IID_ID3D11DepthStencilState; #define ID3D11DepthStencilState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11DepthStencilState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DepthStencilState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0002 */ /* [local] */ @@ -1847,7 +1780,6 @@ struct CD3D11_BLEND_DESC : public D3D11_BLEND_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0002_v0_0_s_ifspec; @@ -1857,7 +1789,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0002_v0_0_s_ifspec; /* interface ID3D11BlendState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11BlendState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1938,7 +1869,6 @@ EXTERN_C const IID IID_ID3D11BlendState; #ifdef COBJMACROS - #define ID3D11BlendState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1948,7 +1878,6 @@ EXTERN_C const IID IID_ID3D11BlendState; #define ID3D11BlendState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11BlendState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1961,21 +1890,15 @@ EXTERN_C const IID IID_ID3D11BlendState; #define ID3D11BlendState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11BlendState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11BlendState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0003 */ /* [local] */ @@ -2044,7 +1967,6 @@ struct CD3D11_RASTERIZER_DESC : public D3D11_RASTERIZER_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0003_v0_0_s_ifspec; @@ -2054,7 +1976,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0003_v0_0_s_ifspec; /* interface ID3D11RasterizerState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11RasterizerState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2135,7 +2056,6 @@ EXTERN_C const IID IID_ID3D11RasterizerState; #ifdef COBJMACROS - #define ID3D11RasterizerState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2145,7 +2065,6 @@ EXTERN_C const IID IID_ID3D11RasterizerState; #define ID3D11RasterizerState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11RasterizerState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2158,21 +2077,15 @@ EXTERN_C const IID IID_ID3D11RasterizerState; #define ID3D11RasterizerState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11RasterizerState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11RasterizerState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0004 */ /* [local] */ @@ -2196,8 +2109,6 @@ typedef struct D3D11_MAPPED_SUBRESOURCE UINT DepthPitch; } D3D11_MAPPED_SUBRESOURCE; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0004_v0_0_s_ifspec; @@ -2207,7 +2118,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0004_v0_0_s_ifspec; /* interface ID3D11Resource */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Resource; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2302,7 +2212,6 @@ EXTERN_C const IID IID_ID3D11Resource; #ifdef COBJMACROS - #define ID3D11Resource_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2312,7 +2221,6 @@ EXTERN_C const IID IID_ID3D11Resource; #define ID3D11Resource_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Resource_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2325,7 +2233,6 @@ EXTERN_C const IID IID_ID3D11Resource; #define ID3D11Resource_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Resource_GetType(This,pResourceDimension) \ ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) @@ -2337,15 +2244,10 @@ EXTERN_C const IID IID_ID3D11Resource; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Resource_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0005 */ /* [local] */ @@ -2389,7 +2291,6 @@ struct CD3D11_BUFFER_DESC : public D3D11_BUFFER_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0005_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0005_v0_0_s_ifspec; @@ -2399,7 +2300,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0005_v0_0_s_ifspec; /* interface ID3D11Buffer */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Buffer; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2493,7 +2393,6 @@ EXTERN_C const IID IID_ID3D11Buffer; #ifdef COBJMACROS - #define ID3D11Buffer_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2503,7 +2402,6 @@ EXTERN_C const IID IID_ID3D11Buffer; #define ID3D11Buffer_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Buffer_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2516,7 +2414,6 @@ EXTERN_C const IID IID_ID3D11Buffer; #define ID3D11Buffer_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Buffer_GetType(This,pResourceDimension) \ ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) @@ -2526,21 +2423,15 @@ EXTERN_C const IID IID_ID3D11Buffer; #define ID3D11Buffer_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D11Buffer_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Buffer_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0006 */ /* [local] */ @@ -2590,7 +2481,6 @@ struct CD3D11_TEXTURE1D_DESC : public D3D11_TEXTURE1D_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0006_v0_0_s_ifspec; @@ -2600,7 +2490,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0006_v0_0_s_ifspec; /* interface ID3D11Texture1D */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Texture1D; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2694,7 +2583,6 @@ EXTERN_C const IID IID_ID3D11Texture1D; #ifdef COBJMACROS - #define ID3D11Texture1D_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2704,7 +2592,6 @@ EXTERN_C const IID IID_ID3D11Texture1D; #define ID3D11Texture1D_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Texture1D_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2717,7 +2604,6 @@ EXTERN_C const IID IID_ID3D11Texture1D; #define ID3D11Texture1D_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Texture1D_GetType(This,pResourceDimension) \ ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) @@ -2727,21 +2613,15 @@ EXTERN_C const IID IID_ID3D11Texture1D; #define ID3D11Texture1D_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D11Texture1D_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Texture1D_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0007 */ /* [local] */ @@ -2799,7 +2679,6 @@ struct CD3D11_TEXTURE2D_DESC : public D3D11_TEXTURE2D_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0007_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0007_v0_0_s_ifspec; @@ -2809,7 +2688,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0007_v0_0_s_ifspec; /* interface ID3D11Texture2D */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Texture2D; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2903,7 +2781,6 @@ EXTERN_C const IID IID_ID3D11Texture2D; #ifdef COBJMACROS - #define ID3D11Texture2D_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2913,7 +2790,6 @@ EXTERN_C const IID IID_ID3D11Texture2D; #define ID3D11Texture2D_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Texture2D_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2926,7 +2802,6 @@ EXTERN_C const IID IID_ID3D11Texture2D; #define ID3D11Texture2D_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Texture2D_GetType(This,pResourceDimension) \ ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) @@ -2936,21 +2811,15 @@ EXTERN_C const IID IID_ID3D11Texture2D; #define ID3D11Texture2D_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D11Texture2D_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Texture2D_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0008 */ /* [local] */ @@ -3003,7 +2872,6 @@ struct CD3D11_TEXTURE3D_DESC : public D3D11_TEXTURE3D_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0008_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0008_v0_0_s_ifspec; @@ -3013,7 +2881,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0008_v0_0_s_ifspec; /* interface ID3D11Texture3D */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Texture3D; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3107,7 +2974,6 @@ EXTERN_C const IID IID_ID3D11Texture3D; #ifdef COBJMACROS - #define ID3D11Texture3D_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3117,7 +2983,6 @@ EXTERN_C const IID IID_ID3D11Texture3D; #define ID3D11Texture3D_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Texture3D_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3130,7 +2995,6 @@ EXTERN_C const IID IID_ID3D11Texture3D; #define ID3D11Texture3D_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Texture3D_GetType(This,pResourceDimension) \ ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) @@ -3140,21 +3004,15 @@ EXTERN_C const IID IID_ID3D11Texture3D; #define ID3D11Texture3D_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D11Texture3D_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Texture3D_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0009 */ /* [local] */ @@ -3169,8 +3027,6 @@ enum D3D11_TEXTURECUBE_FACE D3D11_TEXTURECUBE_FACE_NEGATIVE_Z = 5 } D3D11_TEXTURECUBE_FACE; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0009_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0009_v0_0_s_ifspec; @@ -3180,7 +3036,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0009_v0_0_s_ifspec; /* interface ID3D11View */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11View; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3261,7 +3116,6 @@ EXTERN_C const IID IID_ID3D11View; #ifdef COBJMACROS - #define ID3D11View_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3271,7 +3125,6 @@ EXTERN_C const IID IID_ID3D11View; #define ID3D11View_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11View_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3284,21 +3137,15 @@ EXTERN_C const IID IID_ID3D11View; #define ID3D11View_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11View_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11View_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0010 */ /* [local] */ @@ -3615,7 +3462,6 @@ struct CD3D11_SHADER_RESOURCE_VIEW_DESC : public D3D11_SHADER_RESOURCE_VIEW_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0010_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0010_v0_0_s_ifspec; @@ -3625,7 +3471,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0010_v0_0_s_ifspec; /* interface ID3D11ShaderResourceView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11ShaderResourceView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3711,7 +3556,6 @@ EXTERN_C const IID IID_ID3D11ShaderResourceView; #ifdef COBJMACROS - #define ID3D11ShaderResourceView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3721,7 +3565,6 @@ EXTERN_C const IID IID_ID3D11ShaderResourceView; #define ID3D11ShaderResourceView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11ShaderResourceView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3734,25 +3577,18 @@ EXTERN_C const IID IID_ID3D11ShaderResourceView; #define ID3D11ShaderResourceView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11ShaderResourceView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11ShaderResourceView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11ShaderResourceView_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0011 */ /* [local] */ @@ -3990,7 +3826,6 @@ struct CD3D11_RENDER_TARGET_VIEW_DESC : public D3D11_RENDER_TARGET_VIEW_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0011_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0011_v0_0_s_ifspec; @@ -4000,7 +3835,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0011_v0_0_s_ifspec; /* interface ID3D11RenderTargetView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11RenderTargetView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4086,7 +3920,6 @@ EXTERN_C const IID IID_ID3D11RenderTargetView; #ifdef COBJMACROS - #define ID3D11RenderTargetView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4096,7 +3929,6 @@ EXTERN_C const IID IID_ID3D11RenderTargetView; #define ID3D11RenderTargetView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11RenderTargetView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4109,25 +3941,18 @@ EXTERN_C const IID IID_ID3D11RenderTargetView; #define ID3D11RenderTargetView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11RenderTargetView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11RenderTargetView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11RenderTargetView_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0012 */ /* [local] */ @@ -4463,7 +4288,6 @@ struct CD3D11_DEPTH_STENCIL_VIEW_DESC : public D3D11_DEPTH_STENCIL_VIEW_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0012_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0012_v0_0_s_ifspec; @@ -4473,7 +4297,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0012_v0_0_s_ifspec; /* interface ID3D11DepthStencilView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DepthStencilView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4559,7 +4382,6 @@ EXTERN_C const IID IID_ID3D11DepthStencilView; #ifdef COBJMACROS - #define ID3D11DepthStencilView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4569,7 +4391,6 @@ EXTERN_C const IID IID_ID3D11DepthStencilView; #define ID3D11DepthStencilView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DepthStencilView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4582,25 +4403,18 @@ EXTERN_C const IID IID_ID3D11DepthStencilView; #define ID3D11DepthStencilView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11DepthStencilView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11DepthStencilView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DepthStencilView_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0013 */ /* [local] */ @@ -4816,7 +4630,6 @@ struct CD3D11_UNORDERED_ACCESS_VIEW_DESC : public D3D11_UNORDERED_ACCESS_VIEW_DE extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0013_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0013_v0_0_s_ifspec; @@ -4826,7 +4639,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0013_v0_0_s_ifspec; /* interface ID3D11UnorderedAccessView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11UnorderedAccessView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4912,7 +4724,6 @@ EXTERN_C const IID IID_ID3D11UnorderedAccessView; #ifdef COBJMACROS - #define ID3D11UnorderedAccessView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4922,7 +4733,6 @@ EXTERN_C const IID IID_ID3D11UnorderedAccessView; #define ID3D11UnorderedAccessView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11UnorderedAccessView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4935,32 +4745,24 @@ EXTERN_C const IID IID_ID3D11UnorderedAccessView; #define ID3D11UnorderedAccessView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11UnorderedAccessView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11UnorderedAccessView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11UnorderedAccessView_INTERFACE_DEFINED__ */ - #ifndef __ID3D11VertexShader_INTERFACE_DEFINED__ #define __ID3D11VertexShader_INTERFACE_DEFINED__ /* interface ID3D11VertexShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VertexShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5032,7 +4834,6 @@ EXTERN_C const IID IID_ID3D11VertexShader; #ifdef COBJMACROS - #define ID3D11VertexShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5042,7 +4843,6 @@ EXTERN_C const IID IID_ID3D11VertexShader; #define ID3D11VertexShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VertexShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5055,25 +4855,18 @@ EXTERN_C const IID IID_ID3D11VertexShader; #define ID3D11VertexShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VertexShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D11HullShader_INTERFACE_DEFINED__ #define __ID3D11HullShader_INTERFACE_DEFINED__ /* interface ID3D11HullShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11HullShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5145,7 +4938,6 @@ EXTERN_C const IID IID_ID3D11HullShader; #ifdef COBJMACROS - #define ID3D11HullShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5155,7 +4947,6 @@ EXTERN_C const IID IID_ID3D11HullShader; #define ID3D11HullShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11HullShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5168,25 +4959,18 @@ EXTERN_C const IID IID_ID3D11HullShader; #define ID3D11HullShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11HullShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D11DomainShader_INTERFACE_DEFINED__ #define __ID3D11DomainShader_INTERFACE_DEFINED__ /* interface ID3D11DomainShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DomainShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5258,7 +5042,6 @@ EXTERN_C const IID IID_ID3D11DomainShader; #ifdef COBJMACROS - #define ID3D11DomainShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5268,7 +5051,6 @@ EXTERN_C const IID IID_ID3D11DomainShader; #define ID3D11DomainShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DomainShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5281,25 +5063,18 @@ EXTERN_C const IID IID_ID3D11DomainShader; #define ID3D11DomainShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DomainShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D11GeometryShader_INTERFACE_DEFINED__ #define __ID3D11GeometryShader_INTERFACE_DEFINED__ /* interface ID3D11GeometryShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11GeometryShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5371,7 +5146,6 @@ EXTERN_C const IID IID_ID3D11GeometryShader; #ifdef COBJMACROS - #define ID3D11GeometryShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5381,7 +5155,6 @@ EXTERN_C const IID IID_ID3D11GeometryShader; #define ID3D11GeometryShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11GeometryShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5394,25 +5167,18 @@ EXTERN_C const IID IID_ID3D11GeometryShader; #define ID3D11GeometryShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11GeometryShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D11PixelShader_INTERFACE_DEFINED__ #define __ID3D11PixelShader_INTERFACE_DEFINED__ /* interface ID3D11PixelShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11PixelShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5484,7 +5250,6 @@ EXTERN_C const IID IID_ID3D11PixelShader; #ifdef COBJMACROS - #define ID3D11PixelShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5494,7 +5259,6 @@ EXTERN_C const IID IID_ID3D11PixelShader; #define ID3D11PixelShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11PixelShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5507,25 +5271,18 @@ EXTERN_C const IID IID_ID3D11PixelShader; #define ID3D11PixelShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11PixelShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D11ComputeShader_INTERFACE_DEFINED__ #define __ID3D11ComputeShader_INTERFACE_DEFINED__ /* interface ID3D11ComputeShader */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11ComputeShader; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5597,7 +5354,6 @@ EXTERN_C const IID IID_ID3D11ComputeShader; #ifdef COBJMACROS - #define ID3D11ComputeShader_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5607,7 +5363,6 @@ EXTERN_C const IID IID_ID3D11ComputeShader; #define ID3D11ComputeShader_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11ComputeShader_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5620,25 +5375,18 @@ EXTERN_C const IID IID_ID3D11ComputeShader; #define ID3D11ComputeShader_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11ComputeShader_INTERFACE_DEFINED__ */ - #ifndef __ID3D11InputLayout_INTERFACE_DEFINED__ #define __ID3D11InputLayout_INTERFACE_DEFINED__ /* interface ID3D11InputLayout */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11InputLayout; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5710,7 +5458,6 @@ EXTERN_C const IID IID_ID3D11InputLayout; #ifdef COBJMACROS - #define ID3D11InputLayout_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5720,7 +5467,6 @@ EXTERN_C const IID IID_ID3D11InputLayout; #define ID3D11InputLayout_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11InputLayout_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5733,18 +5479,12 @@ EXTERN_C const IID IID_ID3D11InputLayout; #define ID3D11InputLayout_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11InputLayout_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0021 */ /* [local] */ @@ -5939,7 +5679,6 @@ struct CD3D11_SAMPLER_DESC : public D3D11_SAMPLER_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0021_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0021_v0_0_s_ifspec; @@ -5949,7 +5688,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0021_v0_0_s_ifspec; /* interface ID3D11SamplerState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11SamplerState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6030,7 +5768,6 @@ EXTERN_C const IID IID_ID3D11SamplerState; #ifdef COBJMACROS - #define ID3D11SamplerState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6040,7 +5777,6 @@ EXTERN_C const IID IID_ID3D11SamplerState; #define ID3D11SamplerState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11SamplerState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -6053,21 +5789,15 @@ EXTERN_C const IID IID_ID3D11SamplerState; #define ID3D11SamplerState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11SamplerState_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11SamplerState_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0022 */ /* [local] */ @@ -6124,8 +5854,6 @@ enum D3D11_FORMAT_SUPPORT2 D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000 } D3D11_FORMAT_SUPPORT2; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0022_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0022_v0_0_s_ifspec; @@ -6135,7 +5863,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0022_v0_0_s_ifspec; /* interface ID3D11Asynchronous */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Asynchronous; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6212,7 +5939,6 @@ EXTERN_C const IID IID_ID3D11Asynchronous; #ifdef COBJMACROS - #define ID3D11Asynchronous_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6222,7 +5948,6 @@ EXTERN_C const IID IID_ID3D11Asynchronous; #define ID3D11Asynchronous_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Asynchronous_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -6235,21 +5960,15 @@ EXTERN_C const IID IID_ID3D11Asynchronous; #define ID3D11Asynchronous_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Asynchronous_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Asynchronous_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0023 */ /* [local] */ @@ -6314,7 +6033,6 @@ struct CD3D11_QUERY_DESC : public D3D11_QUERY_DESC extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0023_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0023_v0_0_s_ifspec; @@ -6324,7 +6042,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0023_v0_0_s_ifspec; /* interface ID3D11Query */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Query; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6408,7 +6125,6 @@ EXTERN_C const IID IID_ID3D11Query; #ifdef COBJMACROS - #define ID3D11Query_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6418,7 +6134,6 @@ EXTERN_C const IID IID_ID3D11Query; #define ID3D11Query_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Query_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -6431,32 +6146,24 @@ EXTERN_C const IID IID_ID3D11Query; #define ID3D11Query_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Query_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) - #define ID3D11Query_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Query_INTERFACE_DEFINED__ */ - #ifndef __ID3D11Predicate_INTERFACE_DEFINED__ #define __ID3D11Predicate_INTERFACE_DEFINED__ /* interface ID3D11Predicate */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Predicate; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6536,7 +6243,6 @@ EXTERN_C const IID IID_ID3D11Predicate; #ifdef COBJMACROS - #define ID3D11Predicate_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6546,7 +6252,6 @@ EXTERN_C const IID IID_ID3D11Predicate; #define ID3D11Predicate_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Predicate_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -6559,26 +6264,18 @@ EXTERN_C const IID IID_ID3D11Predicate; #define ID3D11Predicate_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Predicate_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) - #define ID3D11Predicate_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Predicate_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0025 */ /* [local] */ @@ -6658,8 +6355,6 @@ typedef struct D3D11_COUNTER_INFO UINT8 NumDetectableParallelUnits; } D3D11_COUNTER_INFO; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0025_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0025_v0_0_s_ifspec; @@ -6669,7 +6364,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0025_v0_0_s_ifspec; /* interface ID3D11Counter */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Counter; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6753,7 +6447,6 @@ EXTERN_C const IID IID_ID3D11Counter; #ifdef COBJMACROS - #define ID3D11Counter_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6763,7 +6456,6 @@ EXTERN_C const IID IID_ID3D11Counter; #define ID3D11Counter_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Counter_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -6776,25 +6468,18 @@ EXTERN_C const IID IID_ID3D11Counter; #define ID3D11Counter_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Counter_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) - #define ID3D11Counter_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Counter_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0026 */ /* [local] */ @@ -6824,8 +6509,6 @@ typedef struct D3D11_CLASS_INSTANCE_DESC BOOL Created; } D3D11_CLASS_INSTANCE_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0026_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0026_v0_0_s_ifspec; @@ -6835,7 +6518,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0026_v0_0_s_ifspec; /* interface ID3D11ClassInstance */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11ClassInstance; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6951,7 +6633,6 @@ EXTERN_C const IID IID_ID3D11ClassInstance; #ifdef COBJMACROS - #define ID3D11ClassInstance_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6961,7 +6642,6 @@ EXTERN_C const IID IID_ID3D11ClassInstance; #define ID3D11ClassInstance_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11ClassInstance_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -6974,7 +6654,6 @@ EXTERN_C const IID IID_ID3D11ClassInstance; #define ID3D11ClassInstance_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11ClassInstance_GetClassLinkage(This,ppLinkage) \ ( (This)->lpVtbl -> GetClassLinkage(This,ppLinkage) ) @@ -6989,22 +6668,16 @@ EXTERN_C const IID IID_ID3D11ClassInstance; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11ClassInstance_INTERFACE_DEFINED__ */ - #ifndef __ID3D11ClassLinkage_INTERFACE_DEFINED__ #define __ID3D11ClassLinkage_INTERFACE_DEFINED__ /* interface ID3D11ClassLinkage */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11ClassLinkage; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -7122,7 +6795,6 @@ EXTERN_C const IID IID_ID3D11ClassLinkage; #ifdef COBJMACROS - #define ID3D11ClassLinkage_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -7132,7 +6804,6 @@ EXTERN_C const IID IID_ID3D11ClassLinkage; #define ID3D11ClassLinkage_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11ClassLinkage_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -7145,7 +6816,6 @@ EXTERN_C const IID IID_ID3D11ClassLinkage; #define ID3D11ClassLinkage_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11ClassLinkage_GetClassInstance(This,pClassInstanceName,InstanceIndex,ppInstance) \ ( (This)->lpVtbl -> GetClassInstance(This,pClassInstanceName,InstanceIndex,ppInstance) ) @@ -7154,22 +6824,16 @@ EXTERN_C const IID IID_ID3D11ClassLinkage; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11ClassLinkage_INTERFACE_DEFINED__ */ - #ifndef __ID3D11CommandList_INTERFACE_DEFINED__ #define __ID3D11CommandList_INTERFACE_DEFINED__ /* interface ID3D11CommandList */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11CommandList; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -7246,7 +6910,6 @@ EXTERN_C const IID IID_ID3D11CommandList; #ifdef COBJMACROS - #define ID3D11CommandList_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -7256,7 +6919,6 @@ EXTERN_C const IID IID_ID3D11CommandList; #define ID3D11CommandList_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11CommandList_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -7269,21 +6931,15 @@ EXTERN_C const IID IID_ID3D11CommandList; #define ID3D11CommandList_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11CommandList_GetContextFlags(This) \ ( (This)->lpVtbl -> GetContextFlags(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11CommandList_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0029 */ /* [local] */ @@ -7478,8 +7134,6 @@ typedef struct D3D11_FEATURE_DATA_SHADER_CACHE UINT SupportFlags; } D3D11_FEATURE_DATA_SHADER_CACHE; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0029_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0029_v0_0_s_ifspec; @@ -7489,7 +7143,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0029_v0_0_s_ifspec; /* interface ID3D11DeviceContext */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DeviceContext; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -9271,7 +8924,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext; #ifdef COBJMACROS - #define ID3D11DeviceContext_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -9281,7 +8933,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext; #define ID3D11DeviceContext_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DeviceContext_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -9294,7 +8945,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext; #define ID3D11DeviceContext_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11DeviceContext_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) @@ -9621,15 +9271,10 @@ EXTERN_C const IID IID_ID3D11DeviceContext; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DeviceContext_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0030 */ /* [local] */ @@ -9640,7 +9285,6 @@ extern const DECLSPEC_SELECTANY CD3D11_VIDEO_DEFAULT D3D11_VIDEO_DEFAULT; extern "C"{ #endif - #if !defined(APP_DEPRECATED_HRESULT) && !defined(APP_DEPRECATED_HRESULT_TYPEDEF) #define APP_DEPRECATED_HRESULT_TYPEDEF typedef HRESULT APP_DEPRECATED_HRESULT; @@ -9768,8 +9412,6 @@ typedef struct D3D11_VIDEO_DECODER_EXTENSION _Field_size_opt_(ResourceCount) ID3D11Resource **ppResourceList; } D3D11_VIDEO_DECODER_EXTENSION; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0030_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0030_v0_0_s_ifspec; @@ -9779,7 +9421,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0030_v0_0_s_ifspec; /* interface ID3D11VideoDecoder */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoDecoder; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -9873,7 +9514,6 @@ EXTERN_C const IID IID_ID3D11VideoDecoder; #ifdef COBJMACROS - #define ID3D11VideoDecoder_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -9883,7 +9523,6 @@ EXTERN_C const IID IID_ID3D11VideoDecoder; #define ID3D11VideoDecoder_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoDecoder_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -9896,7 +9535,6 @@ EXTERN_C const IID IID_ID3D11VideoDecoder; #define ID3D11VideoDecoder_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoDecoder_GetCreationParameters(This,pVideoDesc,pConfig) \ ( (This)->lpVtbl -> GetCreationParameters(This,pVideoDesc,pConfig) ) @@ -9905,15 +9543,10 @@ EXTERN_C const IID IID_ID3D11VideoDecoder; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoDecoder_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0031 */ /* [local] */ @@ -10132,8 +9765,6 @@ typedef struct D3D11_VIDEO_PROCESSOR_CONTENT_DESC D3D11_VIDEO_USAGE Usage; } D3D11_VIDEO_PROCESSOR_CONTENT_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0031_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0031_v0_0_s_ifspec; @@ -10143,7 +9774,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0031_v0_0_s_ifspec; /* interface ID3D11VideoProcessorEnumerator */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -10289,7 +9919,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator; #ifdef COBJMACROS - #define ID3D11VideoProcessorEnumerator_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -10299,7 +9928,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator; #define ID3D11VideoProcessorEnumerator_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoProcessorEnumerator_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -10312,7 +9940,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator; #define ID3D11VideoProcessorEnumerator_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(This,pContentDesc) \ ( (This)->lpVtbl -> GetVideoProcessorContentDesc(This,pContentDesc) ) @@ -10333,15 +9960,10 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoProcessorEnumerator_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0032 */ /* [local] */ @@ -10454,8 +10076,6 @@ typedef struct D3D11_VIDEO_PROCESSOR_STREAM _Field_size_(FutureFrames) ID3D11VideoProcessorInputView **ppFutureSurfacesRight; } D3D11_VIDEO_PROCESSOR_STREAM; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0032_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0032_v0_0_s_ifspec; @@ -10465,7 +10085,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0032_v0_0_s_ifspec; /* interface ID3D11VideoProcessor */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoProcessor; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -10555,7 +10174,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessor; #ifdef COBJMACROS - #define ID3D11VideoProcessor_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -10565,7 +10183,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessor; #define ID3D11VideoProcessor_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoProcessor_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -10578,7 +10195,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessor; #define ID3D11VideoProcessor_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoProcessor_GetContentDesc(This,pDesc) \ ( (This)->lpVtbl -> GetContentDesc(This,pDesc) ) @@ -10587,15 +10203,10 @@ EXTERN_C const IID IID_ID3D11VideoProcessor; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoProcessor_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0033 */ /* [local] */ @@ -10612,8 +10223,6 @@ enum D3D11_AUTHENTICATED_CHANNEL_TYPE D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE = 3 } D3D11_AUTHENTICATED_CHANNEL_TYPE; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0033_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0033_v0_0_s_ifspec; @@ -10623,7 +10232,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0033_v0_0_s_ifspec; /* interface ID3D11AuthenticatedChannel */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11AuthenticatedChannel; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -10726,7 +10334,6 @@ EXTERN_C const IID IID_ID3D11AuthenticatedChannel; #ifdef COBJMACROS - #define ID3D11AuthenticatedChannel_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -10736,7 +10343,6 @@ EXTERN_C const IID IID_ID3D11AuthenticatedChannel; #define ID3D11AuthenticatedChannel_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11AuthenticatedChannel_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -10749,7 +10355,6 @@ EXTERN_C const IID IID_ID3D11AuthenticatedChannel; #define ID3D11AuthenticatedChannel_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11AuthenticatedChannel_GetCertificateSize(This,pCertificateSize) \ ( (This)->lpVtbl -> GetCertificateSize(This,pCertificateSize) ) @@ -10761,15 +10366,10 @@ EXTERN_C const IID IID_ID3D11AuthenticatedChannel; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11AuthenticatedChannel_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0034 */ /* [local] */ @@ -11019,7 +10619,6 @@ typedef struct D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT DEFINE_GUID(D3D11_KEY_EXCHANGE_RSAES_OAEP, 0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20); - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0034_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0034_v0_0_s_ifspec; @@ -11029,7 +10628,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0034_v0_0_s_ifspec; /* interface ID3D11CryptoSession */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11CryptoSession; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -11150,7 +10748,6 @@ EXTERN_C const IID IID_ID3D11CryptoSession; #ifdef COBJMACROS - #define ID3D11CryptoSession_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -11160,7 +10757,6 @@ EXTERN_C const IID IID_ID3D11CryptoSession; #define ID3D11CryptoSession_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11CryptoSession_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -11173,7 +10769,6 @@ EXTERN_C const IID IID_ID3D11CryptoSession; #define ID3D11CryptoSession_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11CryptoSession_GetCryptoType(This,pCryptoType) \ ( (This)->lpVtbl -> GetCryptoType(This,pCryptoType) ) @@ -11191,15 +10786,10 @@ EXTERN_C const IID IID_ID3D11CryptoSession; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11CryptoSession_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0035 */ /* [local] */ @@ -11225,8 +10815,6 @@ typedef struct D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC } ; } D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0035_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0035_v0_0_s_ifspec; @@ -11236,7 +10824,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0035_v0_0_s_ifspec; /* interface ID3D11VideoDecoderOutputView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoDecoderOutputView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -11322,7 +10909,6 @@ EXTERN_C const IID IID_ID3D11VideoDecoderOutputView; #ifdef COBJMACROS - #define ID3D11VideoDecoderOutputView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -11332,7 +10918,6 @@ EXTERN_C const IID IID_ID3D11VideoDecoderOutputView; #define ID3D11VideoDecoderOutputView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoDecoderOutputView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -11345,25 +10930,18 @@ EXTERN_C const IID IID_ID3D11VideoDecoderOutputView; #define ID3D11VideoDecoderOutputView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoDecoderOutputView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11VideoDecoderOutputView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoDecoderOutputView_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0036 */ /* [local] */ @@ -11390,8 +10968,6 @@ typedef struct D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC } ; } D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0036_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0036_v0_0_s_ifspec; @@ -11401,7 +10977,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0036_v0_0_s_ifspec; /* interface ID3D11VideoProcessorInputView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoProcessorInputView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -11487,7 +11062,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorInputView; #ifdef COBJMACROS - #define ID3D11VideoProcessorInputView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -11497,7 +11071,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorInputView; #define ID3D11VideoProcessorInputView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoProcessorInputView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -11510,25 +11083,18 @@ EXTERN_C const IID IID_ID3D11VideoProcessorInputView; #define ID3D11VideoProcessorInputView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoProcessorInputView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11VideoProcessorInputView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoProcessorInputView_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0037 */ /* [local] */ @@ -11562,8 +11128,6 @@ typedef struct D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC } ; } D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0037_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0037_v0_0_s_ifspec; @@ -11573,7 +11137,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0037_v0_0_s_ifspec; /* interface ID3D11VideoProcessorOutputView */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoProcessorOutputView; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -11659,7 +11222,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorOutputView; #ifdef COBJMACROS - #define ID3D11VideoProcessorOutputView_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -11669,7 +11231,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorOutputView; #define ID3D11VideoProcessorOutputView_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoProcessorOutputView_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -11682,32 +11243,24 @@ EXTERN_C const IID IID_ID3D11VideoProcessorOutputView; #define ID3D11VideoProcessorOutputView_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoProcessorOutputView_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11VideoProcessorOutputView_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoProcessorOutputView_INTERFACE_DEFINED__ */ - #ifndef __ID3D11VideoContext_INTERFACE_DEFINED__ #define __ID3D11VideoContext_INTERFACE_DEFINED__ /* interface ID3D11VideoContext */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoContext; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -12945,7 +12498,6 @@ EXTERN_C const IID IID_ID3D11VideoContext; #ifdef COBJMACROS - #define ID3D11VideoContext_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -12955,7 +12507,6 @@ EXTERN_C const IID IID_ID3D11VideoContext; #define ID3D11VideoContext_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoContext_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -12968,7 +12519,6 @@ EXTERN_C const IID IID_ID3D11VideoContext; #define ID3D11VideoContext_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoContext_GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) \ ( (This)->lpVtbl -> GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) ) @@ -13145,22 +12695,16 @@ EXTERN_C const IID IID_ID3D11VideoContext; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoContext_INTERFACE_DEFINED__ */ - #ifndef __ID3D11VideoDevice_INTERFACE_DEFINED__ #define __ID3D11VideoDevice_INTERFACE_DEFINED__ /* interface ID3D11VideoDevice */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoDevice; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -13475,7 +13019,6 @@ EXTERN_C const IID IID_ID3D11VideoDevice; #ifdef COBJMACROS - #define ID3D11VideoDevice_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -13485,7 +13028,6 @@ EXTERN_C const IID IID_ID3D11VideoDevice; #define ID3D11VideoDevice_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoDevice_CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) \ ( (This)->lpVtbl -> CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) ) @@ -13539,21 +13081,15 @@ EXTERN_C const IID IID_ID3D11VideoDevice; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoDevice_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0040 */ /* [local] */ /*#include */ - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0040_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0040_v0_0_s_ifspec; @@ -13563,7 +13099,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0040_v0_0_s_ifspec; /* interface ID3D11Device */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Device; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -14237,7 +13772,6 @@ EXTERN_C const IID IID_ID3D11Device; #ifdef COBJMACROS - #define ID3D11Device_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -14247,7 +13781,6 @@ EXTERN_C const IID IID_ID3D11Device; #define ID3D11Device_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Device_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) @@ -14370,15 +13903,10 @@ EXTERN_C const IID IID_ID3D11Device; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Device_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_0000_0041 */ /* [local] */ @@ -14588,7 +14116,6 @@ DEFINE_GUID(IID_ID3D11VideoContext,0x61F21C45,0x3C0E,0x4a74,0x9C,0xEA,0x67,0x10, DEFINE_GUID(IID_ID3D11VideoDevice,0x10EC4D5B,0x975A,0x4689,0xB9,0xE4,0xD0,0xAA,0xC3,0x0F,0xE3,0x33); DEFINE_GUID(IID_ID3D11Device,0xdb6f6ddb,0xac77,0x4e88,0x82,0x53,0x81,0x9d,0xf9,0xbb,0xf1,0x40); - extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0041_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0041_v0_0_s_ifspec; @@ -14601,5 +14128,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_0000_0041_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d11_1.h b/gfx/include/dxsdk/d3d11_1.h index 3d3bf303f1..f8accdb165 100644 --- a/gfx/include/dxsdk/d3d11_1.h +++ b/gfx/include/dxsdk/d3d11_1.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,63 +46,54 @@ typedef interface ID3D11BlendState1 ID3D11BlendState1; #endif /* __ID3D11BlendState1_FWD_DEFINED__ */ - #ifndef __ID3D11RasterizerState1_FWD_DEFINED__ #define __ID3D11RasterizerState1_FWD_DEFINED__ typedef interface ID3D11RasterizerState1 ID3D11RasterizerState1; #endif /* __ID3D11RasterizerState1_FWD_DEFINED__ */ - #ifndef __ID3DDeviceContextState_FWD_DEFINED__ #define __ID3DDeviceContextState_FWD_DEFINED__ typedef interface ID3DDeviceContextState ID3DDeviceContextState; #endif /* __ID3DDeviceContextState_FWD_DEFINED__ */ - #ifndef __ID3D11DeviceContext1_FWD_DEFINED__ #define __ID3D11DeviceContext1_FWD_DEFINED__ typedef interface ID3D11DeviceContext1 ID3D11DeviceContext1; #endif /* __ID3D11DeviceContext1_FWD_DEFINED__ */ - #ifndef __ID3D11VideoContext1_FWD_DEFINED__ #define __ID3D11VideoContext1_FWD_DEFINED__ typedef interface ID3D11VideoContext1 ID3D11VideoContext1; #endif /* __ID3D11VideoContext1_FWD_DEFINED__ */ - #ifndef __ID3D11VideoDevice1_FWD_DEFINED__ #define __ID3D11VideoDevice1_FWD_DEFINED__ typedef interface ID3D11VideoDevice1 ID3D11VideoDevice1; #endif /* __ID3D11VideoDevice1_FWD_DEFINED__ */ - #ifndef __ID3D11VideoProcessorEnumerator1_FWD_DEFINED__ #define __ID3D11VideoProcessorEnumerator1_FWD_DEFINED__ typedef interface ID3D11VideoProcessorEnumerator1 ID3D11VideoProcessorEnumerator1; #endif /* __ID3D11VideoProcessorEnumerator1_FWD_DEFINED__ */ - #ifndef __ID3D11Device1_FWD_DEFINED__ #define __ID3D11Device1_FWD_DEFINED__ typedef interface ID3D11Device1 ID3D11Device1; #endif /* __ID3D11Device1_FWD_DEFINED__ */ - #ifndef __ID3DUserDefinedAnnotation_FWD_DEFINED__ #define __ID3DUserDefinedAnnotation_FWD_DEFINED__ typedef interface ID3DUserDefinedAnnotation ID3DUserDefinedAnnotation; #endif /* __ID3DUserDefinedAnnotation_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -117,7 +104,6 @@ typedef interface ID3DUserDefinedAnnotation ID3DUserDefinedAnnotation; extern "C"{ #endif - /* interface __MIDL_itf_d3d11_1_0000_0000 */ /* [local] */ @@ -209,7 +195,6 @@ struct CD3D11_BLEND_DESC1 : public D3D11_BLEND_DESC1 extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0000_v0_0_s_ifspec; @@ -219,7 +204,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0000_v0_0_s_ifspec; /* interface ID3D11BlendState1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11BlendState1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -305,7 +289,6 @@ EXTERN_C const IID IID_ID3D11BlendState1; #ifdef COBJMACROS - #define ID3D11BlendState1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -315,7 +298,6 @@ EXTERN_C const IID IID_ID3D11BlendState1; #define ID3D11BlendState1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11BlendState1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -328,25 +310,18 @@ EXTERN_C const IID IID_ID3D11BlendState1; #define ID3D11BlendState1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11BlendState1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11BlendState1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11BlendState1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_1_0000_0001 */ /* [local] */ @@ -419,7 +394,6 @@ struct CD3D11_RASTERIZER_DESC1 : public D3D11_RASTERIZER_DESC1 extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0001_v0_0_s_ifspec; @@ -429,7 +403,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0001_v0_0_s_ifspec; /* interface ID3D11RasterizerState1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11RasterizerState1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -515,7 +488,6 @@ EXTERN_C const IID IID_ID3D11RasterizerState1; #ifdef COBJMACROS - #define ID3D11RasterizerState1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -525,7 +497,6 @@ EXTERN_C const IID IID_ID3D11RasterizerState1; #define ID3D11RasterizerState1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11RasterizerState1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -538,25 +509,18 @@ EXTERN_C const IID IID_ID3D11RasterizerState1; #define ID3D11RasterizerState1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11RasterizerState1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11RasterizerState1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11RasterizerState1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_1_0000_0002 */ /* [local] */ @@ -566,8 +530,6 @@ enum D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED = 0x1 } D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0002_v0_0_s_ifspec; @@ -577,7 +539,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0002_v0_0_s_ifspec; /* interface ID3DDeviceContextState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3DDeviceContextState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -649,7 +610,6 @@ EXTERN_C const IID IID_ID3DDeviceContextState; #ifdef COBJMACROS - #define ID3DDeviceContextState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -659,7 +619,6 @@ EXTERN_C const IID IID_ID3DDeviceContextState; #define ID3DDeviceContextState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3DDeviceContextState_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -672,25 +631,18 @@ EXTERN_C const IID IID_ID3DDeviceContextState; #define ID3DDeviceContextState_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3DDeviceContextState_INTERFACE_DEFINED__ */ - #ifndef __ID3D11DeviceContext1_INTERFACE_DEFINED__ #define __ID3D11DeviceContext1_INTERFACE_DEFINED__ /* interface ID3D11DeviceContext1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DeviceContext1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2110,7 +2062,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext1; #ifdef COBJMACROS - #define ID3D11DeviceContext1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2120,7 +2071,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext1; #define ID3D11DeviceContext1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DeviceContext1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2133,7 +2083,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext1; #define ID3D11DeviceContext1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11DeviceContext1_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) @@ -2458,7 +2407,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext1; #define ID3D11DeviceContext1_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) - #define ID3D11DeviceContext1_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) @@ -2518,15 +2466,10 @@ EXTERN_C const IID IID_ID3D11DeviceContext1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DeviceContext1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_1_0000_0004 */ /* [local] */ @@ -2629,8 +2572,6 @@ typedef struct D3D11_VIDEO_SAMPLE_DESC DXGI_COLOR_SPACE_TYPE ColorSpace; } D3D11_VIDEO_SAMPLE_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0004_v0_0_s_ifspec; @@ -2640,7 +2581,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0004_v0_0_s_ifspec; /* interface ID3D11VideoContext1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoContext1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3578,7 +3518,6 @@ EXTERN_C const IID IID_ID3D11VideoContext1; #ifdef COBJMACROS - #define ID3D11VideoContext1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3588,7 +3527,6 @@ EXTERN_C const IID IID_ID3D11VideoContext1; #define ID3D11VideoContext1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoContext1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3601,7 +3539,6 @@ EXTERN_C const IID IID_ID3D11VideoContext1; #define ID3D11VideoContext1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoContext1_GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) \ ( (This)->lpVtbl -> GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) ) @@ -3776,7 +3713,6 @@ EXTERN_C const IID IID_ID3D11VideoContext1; #define ID3D11VideoContext1_VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) \ ( (This)->lpVtbl -> VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) ) - #define ID3D11VideoContext1_SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) \ ( (This)->lpVtbl -> SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) ) @@ -3821,22 +3757,16 @@ EXTERN_C const IID IID_ID3D11VideoContext1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoContext1_INTERFACE_DEFINED__ */ - #ifndef __ID3D11VideoDevice1_INTERFACE_DEFINED__ #define __ID3D11VideoDevice1_INTERFACE_DEFINED__ /* interface ID3D11VideoDevice1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoDevice1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4139,7 +4069,6 @@ EXTERN_C const IID IID_ID3D11VideoDevice1; #ifdef COBJMACROS - #define ID3D11VideoDevice1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4149,7 +4078,6 @@ EXTERN_C const IID IID_ID3D11VideoDevice1; #define ID3D11VideoDevice1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoDevice1_CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) \ ( (This)->lpVtbl -> CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) ) @@ -4201,7 +4129,6 @@ EXTERN_C const IID IID_ID3D11VideoDevice1; #define ID3D11VideoDevice1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize(This,pCryptoType,pDecoderProfile,pKeyExchangeType,pPrivateInputSize,pPrivateOutputSize) \ ( (This)->lpVtbl -> GetCryptoSessionPrivateDataSize(This,pCryptoType,pDecoderProfile,pKeyExchangeType,pPrivateInputSize,pPrivateOutputSize) ) @@ -4216,22 +4143,16 @@ EXTERN_C const IID IID_ID3D11VideoDevice1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoDevice1_INTERFACE_DEFINED__ */ - #ifndef __ID3D11VideoProcessorEnumerator1_INTERFACE_DEFINED__ #define __ID3D11VideoProcessorEnumerator1_INTERFACE_DEFINED__ /* interface ID3D11VideoProcessorEnumerator1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4368,7 +4289,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator1; #ifdef COBJMACROS - #define ID3D11VideoProcessorEnumerator1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4378,7 +4298,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator1; #define ID3D11VideoProcessorEnumerator1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoProcessorEnumerator1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4391,7 +4310,6 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator1; #define ID3D11VideoProcessorEnumerator1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoProcessorEnumerator1_GetVideoProcessorContentDesc(This,pContentDesc) \ ( (This)->lpVtbl -> GetVideoProcessorContentDesc(This,pContentDesc) ) @@ -4410,28 +4328,21 @@ EXTERN_C const IID IID_ID3D11VideoProcessorEnumerator1; #define ID3D11VideoProcessorEnumerator1_GetVideoProcessorFilterRange(This,Filter,pRange) \ ( (This)->lpVtbl -> GetVideoProcessorFilterRange(This,Filter,pRange) ) - #define ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion(This,InputFormat,InputColorSpace,OutputFormat,OutputColorSpace,pSupported) \ ( (This)->lpVtbl -> CheckVideoProcessorFormatConversion(This,InputFormat,InputColorSpace,OutputFormat,OutputColorSpace,pSupported) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoProcessorEnumerator1_INTERFACE_DEFINED__ */ - #ifndef __ID3D11Device1_INTERFACE_DEFINED__ #define __ID3D11Device1_INTERFACE_DEFINED__ /* interface ID3D11Device1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Device1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4918,7 +4829,6 @@ EXTERN_C const IID IID_ID3D11Device1; #ifdef COBJMACROS - #define ID3D11Device1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4928,7 +4838,6 @@ EXTERN_C const IID IID_ID3D11Device1; #define ID3D11Device1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Device1_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) @@ -5049,7 +4958,6 @@ EXTERN_C const IID IID_ID3D11Device1; #define ID3D11Device1_GetExceptionMode(This) \ ( (This)->lpVtbl -> GetExceptionMode(This) ) - #define ID3D11Device1_GetImmediateContext1(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) @@ -5073,22 +4981,16 @@ EXTERN_C const IID IID_ID3D11Device1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Device1_INTERFACE_DEFINED__ */ - #ifndef __ID3DUserDefinedAnnotation_INTERFACE_DEFINED__ #define __ID3DUserDefinedAnnotation_INTERFACE_DEFINED__ /* interface ID3DUserDefinedAnnotation */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3DUserDefinedAnnotation; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5158,7 +5060,6 @@ EXTERN_C const IID IID_ID3DUserDefinedAnnotation; #ifdef COBJMACROS - #define ID3DUserDefinedAnnotation_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5168,7 +5069,6 @@ EXTERN_C const IID IID_ID3DUserDefinedAnnotation; #define ID3DUserDefinedAnnotation_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3DUserDefinedAnnotation_BeginEvent(This,Name) \ ( (This)->lpVtbl -> BeginEvent(This,Name) ) @@ -5183,15 +5083,10 @@ EXTERN_C const IID IID_ID3DUserDefinedAnnotation; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3DUserDefinedAnnotation_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_1_0000_0009 */ /* [local] */ @@ -5205,7 +5100,6 @@ DEFINE_GUID(IID_ID3D11VideoProcessorEnumerator1,0x465217F2,0x5568,0x43CF,0xB5,0x DEFINE_GUID(IID_ID3D11Device1,0xa04bfb29,0x08ef,0x43d6,0xa4,0x9c,0xa9,0xbd,0xbd,0xcb,0xe6,0x86); DEFINE_GUID(IID_ID3DUserDefinedAnnotation,0xb2daad8b,0x03d4,0x4dbf,0x95,0xeb,0x32,0xab,0x4b,0x63,0xd0,0xab); - extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0009_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0009_v0_0_s_ifspec; @@ -5218,5 +5112,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_1_0000_0009_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d11_2.h b/gfx/include/dxsdk/d3d11_2.h index e8a07a9af0..1d485b24c6 100644 --- a/gfx/include/dxsdk/d3d11_2.h +++ b/gfx/include/dxsdk/d3d11_2.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,14 +46,12 @@ typedef interface ID3D11DeviceContext2 ID3D11DeviceContext2; #endif /* __ID3D11DeviceContext2_FWD_DEFINED__ */ - #ifndef __ID3D11Device2_FWD_DEFINED__ #define __ID3D11Device2_FWD_DEFINED__ typedef interface ID3D11Device2 ID3D11Device2; #endif /* __ID3D11Device2_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -69,7 +63,6 @@ typedef interface ID3D11Device2 ID3D11Device2; extern "C"{ #endif - /* interface __MIDL_itf_d3d11_2_0000_0000 */ /* [local] */ @@ -150,8 +143,6 @@ enum D3D11_TILE_COPY_FLAG D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4 } D3D11_TILE_COPY_FLAG; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0000_v0_0_s_ifspec; @@ -161,7 +152,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0000_v0_0_s_ifspec; /* interface ID3D11DeviceContext2 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DeviceContext2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1557,7 +1547,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext2; #ifdef COBJMACROS - #define ID3D11DeviceContext2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1567,7 +1556,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext2; #define ID3D11DeviceContext2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DeviceContext2_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1580,7 +1568,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext2; #define ID3D11DeviceContext2_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11DeviceContext2_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) @@ -1905,7 +1892,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext2; #define ID3D11DeviceContext2_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) - #define ID3D11DeviceContext2_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) @@ -1963,7 +1949,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext2; #define ID3D11DeviceContext2_DiscardView1(This,pResourceView,pRects,NumRects) \ ( (This)->lpVtbl -> DiscardView1(This,pResourceView,pRects,NumRects) ) - #define ID3D11DeviceContext2_UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) \ ( (This)->lpVtbl -> UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) ) @@ -1996,22 +1981,16 @@ EXTERN_C const IID IID_ID3D11DeviceContext2; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DeviceContext2_INTERFACE_DEFINED__ */ - #ifndef __ID3D11Device2_INTERFACE_DEFINED__ #define __ID3D11Device2_INTERFACE_DEFINED__ /* interface ID3D11Device2 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Device2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2521,7 +2500,6 @@ EXTERN_C const IID IID_ID3D11Device2; #ifdef COBJMACROS - #define ID3D11Device2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2531,7 +2509,6 @@ EXTERN_C const IID IID_ID3D11Device2; #define ID3D11Device2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Device2_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) @@ -2652,7 +2629,6 @@ EXTERN_C const IID IID_ID3D11Device2; #define ID3D11Device2_GetExceptionMode(This) \ ( (This)->lpVtbl -> GetExceptionMode(This) ) - #define ID3D11Device2_GetImmediateContext1(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) @@ -2674,7 +2650,6 @@ EXTERN_C const IID IID_ID3D11Device2; #define ID3D11Device2_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) - #define ID3D11Device2_GetImmediateContext2(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) @@ -2689,22 +2664,16 @@ EXTERN_C const IID IID_ID3D11Device2; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Device2_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_2_0000_0002 */ /* [local] */ DEFINE_GUID(IID_ID3D11DeviceContext2,0x420d5b32,0xb90c,0x4da4,0xbe,0xf0,0x35,0x9f,0x6a,0x24,0xa8,0x3a); DEFINE_GUID(IID_ID3D11Device2,0x9d06dffa,0xd1e5,0x4d07,0x83,0xa8,0x1b,0xb1,0x23,0xf2,0xf8,0x41); - extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0002_v0_0_s_ifspec; @@ -2717,5 +2686,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_2_0000_0002_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d11_3.h b/gfx/include/dxsdk/d3d11_3.h index 402a0e58bd..d36b4f449f 100644 --- a/gfx/include/dxsdk/d3d11_3.h +++ b/gfx/include/dxsdk/d3d11_3.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,77 +46,66 @@ typedef interface ID3D11Texture2D1 ID3D11Texture2D1; #endif /* __ID3D11Texture2D1_FWD_DEFINED__ */ - #ifndef __ID3D11Texture3D1_FWD_DEFINED__ #define __ID3D11Texture3D1_FWD_DEFINED__ typedef interface ID3D11Texture3D1 ID3D11Texture3D1; #endif /* __ID3D11Texture3D1_FWD_DEFINED__ */ - #ifndef __ID3D11RasterizerState2_FWD_DEFINED__ #define __ID3D11RasterizerState2_FWD_DEFINED__ typedef interface ID3D11RasterizerState2 ID3D11RasterizerState2; #endif /* __ID3D11RasterizerState2_FWD_DEFINED__ */ - #ifndef __ID3D11ShaderResourceView1_FWD_DEFINED__ #define __ID3D11ShaderResourceView1_FWD_DEFINED__ typedef interface ID3D11ShaderResourceView1 ID3D11ShaderResourceView1; #endif /* __ID3D11ShaderResourceView1_FWD_DEFINED__ */ - #ifndef __ID3D11RenderTargetView1_FWD_DEFINED__ #define __ID3D11RenderTargetView1_FWD_DEFINED__ typedef interface ID3D11RenderTargetView1 ID3D11RenderTargetView1; #endif /* __ID3D11RenderTargetView1_FWD_DEFINED__ */ - #ifndef __ID3D11UnorderedAccessView1_FWD_DEFINED__ #define __ID3D11UnorderedAccessView1_FWD_DEFINED__ typedef interface ID3D11UnorderedAccessView1 ID3D11UnorderedAccessView1; #endif /* __ID3D11UnorderedAccessView1_FWD_DEFINED__ */ - #ifndef __ID3D11Query1_FWD_DEFINED__ #define __ID3D11Query1_FWD_DEFINED__ typedef interface ID3D11Query1 ID3D11Query1; #endif /* __ID3D11Query1_FWD_DEFINED__ */ - #ifndef __ID3D11DeviceContext3_FWD_DEFINED__ #define __ID3D11DeviceContext3_FWD_DEFINED__ typedef interface ID3D11DeviceContext3 ID3D11DeviceContext3; #endif /* __ID3D11DeviceContext3_FWD_DEFINED__ */ - #ifndef __ID3D11Fence_FWD_DEFINED__ #define __ID3D11Fence_FWD_DEFINED__ typedef interface ID3D11Fence ID3D11Fence; #endif /* __ID3D11Fence_FWD_DEFINED__ */ - #ifndef __ID3D11DeviceContext4_FWD_DEFINED__ #define __ID3D11DeviceContext4_FWD_DEFINED__ typedef interface ID3D11DeviceContext4 ID3D11DeviceContext4; #endif /* __ID3D11DeviceContext4_FWD_DEFINED__ */ - #ifndef __ID3D11Device3_FWD_DEFINED__ #define __ID3D11Device3_FWD_DEFINED__ typedef interface ID3D11Device3 ID3D11Device3; #endif /* __ID3D11Device3_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -132,7 +117,6 @@ typedef interface ID3D11Device3 ID3D11Device3; extern "C"{ #endif - /* interface __MIDL_itf_d3d11_3_0000_0000 */ /* [local] */ @@ -235,7 +219,6 @@ struct CD3D11_TEXTURE2D_DESC1 : public D3D11_TEXTURE2D_DESC1 extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0000_v0_0_s_ifspec; @@ -245,7 +228,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0000_v0_0_s_ifspec; /* interface ID3D11Texture2D1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Texture2D1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -344,7 +326,6 @@ EXTERN_C const IID IID_ID3D11Texture2D1; #ifdef COBJMACROS - #define ID3D11Texture2D1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -354,7 +335,6 @@ EXTERN_C const IID IID_ID3D11Texture2D1; #define ID3D11Texture2D1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Texture2D1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -367,7 +347,6 @@ EXTERN_C const IID IID_ID3D11Texture2D1; #define ID3D11Texture2D1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Texture2D1_GetType(This,pResourceDimension) \ ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) @@ -377,25 +356,18 @@ EXTERN_C const IID IID_ID3D11Texture2D1; #define ID3D11Texture2D1_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D11Texture2D1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11Texture2D1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Texture2D1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0001 */ /* [local] */ @@ -466,7 +438,6 @@ struct CD3D11_TEXTURE3D_DESC1 : public D3D11_TEXTURE3D_DESC1 extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0001_v0_0_s_ifspec; @@ -476,7 +447,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0001_v0_0_s_ifspec; /* interface ID3D11Texture3D1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Texture3D1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -575,7 +545,6 @@ EXTERN_C const IID IID_ID3D11Texture3D1; #ifdef COBJMACROS - #define ID3D11Texture3D1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -585,7 +554,6 @@ EXTERN_C const IID IID_ID3D11Texture3D1; #define ID3D11Texture3D1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Texture3D1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -598,7 +566,6 @@ EXTERN_C const IID IID_ID3D11Texture3D1; #define ID3D11Texture3D1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Texture3D1_GetType(This,pResourceDimension) \ ( (This)->lpVtbl -> GetType(This,pResourceDimension) ) @@ -608,25 +575,18 @@ EXTERN_C const IID IID_ID3D11Texture3D1; #define ID3D11Texture3D1_GetEvictionPriority(This) \ ( (This)->lpVtbl -> GetEvictionPriority(This) ) - #define ID3D11Texture3D1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11Texture3D1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Texture3D1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0002 */ /* [local] */ @@ -710,7 +670,6 @@ struct CD3D11_RASTERIZER_DESC2 : public D3D11_RASTERIZER_DESC2 extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0002_v0_0_s_ifspec; @@ -720,7 +679,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0002_v0_0_s_ifspec; /* interface ID3D11RasterizerState2 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11RasterizerState2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -811,7 +769,6 @@ EXTERN_C const IID IID_ID3D11RasterizerState2; #ifdef COBJMACROS - #define ID3D11RasterizerState2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -821,7 +778,6 @@ EXTERN_C const IID IID_ID3D11RasterizerState2; #define ID3D11RasterizerState2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11RasterizerState2_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -834,29 +790,21 @@ EXTERN_C const IID IID_ID3D11RasterizerState2; #define ID3D11RasterizerState2_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11RasterizerState2_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11RasterizerState2_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) - #define ID3D11RasterizerState2_GetDesc2(This,pDesc) \ ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11RasterizerState2_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0003 */ /* [local] */ @@ -1109,7 +1057,6 @@ struct CD3D11_SHADER_RESOURCE_VIEW_DESC1 : public D3D11_SHADER_RESOURCE_VIEW_DES extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0003_v0_0_s_ifspec; @@ -1119,7 +1066,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0003_v0_0_s_ifspec; /* interface ID3D11ShaderResourceView1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11ShaderResourceView1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1210,7 +1156,6 @@ EXTERN_C const IID IID_ID3D11ShaderResourceView1; #ifdef COBJMACROS - #define ID3D11ShaderResourceView1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1220,7 +1165,6 @@ EXTERN_C const IID IID_ID3D11ShaderResourceView1; #define ID3D11ShaderResourceView1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11ShaderResourceView1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1233,29 +1177,21 @@ EXTERN_C const IID IID_ID3D11ShaderResourceView1; #define ID3D11ShaderResourceView1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11ShaderResourceView1_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11ShaderResourceView1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11ShaderResourceView1_GetDesc1(This,pDesc1) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11ShaderResourceView1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0004 */ /* [local] */ @@ -1457,7 +1393,6 @@ struct CD3D11_RENDER_TARGET_VIEW_DESC1 : public D3D11_RENDER_TARGET_VIEW_DESC1 extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0004_v0_0_s_ifspec; @@ -1467,7 +1402,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0004_v0_0_s_ifspec; /* interface ID3D11RenderTargetView1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11RenderTargetView1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1558,7 +1492,6 @@ EXTERN_C const IID IID_ID3D11RenderTargetView1; #ifdef COBJMACROS - #define ID3D11RenderTargetView1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1568,7 +1501,6 @@ EXTERN_C const IID IID_ID3D11RenderTargetView1; #define ID3D11RenderTargetView1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11RenderTargetView1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1581,29 +1513,21 @@ EXTERN_C const IID IID_ID3D11RenderTargetView1; #define ID3D11RenderTargetView1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11RenderTargetView1_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11RenderTargetView1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11RenderTargetView1_GetDesc1(This,pDesc1) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11RenderTargetView1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0005 */ /* [local] */ @@ -1793,7 +1717,6 @@ struct CD3D11_UNORDERED_ACCESS_VIEW_DESC1 : public D3D11_UNORDERED_ACCESS_VIEW_D extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0005_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0005_v0_0_s_ifspec; @@ -1803,7 +1726,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0005_v0_0_s_ifspec; /* interface ID3D11UnorderedAccessView1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11UnorderedAccessView1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1894,7 +1816,6 @@ EXTERN_C const IID IID_ID3D11UnorderedAccessView1; #ifdef COBJMACROS - #define ID3D11UnorderedAccessView1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1904,7 +1825,6 @@ EXTERN_C const IID IID_ID3D11UnorderedAccessView1; #define ID3D11UnorderedAccessView1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11UnorderedAccessView1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -1917,29 +1837,21 @@ EXTERN_C const IID IID_ID3D11UnorderedAccessView1; #define ID3D11UnorderedAccessView1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11UnorderedAccessView1_GetResource(This,ppResource) \ ( (This)->lpVtbl -> GetResource(This,ppResource) ) - #define ID3D11UnorderedAccessView1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11UnorderedAccessView1_GetDesc1(This,pDesc1) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11UnorderedAccessView1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0006 */ /* [local] */ @@ -1974,7 +1886,6 @@ struct CD3D11_QUERY_DESC1 : public D3D11_QUERY_DESC1 extern "C"{ #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0006_v0_0_s_ifspec; @@ -1984,7 +1895,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0006_v0_0_s_ifspec; /* interface ID3D11Query1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Query1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2073,7 +1983,6 @@ EXTERN_C const IID IID_ID3D11Query1; #ifdef COBJMACROS - #define ID3D11Query1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2083,7 +1992,6 @@ EXTERN_C const IID IID_ID3D11Query1; #define ID3D11Query1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Query1_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2096,29 +2004,21 @@ EXTERN_C const IID IID_ID3D11Query1; #define ID3D11Query1_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Query1_GetDataSize(This) \ ( (This)->lpVtbl -> GetDataSize(This) ) - #define ID3D11Query1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) - #define ID3D11Query1_GetDesc1(This,pDesc1) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc1) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Query1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0007 */ /* [local] */ @@ -2132,7 +2032,6 @@ enum D3D11_FENCE_FLAG DEFINE_ENUM_FLAG_OPERATORS(D3D11_FENCE_FLAG); - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0007_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0007_v0_0_s_ifspec; @@ -2142,7 +2041,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0007_v0_0_s_ifspec; /* interface ID3D11DeviceContext3 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DeviceContext3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3479,7 +3377,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext3; #ifdef COBJMACROS - #define ID3D11DeviceContext3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3489,7 +3386,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext3; #define ID3D11DeviceContext3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DeviceContext3_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -3502,7 +3398,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext3; #define ID3D11DeviceContext3_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11DeviceContext3_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) @@ -3827,7 +3722,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext3; #define ID3D11DeviceContext3_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) - #define ID3D11DeviceContext3_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) @@ -3885,7 +3779,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext3; #define ID3D11DeviceContext3_DiscardView1(This,pResourceView,pRects,NumRects) \ ( (This)->lpVtbl -> DiscardView1(This,pResourceView,pRects,NumRects) ) - #define ID3D11DeviceContext3_UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) \ ( (This)->lpVtbl -> UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) ) @@ -3916,7 +3809,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext3; #define ID3D11DeviceContext3_EndEvent(This) \ ( (This)->lpVtbl -> EndEvent(This) ) - #define ID3D11DeviceContext3_Flush1(This,ContextType,hEvent) \ ( (This)->lpVtbl -> Flush1(This,ContextType,hEvent) ) @@ -3928,22 +3820,16 @@ EXTERN_C const IID IID_ID3D11DeviceContext3; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DeviceContext3_INTERFACE_DEFINED__ */ - #ifndef __ID3D11Fence_INTERFACE_DEFINED__ #define __ID3D11Fence_INTERFACE_DEFINED__ /* interface ID3D11Fence */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Fence; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4054,7 +3940,6 @@ EXTERN_C const IID IID_ID3D11Fence; #ifdef COBJMACROS - #define ID3D11Fence_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4064,7 +3949,6 @@ EXTERN_C const IID IID_ID3D11Fence; #define ID3D11Fence_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Fence_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -4077,7 +3961,6 @@ EXTERN_C const IID IID_ID3D11Fence; #define ID3D11Fence_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11Fence_CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) \ ( (This)->lpVtbl -> CreateSharedHandle(This,pAttributes,dwAccess,lpName,pHandle) ) @@ -4089,22 +3972,16 @@ EXTERN_C const IID IID_ID3D11Fence; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Fence_INTERFACE_DEFINED__ */ - #ifndef __ID3D11DeviceContext4_INTERFACE_DEFINED__ #define __ID3D11DeviceContext4_INTERFACE_DEFINED__ /* interface ID3D11DeviceContext4 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11DeviceContext4; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5454,7 +5331,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #ifdef COBJMACROS - #define ID3D11DeviceContext4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5464,7 +5340,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #define ID3D11DeviceContext4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11DeviceContext4_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -5477,7 +5352,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #define ID3D11DeviceContext4_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11DeviceContext4_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) \ ( (This)->lpVtbl -> VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) ) @@ -5802,7 +5676,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #define ID3D11DeviceContext4_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) \ ( (This)->lpVtbl -> FinishCommandList(This,RestoreDeferredContextState,ppCommandList) ) - #define ID3D11DeviceContext4_CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) \ ( (This)->lpVtbl -> CopySubresourceRegion1(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox,CopyFlags) ) @@ -5860,7 +5733,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #define ID3D11DeviceContext4_DiscardView1(This,pResourceView,pRects,NumRects) \ ( (This)->lpVtbl -> DiscardView1(This,pResourceView,pRects,NumRects) ) - #define ID3D11DeviceContext4_UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) \ ( (This)->lpVtbl -> UpdateTileMappings(This,pTiledResource,NumTiledResourceRegions,pTiledResourceRegionStartCoordinates,pTiledResourceRegionSizes,pTilePool,NumRanges,pRangeFlags,pTilePoolStartOffsets,pRangeTileCounts,Flags) ) @@ -5891,7 +5763,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #define ID3D11DeviceContext4_EndEvent(This) \ ( (This)->lpVtbl -> EndEvent(This) ) - #define ID3D11DeviceContext4_Flush1(This,ContextType,hEvent) \ ( (This)->lpVtbl -> Flush1(This,ContextType,hEvent) ) @@ -5901,7 +5772,6 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #define ID3D11DeviceContext4_GetHardwareProtectionState(This,pHwProtectionEnable) \ ( (This)->lpVtbl -> GetHardwareProtectionState(This,pHwProtectionEnable) ) - #define ID3D11DeviceContext4_Signal(This,pFence,Value) \ ( (This)->lpVtbl -> Signal(This,pFence,Value) ) @@ -5910,22 +5780,16 @@ EXTERN_C const IID IID_ID3D11DeviceContext4; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11DeviceContext4_INTERFACE_DEFINED__ */ - #ifndef __ID3D11Device3_INTERFACE_DEFINED__ #define __ID3D11Device3_INTERFACE_DEFINED__ /* interface ID3D11Device3 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Device3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6589,7 +6453,6 @@ EXTERN_C const IID IID_ID3D11Device3; #ifdef COBJMACROS - #define ID3D11Device3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6599,7 +6462,6 @@ EXTERN_C const IID IID_ID3D11Device3; #define ID3D11Device3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Device3_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) @@ -6720,7 +6582,6 @@ EXTERN_C const IID IID_ID3D11Device3; #define ID3D11Device3_GetExceptionMode(This) \ ( (This)->lpVtbl -> GetExceptionMode(This) ) - #define ID3D11Device3_GetImmediateContext1(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) @@ -6742,7 +6603,6 @@ EXTERN_C const IID IID_ID3D11Device3; #define ID3D11Device3_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) - #define ID3D11Device3_GetImmediateContext2(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) @@ -6755,7 +6615,6 @@ EXTERN_C const IID IID_ID3D11Device3; #define ID3D11Device3_CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) \ ( (This)->lpVtbl -> CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) ) - #define ID3D11Device3_CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) \ ( (This)->lpVtbl -> CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) ) @@ -6791,15 +6650,10 @@ EXTERN_C const IID IID_ID3D11Device3; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Device3_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_3_0000_0011 */ /* [local] */ @@ -6815,7 +6669,6 @@ DEFINE_GUID(IID_ID3D11Fence,0xaffde9d1,0x1df7,0x4bb7,0x8a,0x34,0x0f,0x46,0x25,0x DEFINE_GUID(IID_ID3D11DeviceContext4,0x917600da,0xf58c,0x4c33,0x98,0xd8,0x3e,0x15,0xb3,0x90,0xfa,0x24); DEFINE_GUID(IID_ID3D11Device3,0xA05C8C37,0xD2C6,0x4732,0xB3,0xA0,0x9C,0xE0,0xB0,0xDC,0x9A,0xE6); - extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0011_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0011_v0_0_s_ifspec; @@ -6828,5 +6681,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_3_0000_0011_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d11_4.h b/gfx/include/dxsdk/d3d11_4.h index 97592638d4..8b883c7946 100644 --- a/gfx/include/dxsdk/d3d11_4.h +++ b/gfx/include/dxsdk/d3d11_4.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,28 +46,24 @@ typedef interface ID3D11Device4 ID3D11Device4; #endif /* __ID3D11Device4_FWD_DEFINED__ */ - #ifndef __ID3D11Device5_FWD_DEFINED__ #define __ID3D11Device5_FWD_DEFINED__ typedef interface ID3D11Device5 ID3D11Device5; #endif /* __ID3D11Device5_FWD_DEFINED__ */ - #ifndef __ID3D11Multithread_FWD_DEFINED__ #define __ID3D11Multithread_FWD_DEFINED__ typedef interface ID3D11Multithread ID3D11Multithread; #endif /* __ID3D11Multithread_FWD_DEFINED__ */ - #ifndef __ID3D11VideoContext2_FWD_DEFINED__ #define __ID3D11VideoContext2_FWD_DEFINED__ typedef interface ID3D11VideoContext2 ID3D11VideoContext2; #endif /* __ID3D11VideoContext2_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -83,7 +75,6 @@ typedef interface ID3D11VideoContext2 ID3D11VideoContext2; extern "C"{ #endif - /* interface __MIDL_itf_d3d11_4_0000_0000 */ /* [local] */ @@ -97,7 +88,6 @@ extern "C"{ /*#pragma region App Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ - extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0000_v0_0_s_ifspec; @@ -107,7 +97,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0000_v0_0_s_ifspec; /* interface ID3D11Device4 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Device4; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -704,7 +693,6 @@ EXTERN_C const IID IID_ID3D11Device4; #ifdef COBJMACROS - #define ID3D11Device4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -714,7 +702,6 @@ EXTERN_C const IID IID_ID3D11Device4; #define ID3D11Device4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Device4_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) @@ -835,7 +822,6 @@ EXTERN_C const IID IID_ID3D11Device4; #define ID3D11Device4_GetExceptionMode(This) \ ( (This)->lpVtbl -> GetExceptionMode(This) ) - #define ID3D11Device4_GetImmediateContext1(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) @@ -857,7 +843,6 @@ EXTERN_C const IID IID_ID3D11Device4; #define ID3D11Device4_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) - #define ID3D11Device4_GetImmediateContext2(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) @@ -870,7 +855,6 @@ EXTERN_C const IID IID_ID3D11Device4; #define ID3D11Device4_CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) \ ( (This)->lpVtbl -> CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) ) - #define ID3D11Device4_CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) \ ( (This)->lpVtbl -> CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) ) @@ -904,7 +888,6 @@ EXTERN_C const IID IID_ID3D11Device4; #define ID3D11Device4_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) \ ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) ) - #define ID3D11Device4_RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) \ ( (This)->lpVtbl -> RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) ) @@ -913,22 +896,16 @@ EXTERN_C const IID IID_ID3D11Device4; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Device4_INTERFACE_DEFINED__ */ - #ifndef __ID3D11Device5_INTERFACE_DEFINED__ #define __ID3D11Device5_INTERFACE_DEFINED__ /* interface ID3D11Device5 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Device5; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1553,7 +1530,6 @@ EXTERN_C const IID IID_ID3D11Device5; #ifdef COBJMACROS - #define ID3D11Device5_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1563,7 +1539,6 @@ EXTERN_C const IID IID_ID3D11Device5; #define ID3D11Device5_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Device5_CreateBuffer(This,pDesc,pInitialData,ppBuffer) \ ( (This)->lpVtbl -> CreateBuffer(This,pDesc,pInitialData,ppBuffer) ) @@ -1684,7 +1659,6 @@ EXTERN_C const IID IID_ID3D11Device5; #define ID3D11Device5_GetExceptionMode(This) \ ( (This)->lpVtbl -> GetExceptionMode(This) ) - #define ID3D11Device5_GetImmediateContext1(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext1(This,ppImmediateContext) ) @@ -1706,7 +1680,6 @@ EXTERN_C const IID IID_ID3D11Device5; #define ID3D11Device5_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) \ ( (This)->lpVtbl -> OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) ) - #define ID3D11Device5_GetImmediateContext2(This,ppImmediateContext) \ ( (This)->lpVtbl -> GetImmediateContext2(This,ppImmediateContext) ) @@ -1719,7 +1692,6 @@ EXTERN_C const IID IID_ID3D11Device5; #define ID3D11Device5_CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) \ ( (This)->lpVtbl -> CheckMultisampleQualityLevels1(This,Format,SampleCount,Flags,pNumQualityLevels) ) - #define ID3D11Device5_CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) \ ( (This)->lpVtbl -> CreateTexture2D1(This,pDesc1,pInitialData,ppTexture2D) ) @@ -1753,14 +1725,12 @@ EXTERN_C const IID IID_ID3D11Device5; #define ID3D11Device5_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) \ ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,pSrcResource,SrcSubresource,pSrcBox) ) - #define ID3D11Device5_RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) \ ( (This)->lpVtbl -> RegisterDeviceRemovedEvent(This,hEvent,pdwCookie) ) #define ID3D11Device5_UnregisterDeviceRemoved(This,dwCookie) \ ( (This)->lpVtbl -> UnregisterDeviceRemoved(This,dwCookie) ) - #define ID3D11Device5_OpenSharedFence(This,hFence,ReturnedInterface,ppFence) \ ( (This)->lpVtbl -> OpenSharedFence(This,hFence,ReturnedInterface,ppFence) ) @@ -1769,22 +1739,16 @@ EXTERN_C const IID IID_ID3D11Device5; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Device5_INTERFACE_DEFINED__ */ - #ifndef __ID3D11Multithread_INTERFACE_DEFINED__ #define __ID3D11Multithread_INTERFACE_DEFINED__ /* interface ID3D11Multithread */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Multithread; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1850,7 +1814,6 @@ EXTERN_C const IID IID_ID3D11Multithread; #ifdef COBJMACROS - #define ID3D11Multithread_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1860,7 +1823,6 @@ EXTERN_C const IID IID_ID3D11Multithread; #define ID3D11Multithread_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Multithread_Enter(This) \ ( (This)->lpVtbl -> Enter(This) ) @@ -1875,22 +1837,16 @@ EXTERN_C const IID IID_ID3D11Multithread; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Multithread_INTERFACE_DEFINED__ */ - #ifndef __ID3D11VideoContext2_INTERFACE_DEFINED__ #define __ID3D11VideoContext2_INTERFACE_DEFINED__ /* interface ID3D11VideoContext2 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11VideoContext2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2800,7 +2756,6 @@ EXTERN_C const IID IID_ID3D11VideoContext2; #ifdef COBJMACROS - #define ID3D11VideoContext2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2810,7 +2765,6 @@ EXTERN_C const IID IID_ID3D11VideoContext2; #define ID3D11VideoContext2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11VideoContext2_GetDevice(This,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) @@ -2823,7 +2777,6 @@ EXTERN_C const IID IID_ID3D11VideoContext2; #define ID3D11VideoContext2_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - #define ID3D11VideoContext2_GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) \ ( (This)->lpVtbl -> GetDecoderBuffer(This,pDecoder,Type,pBufferSize,ppBuffer) ) @@ -2998,7 +2951,6 @@ EXTERN_C const IID IID_ID3D11VideoContext2; #define ID3D11VideoContext2_VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) \ ( (This)->lpVtbl -> VideoProcessorGetStreamRotation(This,pVideoProcessor,StreamIndex,pEnable,pRotation) ) - #define ID3D11VideoContext2_SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) \ ( (This)->lpVtbl -> SubmitDecoderBuffers1(This,pDecoder,NumBuffers,pBufferDesc) ) @@ -3041,7 +2993,6 @@ EXTERN_C const IID IID_ID3D11VideoContext2; #define ID3D11VideoContext2_VideoProcessorGetBehaviorHints(This,pVideoProcessor,OutputWidth,OutputHeight,OutputFormat,StreamCount,pStreams,pBehaviorHints) \ ( (This)->lpVtbl -> VideoProcessorGetBehaviorHints(This,pVideoProcessor,OutputWidth,OutputHeight,OutputFormat,StreamCount,pStreams,pBehaviorHints) ) - #define ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData(This,pVideoProcessor,Type,Size,pHDRMetaData) \ ( (This)->lpVtbl -> VideoProcessorSetOutputHDRMetaData(This,pVideoProcessor,Type,Size,pHDRMetaData) ) @@ -3056,15 +3007,10 @@ EXTERN_C const IID IID_ID3D11VideoContext2; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11VideoContext2_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11_4_0000_0004 */ /* [local] */ @@ -3080,7 +3026,6 @@ DEFINE_GUID(IID_ID3D11Device5,0x8ffde202,0xa0e7,0x45df,0x9e,0x01,0xe8,0x37,0x80, DEFINE_GUID(IID_ID3D11Multithread,0x9B7E4E00,0x342C,0x4106,0xA1,0x9F,0x4F,0x27,0x04,0xF6,0x89,0xF0); DEFINE_GUID(IID_ID3D11VideoContext2,0xC4E7374C,0x6243,0x4D1B,0xAE,0x87,0x52,0xB4,0xF7,0x40,0xE2,0x61); - extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0004_v0_0_s_ifspec; @@ -3093,5 +3038,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11_4_0000_0004_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d11on12.h b/gfx/include/dxsdk/d3d11on12.h index d0046e0d55..0f65e77a5c 100644 --- a/gfx/include/dxsdk/d3d11on12.h +++ b/gfx/include/dxsdk/d3d11on12.h @@ -4,14 +4,10 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -49,7 +45,6 @@ typedef interface ID3D11On12Device ID3D11On12Device; #endif /* __ID3D11On12Device_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -60,7 +55,6 @@ typedef interface ID3D11On12Device ID3D11On12Device; extern "C"{ #endif - /* interface __MIDL_itf_d3d11on12_0000_0000 */ /* [local] */ @@ -141,8 +135,6 @@ typedef struct D3D11_RESOURCE_FLAGS UINT StructureByteStride; } D3D11_RESOURCE_FLAGS; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0000_v0_0_s_ifspec; @@ -152,7 +144,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0000_v0_0_s_ifspec; /* interface ID3D11On12Device */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11On12Device; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -228,7 +219,6 @@ EXTERN_C const IID IID_ID3D11On12Device; #ifdef COBJMACROS - #define ID3D11On12Device_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -238,7 +228,6 @@ EXTERN_C const IID IID_ID3D11On12Device; #define ID3D11On12Device_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11On12Device_CreateWrappedResource(This,pResource12,pFlags11,InState,OutState,riid,ppResource11) \ ( (This)->lpVtbl -> CreateWrappedResource(This,pResource12,pFlags11,InState,OutState,riid,ppResource11) ) @@ -250,15 +239,10 @@ EXTERN_C const IID IID_ID3D11On12Device; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11On12Device_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11on12_0000_0001 */ /* [local] */ @@ -266,7 +250,6 @@ EXTERN_C const IID IID_ID3D11On12Device; /*#pragma endregion*/ DEFINE_GUID(IID_ID3D11On12Device,0x85611e73,0x70a9,0x490e,0x96,0x14,0xa9,0xe3,0x02,0x77,0x79,0x04); - extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0001_v0_0_s_ifspec; @@ -279,5 +262,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0001_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d11sdklayers.h b/gfx/include/dxsdk/d3d11sdklayers.h index 8e0ef78e53..7ed49f21ea 100644 --- a/gfx/include/dxsdk/d3d11sdklayers.h +++ b/gfx/include/dxsdk/d3d11sdklayers.h @@ -4,15 +4,11 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -50,42 +46,36 @@ typedef interface ID3D11Debug ID3D11Debug; #endif /* __ID3D11Debug_FWD_DEFINED__ */ - #ifndef __ID3D11SwitchToRef_FWD_DEFINED__ #define __ID3D11SwitchToRef_FWD_DEFINED__ typedef interface ID3D11SwitchToRef ID3D11SwitchToRef; #endif /* __ID3D11SwitchToRef_FWD_DEFINED__ */ - #ifndef __ID3D11TracingDevice_FWD_DEFINED__ #define __ID3D11TracingDevice_FWD_DEFINED__ typedef interface ID3D11TracingDevice ID3D11TracingDevice; #endif /* __ID3D11TracingDevice_FWD_DEFINED__ */ - #ifndef __ID3D11RefTrackingOptions_FWD_DEFINED__ #define __ID3D11RefTrackingOptions_FWD_DEFINED__ typedef interface ID3D11RefTrackingOptions ID3D11RefTrackingOptions; #endif /* __ID3D11RefTrackingOptions_FWD_DEFINED__ */ - #ifndef __ID3D11RefDefaultTrackingOptions_FWD_DEFINED__ #define __ID3D11RefDefaultTrackingOptions_FWD_DEFINED__ typedef interface ID3D11RefDefaultTrackingOptions ID3D11RefDefaultTrackingOptions; #endif /* __ID3D11RefDefaultTrackingOptions_FWD_DEFINED__ */ - #ifndef __ID3D11InfoQueue_FWD_DEFINED__ #define __ID3D11InfoQueue_FWD_DEFINED__ typedef interface ID3D11InfoQueue ID3D11InfoQueue; #endif /* __ID3D11InfoQueue_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -95,7 +85,6 @@ typedef interface ID3D11InfoQueue ID3D11InfoQueue; extern "C"{ #endif - /* interface __MIDL_itf_d3d11sdklayers_0000_0000 */ /* [local] */ @@ -129,7 +118,6 @@ enum D3D11_RLDO_FLAGS DEFINE_ENUM_FLAG_OPERATORS(D3D11_RLDO_FLAGS) - extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0000_v0_0_s_ifspec; @@ -139,7 +127,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0000_v0_0_s_ifspec; /* interface ID3D11Debug */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11Debug; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -248,7 +235,6 @@ EXTERN_C const IID IID_ID3D11Debug; #ifdef COBJMACROS - #define ID3D11Debug_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -258,7 +244,6 @@ EXTERN_C const IID IID_ID3D11Debug; #define ID3D11Debug_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11Debug_SetFeatureMask(This,Mask) \ ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) @@ -288,15 +273,10 @@ EXTERN_C const IID IID_ID3D11Debug; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11Debug_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11sdklayers_0000_0001 */ /* [local] */ @@ -306,7 +286,6 @@ EXTERN_C const IID IID_ID3D11Debug; /*#pragma region Desktop Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ - extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0001_v0_0_s_ifspec; @@ -316,7 +295,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0001_v0_0_s_ifspec; /* interface ID3D11SwitchToRef */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11SwitchToRef; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -370,7 +348,6 @@ EXTERN_C const IID IID_ID3D11SwitchToRef; #ifdef COBJMACROS - #define ID3D11SwitchToRef_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -380,7 +357,6 @@ EXTERN_C const IID IID_ID3D11SwitchToRef; #define ID3D11SwitchToRef_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11SwitchToRef_SetUseRef(This,UseRef) \ ( (This)->lpVtbl -> SetUseRef(This,UseRef) ) @@ -389,15 +365,10 @@ EXTERN_C const IID IID_ID3D11SwitchToRef; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11SwitchToRef_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11sdklayers_0000_0002 */ /* [local] */ @@ -439,8 +410,6 @@ enum D3D11_SHADER_TRACKING_OPTION D3D11_SHADER_TRACKING_OPTION_ALL_OPTIONS = ( D3D11_SHADER_TRACKING_OPTION_ALL_HAZARDS_ALLOWING_SAME | D3D11_SHADER_TRACKING_OPTION_TRACK_UNINITIALIZED ) } D3D11_SHADER_TRACKING_OPTIONS; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0002_v0_0_s_ifspec; @@ -450,7 +419,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0002_v0_0_s_ifspec; /* interface ID3D11TracingDevice */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11TracingDevice; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -518,7 +486,6 @@ EXTERN_C const IID IID_ID3D11TracingDevice; #ifdef COBJMACROS - #define ID3D11TracingDevice_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -528,7 +495,6 @@ EXTERN_C const IID IID_ID3D11TracingDevice; #define ID3D11TracingDevice_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11TracingDevice_SetShaderTrackingOptionsByType(This,ResourceTypeFlags,Options) \ ( (This)->lpVtbl -> SetShaderTrackingOptionsByType(This,ResourceTypeFlags,Options) ) @@ -537,22 +503,16 @@ EXTERN_C const IID IID_ID3D11TracingDevice; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11TracingDevice_INTERFACE_DEFINED__ */ - #ifndef __ID3D11RefTrackingOptions_INTERFACE_DEFINED__ #define __ID3D11RefTrackingOptions_INTERFACE_DEFINED__ /* interface ID3D11RefTrackingOptions */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11RefTrackingOptions; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -601,7 +561,6 @@ EXTERN_C const IID IID_ID3D11RefTrackingOptions; #ifdef COBJMACROS - #define ID3D11RefTrackingOptions_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -611,28 +570,21 @@ EXTERN_C const IID IID_ID3D11RefTrackingOptions; #define ID3D11RefTrackingOptions_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11RefTrackingOptions_SetTrackingOptions(This,uOptions) \ ( (This)->lpVtbl -> SetTrackingOptions(This,uOptions) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11RefTrackingOptions_INTERFACE_DEFINED__ */ - #ifndef __ID3D11RefDefaultTrackingOptions_INTERFACE_DEFINED__ #define __ID3D11RefDefaultTrackingOptions_INTERFACE_DEFINED__ /* interface ID3D11RefDefaultTrackingOptions */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11RefDefaultTrackingOptions; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -683,7 +635,6 @@ EXTERN_C const IID IID_ID3D11RefDefaultTrackingOptions; #ifdef COBJMACROS - #define ID3D11RefDefaultTrackingOptions_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -693,21 +644,15 @@ EXTERN_C const IID IID_ID3D11RefDefaultTrackingOptions; #define ID3D11RefDefaultTrackingOptions_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11RefDefaultTrackingOptions_SetTrackingOptions(This,ResourceTypeFlags,Options) \ ( (This)->lpVtbl -> SetTrackingOptions(This,ResourceTypeFlags,Options) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11RefDefaultTrackingOptions_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11sdklayers_0000_0005 */ /* [local] */ @@ -2102,7 +2047,6 @@ typedef struct D3D11_INFO_QUEUE_FILTER #define D3D11_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 - extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0005_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0005_v0_0_s_ifspec; @@ -2112,7 +2056,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0005_v0_0_s_ifspec; /* interface ID3D11InfoQueue */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11InfoQueue; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2441,7 +2384,6 @@ EXTERN_C const IID IID_ID3D11InfoQueue; #ifdef COBJMACROS - #define ID3D11InfoQueue_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2451,7 +2393,6 @@ EXTERN_C const IID IID_ID3D11InfoQueue; #define ID3D11InfoQueue_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11InfoQueue_SetMessageCountLimit(This,MessageCountLimit) \ ( (This)->lpVtbl -> SetMessageCountLimit(This,MessageCountLimit) ) @@ -2559,15 +2500,10 @@ EXTERN_C const IID IID_ID3D11InfoQueue; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11InfoQueue_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11sdklayers_0000_0006 */ /* [local] */ @@ -2581,7 +2517,6 @@ DEFINE_GUID(IID_ID3D11RefTrackingOptions,0x193dacdf,0x0db2,0x4c05,0xa5,0x5c,0xef DEFINE_GUID(IID_ID3D11RefDefaultTrackingOptions,0x03916615,0xc644,0x418c,0x9b,0xf4,0x75,0xdb,0x5b,0xe6,0x3c,0xa0); DEFINE_GUID(IID_ID3D11InfoQueue,0x6543dbb6,0x1b48,0x42f5,0xab,0x82,0xe9,0x7e,0xc7,0x43,0x26,0xf6); - extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0006_v0_0_s_ifspec; @@ -2594,5 +2529,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11sdklayers_0000_0006_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d11shader.h b/gfx/include/dxsdk/d3d11shader.h index 84c36cf64c..1b13ddeb96 100644 --- a/gfx/include/dxsdk/d3d11shader.h +++ b/gfx/include/dxsdk/d3d11shader.h @@ -12,7 +12,6 @@ #include "d3dcommon.h" - typedef enum D3D11_SHADER_VERSION_TYPE { D3D11_SHVER_PIXEL_SHADER = 0, @@ -41,7 +40,6 @@ typedef D3D_RESOURCE_RETURN_TYPE D3D11_RESOURCE_RETURN_TYPE; typedef D3D_CBUFFER_TYPE D3D11_CBUFFER_TYPE; - typedef struct _D3D11_SIGNATURE_PARAMETER_DESC { LPCSTR SemanticName; // Name of the semantic @@ -167,7 +165,6 @@ typedef struct _D3D11_SHADER_INPUT_BIND_DESC #define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080 #define D3D_SHADER_REQUIRES_TILED_RESOURCES 0x00000100 - typedef struct _D3D11_LIBRARY_DESC { LPCSTR Creator; // The name of the originator of the library. @@ -232,7 +229,6 @@ typedef struct _D3D11_PARAMETER_DESC UINT FirstOutComponent; // The first output register component for this parameter. } D3D11_PARAMETER_DESC; - ////////////////////////////////////////////////////////////////////////////// // Interfaces //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -454,7 +450,6 @@ DECLARE_INTERFACE_(ID3D11Module, IUnknown) _COM_Outptr_ interface ID3D11ModuleInstance ** ppModuleInstance) PURE; }; - // {469E07F7-045A-48D5-AA12-68A478CDF75D} interface DECLSPEC_UUID("469E07F7-045A-48D5-AA12-68A478CDF75D") ID3D11ModuleInstance; DEFINE_GUID(IID_ID3D11ModuleInstance, @@ -488,7 +483,6 @@ DECLARE_INTERFACE_(ID3D11ModuleInstance, IUnknown) STDMETHOD(BindResourceAsUnorderedAccessViewByName)(THIS_ _In_ LPCSTR pSrvName, _In_ UINT uDstUavSlot, _In_ UINT uCount) PURE; }; - // {59A6CD0E-E10D-4C1F-88C0-63ABA1DAF30E} interface DECLSPEC_UUID("59A6CD0E-E10D-4C1F-88C0-63ABA1DAF30E") ID3D11Linker; DEFINE_GUID(IID_ID3D11Linker, @@ -518,7 +512,6 @@ DECLARE_INTERFACE_(ID3D11Linker, IUnknown) STDMETHOD(AddClipPlaneFromCBuffer)(THIS_ _In_ UINT uCBufferSlot, _In_ UINT uCBufferEntry) PURE; }; - // {D80DD70C-8D2F-4751-94A1-03C79B3556DB} interface DECLSPEC_UUID("D80DD70C-8D2F-4751-94A1-03C79B3556DB") ID3D11LinkingNode; DEFINE_GUID(IID_ID3D11LinkingNode, @@ -534,7 +527,6 @@ DECLARE_INTERFACE_(ID3D11LinkingNode, IUnknown) STDMETHOD_(ULONG, Release)(THIS) PURE; }; - // {54133220-1CE8-43D3-8236-9855C5CEECFF} interface DECLSPEC_UUID("54133220-1CE8-43D3-8236-9855C5CEECFF") ID3D11FunctionLinkingGraph; DEFINE_GUID(IID_ID3D11FunctionLinkingGraph, @@ -584,7 +576,6 @@ DECLARE_INTERFACE_(ID3D11FunctionLinkingGraph, IUnknown) _COM_Outptr_ ID3DBlob ** ppBuffer) PURE; }; - ////////////////////////////////////////////////////////////////////////////// // APIs ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -598,4 +589,3 @@ extern "C" { #endif //__cplusplus #endif //__D3D11SHADER_H__ - diff --git a/gfx/include/dxsdk/d3d11shadertracing.h b/gfx/include/dxsdk/d3d11shadertracing.h index 1291ec82f1..6af0f2107d 100644 --- a/gfx/include/dxsdk/d3d11shadertracing.h +++ b/gfx/include/dxsdk/d3d11shadertracing.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,14 +41,12 @@ typedef interface ID3D11ShaderTrace ID3D11ShaderTrace; #endif /* __ID3D11ShaderTrace_FWD_DEFINED__ */ - #ifndef __ID3D11ShaderTraceFactory_FWD_DEFINED__ #define __ID3D11ShaderTraceFactory_FWD_DEFINED__ typedef interface ID3D11ShaderTraceFactory ID3D11ShaderTraceFactory; #endif /* __ID3D11ShaderTraceFactory_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -61,7 +55,6 @@ typedef interface ID3D11ShaderTraceFactory ID3D11ShaderTraceFactory; extern "C"{ #endif - /* interface __MIDL_itf_d3d11ShaderTracing_0000_0000 */ /* [local] */ @@ -252,8 +245,6 @@ typedef struct D3D11_TRACE_STEP UINT64 CurrentGlobalCycle; } D3D11_TRACE_STEP; - - extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0000_v0_0_s_ifspec; @@ -263,7 +254,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0000_v0_0_s_ifspec; /* interface ID3D11ShaderTrace */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11ShaderTrace; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -405,7 +395,6 @@ EXTERN_C const IID IID_ID3D11ShaderTrace; #ifdef COBJMACROS - #define ID3D11ShaderTrace_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -415,7 +404,6 @@ EXTERN_C const IID IID_ID3D11ShaderTrace; #define ID3D11ShaderTrace_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11ShaderTrace_TraceReady(This,pTestCount) \ ( (This)->lpVtbl -> TraceReady(This,pTestCount) ) @@ -442,22 +430,16 @@ EXTERN_C const IID IID_ID3D11ShaderTrace; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11ShaderTrace_INTERFACE_DEFINED__ */ - #ifndef __ID3D11ShaderTraceFactory_INTERFACE_DEFINED__ #define __ID3D11ShaderTraceFactory_INTERFACE_DEFINED__ /* interface ID3D11ShaderTraceFactory */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D11ShaderTraceFactory; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -516,7 +498,6 @@ EXTERN_C const IID IID_ID3D11ShaderTraceFactory; #ifdef COBJMACROS - #define ID3D11ShaderTraceFactory_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -526,21 +507,15 @@ EXTERN_C const IID IID_ID3D11ShaderTraceFactory; #define ID3D11ShaderTraceFactory_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D11ShaderTraceFactory_CreateShaderTrace(This,pShader,pTraceDesc,ppShaderTrace) \ ( (This)->lpVtbl -> CreateShaderTrace(This,pShader,pTraceDesc,ppShaderTrace) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D11ShaderTraceFactory_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d11ShaderTracing_0000_0002 */ /* [local] */ @@ -553,7 +528,6 @@ D3DDisassemble11Trace(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, _In_ UINT Flags, _COM_Outptr_ interface ID3D10Blob** ppDisassembly); - extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0002_v0_0_s_ifspec; @@ -566,5 +540,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d11ShaderTracing_0000_0002_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d12.h b/gfx/include/dxsdk/d3d12.h index 1946eb3d03..59e4b127ae 100644 --- a/gfx/include/dxsdk/d3d12.h +++ b/gfx/include/dxsdk/d3d12.h @@ -4,14 +4,10 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -49,189 +45,162 @@ typedef interface ID3D12Object ID3D12Object; #endif /* __ID3D12Object_FWD_DEFINED__ */ - #ifndef __ID3D12DeviceChild_FWD_DEFINED__ #define __ID3D12DeviceChild_FWD_DEFINED__ typedef interface ID3D12DeviceChild ID3D12DeviceChild; #endif /* __ID3D12DeviceChild_FWD_DEFINED__ */ - #ifndef __ID3D12RootSignature_FWD_DEFINED__ #define __ID3D12RootSignature_FWD_DEFINED__ typedef interface ID3D12RootSignature ID3D12RootSignature; #endif /* __ID3D12RootSignature_FWD_DEFINED__ */ - #ifndef __ID3D12RootSignatureDeserializer_FWD_DEFINED__ #define __ID3D12RootSignatureDeserializer_FWD_DEFINED__ typedef interface ID3D12RootSignatureDeserializer ID3D12RootSignatureDeserializer; #endif /* __ID3D12RootSignatureDeserializer_FWD_DEFINED__ */ - #ifndef __ID3D12VersionedRootSignatureDeserializer_FWD_DEFINED__ #define __ID3D12VersionedRootSignatureDeserializer_FWD_DEFINED__ typedef interface ID3D12VersionedRootSignatureDeserializer ID3D12VersionedRootSignatureDeserializer; #endif /* __ID3D12VersionedRootSignatureDeserializer_FWD_DEFINED__ */ - #ifndef __ID3D12Pageable_FWD_DEFINED__ #define __ID3D12Pageable_FWD_DEFINED__ typedef interface ID3D12Pageable ID3D12Pageable; #endif /* __ID3D12Pageable_FWD_DEFINED__ */ - #ifndef __ID3D12Heap_FWD_DEFINED__ #define __ID3D12Heap_FWD_DEFINED__ typedef interface ID3D12Heap ID3D12Heap; #endif /* __ID3D12Heap_FWD_DEFINED__ */ - #ifndef __ID3D12Resource_FWD_DEFINED__ #define __ID3D12Resource_FWD_DEFINED__ typedef interface ID3D12Resource ID3D12Resource; #endif /* __ID3D12Resource_FWD_DEFINED__ */ - #ifndef __ID3D12CommandAllocator_FWD_DEFINED__ #define __ID3D12CommandAllocator_FWD_DEFINED__ typedef interface ID3D12CommandAllocator ID3D12CommandAllocator; #endif /* __ID3D12CommandAllocator_FWD_DEFINED__ */ - #ifndef __ID3D12Fence_FWD_DEFINED__ #define __ID3D12Fence_FWD_DEFINED__ typedef interface ID3D12Fence ID3D12Fence; #endif /* __ID3D12Fence_FWD_DEFINED__ */ - #ifndef __ID3D12Fence1_FWD_DEFINED__ #define __ID3D12Fence1_FWD_DEFINED__ typedef interface ID3D12Fence1 ID3D12Fence1; #endif /* __ID3D12Fence1_FWD_DEFINED__ */ - #ifndef __ID3D12PipelineState_FWD_DEFINED__ #define __ID3D12PipelineState_FWD_DEFINED__ typedef interface ID3D12PipelineState ID3D12PipelineState; #endif /* __ID3D12PipelineState_FWD_DEFINED__ */ - #ifndef __ID3D12DescriptorHeap_FWD_DEFINED__ #define __ID3D12DescriptorHeap_FWD_DEFINED__ typedef interface ID3D12DescriptorHeap ID3D12DescriptorHeap; #endif /* __ID3D12DescriptorHeap_FWD_DEFINED__ */ - #ifndef __ID3D12QueryHeap_FWD_DEFINED__ #define __ID3D12QueryHeap_FWD_DEFINED__ typedef interface ID3D12QueryHeap ID3D12QueryHeap; #endif /* __ID3D12QueryHeap_FWD_DEFINED__ */ - #ifndef __ID3D12CommandSignature_FWD_DEFINED__ #define __ID3D12CommandSignature_FWD_DEFINED__ typedef interface ID3D12CommandSignature ID3D12CommandSignature; #endif /* __ID3D12CommandSignature_FWD_DEFINED__ */ - #ifndef __ID3D12CommandList_FWD_DEFINED__ #define __ID3D12CommandList_FWD_DEFINED__ typedef interface ID3D12CommandList ID3D12CommandList; #endif /* __ID3D12CommandList_FWD_DEFINED__ */ - #ifndef __ID3D12GraphicsCommandList_FWD_DEFINED__ #define __ID3D12GraphicsCommandList_FWD_DEFINED__ typedef interface ID3D12GraphicsCommandList ID3D12GraphicsCommandList; #endif /* __ID3D12GraphicsCommandList_FWD_DEFINED__ */ - #ifndef __ID3D12GraphicsCommandList1_FWD_DEFINED__ #define __ID3D12GraphicsCommandList1_FWD_DEFINED__ typedef interface ID3D12GraphicsCommandList1 ID3D12GraphicsCommandList1; #endif /* __ID3D12GraphicsCommandList1_FWD_DEFINED__ */ - #ifndef __ID3D12GraphicsCommandList2_FWD_DEFINED__ #define __ID3D12GraphicsCommandList2_FWD_DEFINED__ typedef interface ID3D12GraphicsCommandList2 ID3D12GraphicsCommandList2; #endif /* __ID3D12GraphicsCommandList2_FWD_DEFINED__ */ - #ifndef __ID3D12CommandQueue_FWD_DEFINED__ #define __ID3D12CommandQueue_FWD_DEFINED__ typedef interface ID3D12CommandQueue ID3D12CommandQueue; #endif /* __ID3D12CommandQueue_FWD_DEFINED__ */ - #ifndef __ID3D12Device_FWD_DEFINED__ #define __ID3D12Device_FWD_DEFINED__ typedef interface ID3D12Device ID3D12Device; #endif /* __ID3D12Device_FWD_DEFINED__ */ - #ifndef __ID3D12PipelineLibrary_FWD_DEFINED__ #define __ID3D12PipelineLibrary_FWD_DEFINED__ typedef interface ID3D12PipelineLibrary ID3D12PipelineLibrary; #endif /* __ID3D12PipelineLibrary_FWD_DEFINED__ */ - #ifndef __ID3D12PipelineLibrary1_FWD_DEFINED__ #define __ID3D12PipelineLibrary1_FWD_DEFINED__ typedef interface ID3D12PipelineLibrary1 ID3D12PipelineLibrary1; #endif /* __ID3D12PipelineLibrary1_FWD_DEFINED__ */ - #ifndef __ID3D12Device1_FWD_DEFINED__ #define __ID3D12Device1_FWD_DEFINED__ typedef interface ID3D12Device1 ID3D12Device1; #endif /* __ID3D12Device1_FWD_DEFINED__ */ - #ifndef __ID3D12Device2_FWD_DEFINED__ #define __ID3D12Device2_FWD_DEFINED__ typedef interface ID3D12Device2 ID3D12Device2; #endif /* __ID3D12Device2_FWD_DEFINED__ */ - #ifndef __ID3D12Device3_FWD_DEFINED__ #define __ID3D12Device3_FWD_DEFINED__ typedef interface ID3D12Device3 ID3D12Device3; #endif /* __ID3D12Device3_FWD_DEFINED__ */ - #ifndef __ID3D12Tools_FWD_DEFINED__ #define __ID3D12Tools_FWD_DEFINED__ typedef interface ID3D12Tools ID3D12Tools; #endif /* __ID3D12Tools_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -243,7 +212,6 @@ typedef interface ID3D12Tools ID3D12Tools; extern "C"{ #endif - /* interface __MIDL_itf_d3d12_0000_0000 */ /* [local] */ @@ -1299,8 +1267,6 @@ typedef struct D3D12_RASTERIZER_DESC D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster; } D3D12_RASTERIZER_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0000_v0_0_s_ifspec; @@ -1310,7 +1276,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0000_v0_0_s_ifspec; /* interface ID3D12Object */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Object; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1389,7 +1354,6 @@ EXTERN_C const IID IID_ID3D12Object; #ifdef COBJMACROS - #define ID3D12Object_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1399,7 +1363,6 @@ EXTERN_C const IID IID_ID3D12Object; #define ID3D12Object_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Object_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -1414,22 +1377,16 @@ EXTERN_C const IID IID_ID3D12Object; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Object_INTERFACE_DEFINED__ */ - #ifndef __ID3D12DeviceChild_INTERFACE_DEFINED__ #define __ID3D12DeviceChild_INTERFACE_DEFINED__ /* interface ID3D12DeviceChild */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12DeviceChild; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1500,7 +1457,6 @@ EXTERN_C const IID IID_ID3D12DeviceChild; #ifdef COBJMACROS - #define ID3D12DeviceChild_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1510,7 +1466,6 @@ EXTERN_C const IID IID_ID3D12DeviceChild; #define ID3D12DeviceChild_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12DeviceChild_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -1523,28 +1478,21 @@ EXTERN_C const IID IID_ID3D12DeviceChild; #define ID3D12DeviceChild_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12DeviceChild_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12DeviceChild_INTERFACE_DEFINED__ */ - #ifndef __ID3D12RootSignature_INTERFACE_DEFINED__ #define __ID3D12RootSignature_INTERFACE_DEFINED__ /* interface ID3D12RootSignature */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12RootSignature; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1611,7 +1559,6 @@ EXTERN_C const IID IID_ID3D12RootSignature; #ifdef COBJMACROS - #define ID3D12RootSignature_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1621,7 +1568,6 @@ EXTERN_C const IID IID_ID3D12RootSignature; #define ID3D12RootSignature_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12RootSignature_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -1634,22 +1580,15 @@ EXTERN_C const IID IID_ID3D12RootSignature; #define ID3D12RootSignature_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12RootSignature_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12RootSignature_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12_0000_0001 */ /* [local] */ @@ -2342,7 +2281,6 @@ enum D3D12_RESOURCE_BARRIER_TYPE D3D12_RESOURCE_BARRIER_TYPE_UAV = ( D3D12_RESOURCE_BARRIER_TYPE_ALIASING + 1 ) } D3D12_RESOURCE_BARRIER_TYPE; - typedef struct D3D12_RESOURCE_TRANSITION_BARRIER { ID3D12Resource *pResource; @@ -3193,8 +3131,6 @@ typedef struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC } ; } D3D12_VERSIONED_ROOT_SIGNATURE_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0001_v0_0_s_ifspec; @@ -3204,7 +3140,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0001_v0_0_s_ifspec; /* interface ID3D12RootSignatureDeserializer */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12RootSignatureDeserializer; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3250,7 +3185,6 @@ EXTERN_C const IID IID_ID3D12RootSignatureDeserializer; #ifdef COBJMACROS - #define ID3D12RootSignatureDeserializer_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3260,28 +3194,21 @@ EXTERN_C const IID IID_ID3D12RootSignatureDeserializer; #define ID3D12RootSignatureDeserializer_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12RootSignatureDeserializer_GetRootSignatureDesc(This) \ ( (This)->lpVtbl -> GetRootSignatureDesc(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12RootSignatureDeserializer_INTERFACE_DEFINED__ */ - #ifndef __ID3D12VersionedRootSignatureDeserializer_INTERFACE_DEFINED__ #define __ID3D12VersionedRootSignatureDeserializer_INTERFACE_DEFINED__ /* interface ID3D12VersionedRootSignatureDeserializer */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12VersionedRootSignatureDeserializer; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3336,7 +3263,6 @@ EXTERN_C const IID IID_ID3D12VersionedRootSignatureDeserializer; #ifdef COBJMACROS - #define ID3D12VersionedRootSignatureDeserializer_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3346,7 +3272,6 @@ EXTERN_C const IID IID_ID3D12VersionedRootSignatureDeserializer; #define ID3D12VersionedRootSignatureDeserializer_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12VersionedRootSignatureDeserializer_GetRootSignatureDescAtVersion(This,convertToVersion,ppDesc) \ ( (This)->lpVtbl -> GetRootSignatureDescAtVersion(This,convertToVersion,ppDesc) ) @@ -3355,15 +3280,10 @@ EXTERN_C const IID IID_ID3D12VersionedRootSignatureDeserializer; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12VersionedRootSignatureDeserializer_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12_0000_0003 */ /* [local] */ @@ -3590,9 +3510,6 @@ typedef struct D3D12_COMMAND_SIGNATURE_DESC UINT NodeMask; } D3D12_COMMAND_SIGNATURE_DESC; - - - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0003_v0_0_s_ifspec; @@ -3602,7 +3519,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0003_v0_0_s_ifspec; /* interface ID3D12Pageable */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Pageable; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3669,7 +3585,6 @@ EXTERN_C const IID IID_ID3D12Pageable; #ifdef COBJMACROS - #define ID3D12Pageable_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3679,7 +3594,6 @@ EXTERN_C const IID IID_ID3D12Pageable; #define ID3D12Pageable_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Pageable_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -3692,29 +3606,21 @@ EXTERN_C const IID IID_ID3D12Pageable; #define ID3D12Pageable_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Pageable_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Pageable_INTERFACE_DEFINED__ */ - #ifndef __ID3D12Heap_INTERFACE_DEFINED__ #define __ID3D12Heap_INTERFACE_DEFINED__ /* interface ID3D12Heap */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Heap; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3786,7 +3692,6 @@ EXTERN_C const IID IID_ID3D12Heap; #ifdef COBJMACROS - #define ID3D12Heap_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3796,7 +3701,6 @@ EXTERN_C const IID IID_ID3D12Heap; #define ID3D12Heap_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Heap_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -3809,37 +3713,24 @@ EXTERN_C const IID IID_ID3D12Heap; #define ID3D12Heap_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Heap_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12Heap_GetDesc(This) \ ( (This)->lpVtbl -> GetDesc(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - #endif /* __ID3D12Heap_INTERFACE_DEFINED__ */ - #ifndef __ID3D12Resource_INTERFACE_DEFINED__ #define __ID3D12Resource_INTERFACE_DEFINED__ /* interface ID3D12Resource */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Resource; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -3975,7 +3866,6 @@ EXTERN_C const IID IID_ID3D12Resource; #ifdef COBJMACROS - #define ID3D12Resource_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -3985,7 +3875,6 @@ EXTERN_C const IID IID_ID3D12Resource; #define ID3D12Resource_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Resource_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -3998,12 +3887,9 @@ EXTERN_C const IID IID_ID3D12Resource; #define ID3D12Resource_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Resource_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12Resource_Map(This,Subresource,pReadRange,ppData) \ ( (This)->lpVtbl -> Map(This,Subresource,pReadRange,ppData) ) @@ -4027,26 +3913,16 @@ EXTERN_C const IID IID_ID3D12Resource; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - #endif /* __ID3D12Resource_INTERFACE_DEFINED__ */ - #ifndef __ID3D12CommandAllocator_INTERFACE_DEFINED__ #define __ID3D12CommandAllocator_INTERFACE_DEFINED__ /* interface ID3D12CommandAllocator */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12CommandAllocator; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4118,7 +3994,6 @@ EXTERN_C const IID IID_ID3D12CommandAllocator; #ifdef COBJMACROS - #define ID3D12CommandAllocator_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4128,7 +4003,6 @@ EXTERN_C const IID IID_ID3D12CommandAllocator; #define ID3D12CommandAllocator_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12CommandAllocator_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -4141,33 +4015,24 @@ EXTERN_C const IID IID_ID3D12CommandAllocator; #define ID3D12CommandAllocator_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12CommandAllocator_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12CommandAllocator_Reset(This) \ ( (This)->lpVtbl -> Reset(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12CommandAllocator_INTERFACE_DEFINED__ */ - #ifndef __ID3D12Fence_INTERFACE_DEFINED__ #define __ID3D12Fence_INTERFACE_DEFINED__ /* interface ID3D12Fence */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Fence; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4255,7 +4120,6 @@ EXTERN_C const IID IID_ID3D12Fence; #ifdef COBJMACROS - #define ID3D12Fence_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4265,7 +4129,6 @@ EXTERN_C const IID IID_ID3D12Fence; #define ID3D12Fence_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Fence_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -4278,12 +4141,9 @@ EXTERN_C const IID IID_ID3D12Fence; #define ID3D12Fence_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Fence_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12Fence_GetCompletedValue(This) \ ( (This)->lpVtbl -> GetCompletedValue(This) ) @@ -4295,22 +4155,16 @@ EXTERN_C const IID IID_ID3D12Fence; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Fence_INTERFACE_DEFINED__ */ - #ifndef __ID3D12Fence1_INTERFACE_DEFINED__ #define __ID3D12Fence1_INTERFACE_DEFINED__ /* interface ID3D12Fence1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Fence1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4394,7 +4248,6 @@ EXTERN_C const IID IID_ID3D12Fence1; #ifdef COBJMACROS - #define ID3D12Fence1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4404,7 +4257,6 @@ EXTERN_C const IID IID_ID3D12Fence1; #define ID3D12Fence1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Fence1_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -4417,12 +4269,9 @@ EXTERN_C const IID IID_ID3D12Fence1; #define ID3D12Fence1_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Fence1_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12Fence1_GetCompletedValue(This) \ ( (This)->lpVtbl -> GetCompletedValue(This) ) @@ -4432,28 +4281,21 @@ EXTERN_C const IID IID_ID3D12Fence1; #define ID3D12Fence1_Signal(This,Value) \ ( (This)->lpVtbl -> Signal(This,Value) ) - #define ID3D12Fence1_GetCreationFlags(This) \ ( (This)->lpVtbl -> GetCreationFlags(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Fence1_INTERFACE_DEFINED__ */ - #ifndef __ID3D12PipelineState_INTERFACE_DEFINED__ #define __ID3D12PipelineState_INTERFACE_DEFINED__ /* interface ID3D12PipelineState */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12PipelineState; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4527,7 +4369,6 @@ EXTERN_C const IID IID_ID3D12PipelineState; #ifdef COBJMACROS - #define ID3D12PipelineState_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4537,7 +4378,6 @@ EXTERN_C const IID IID_ID3D12PipelineState; #define ID3D12PipelineState_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12PipelineState_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -4550,33 +4390,24 @@ EXTERN_C const IID IID_ID3D12PipelineState; #define ID3D12PipelineState_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12PipelineState_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12PipelineState_GetCachedBlob(This,ppBlob) \ ( (This)->lpVtbl -> GetCachedBlob(This,ppBlob) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12PipelineState_INTERFACE_DEFINED__ */ - #ifndef __ID3D12DescriptorHeap_INTERFACE_DEFINED__ #define __ID3D12DescriptorHeap_INTERFACE_DEFINED__ /* interface ID3D12DescriptorHeap */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12DescriptorHeap; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4658,7 +4489,6 @@ EXTERN_C const IID IID_ID3D12DescriptorHeap; #ifdef COBJMACROS - #define ID3D12DescriptorHeap_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4668,7 +4498,6 @@ EXTERN_C const IID IID_ID3D12DescriptorHeap; #define ID3D12DescriptorHeap_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12DescriptorHeap_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -4681,12 +4510,9 @@ EXTERN_C const IID IID_ID3D12DescriptorHeap; #define ID3D12DescriptorHeap_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12DescriptorHeap_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12DescriptorHeap_GetDesc(This) \ ( (This)->lpVtbl -> GetDesc(This) ) @@ -4698,34 +4524,16 @@ EXTERN_C const IID IID_ID3D12DescriptorHeap; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - - - - - - - - - #endif /* __ID3D12DescriptorHeap_INTERFACE_DEFINED__ */ - #ifndef __ID3D12QueryHeap_INTERFACE_DEFINED__ #define __ID3D12QueryHeap_INTERFACE_DEFINED__ /* interface ID3D12QueryHeap */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12QueryHeap; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4792,7 +4600,6 @@ EXTERN_C const IID IID_ID3D12QueryHeap; #ifdef COBJMACROS - #define ID3D12QueryHeap_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4802,7 +4609,6 @@ EXTERN_C const IID IID_ID3D12QueryHeap; #define ID3D12QueryHeap_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12QueryHeap_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -4815,30 +4621,21 @@ EXTERN_C const IID IID_ID3D12QueryHeap; #define ID3D12QueryHeap_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12QueryHeap_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12QueryHeap_INTERFACE_DEFINED__ */ - #ifndef __ID3D12CommandSignature_INTERFACE_DEFINED__ #define __ID3D12CommandSignature_INTERFACE_DEFINED__ /* interface ID3D12CommandSignature */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12CommandSignature; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -4905,7 +4702,6 @@ EXTERN_C const IID IID_ID3D12CommandSignature; #ifdef COBJMACROS - #define ID3D12CommandSignature_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -4915,7 +4711,6 @@ EXTERN_C const IID IID_ID3D12CommandSignature; #define ID3D12CommandSignature_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12CommandSignature_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -4928,30 +4723,21 @@ EXTERN_C const IID IID_ID3D12CommandSignature; #define ID3D12CommandSignature_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12CommandSignature_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12CommandSignature_INTERFACE_DEFINED__ */ - #ifndef __ID3D12CommandList_INTERFACE_DEFINED__ #define __ID3D12CommandList_INTERFACE_DEFINED__ /* interface ID3D12CommandList */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12CommandList; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5023,7 +4809,6 @@ EXTERN_C const IID IID_ID3D12CommandList; #ifdef COBJMACROS - #define ID3D12CommandList_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5033,7 +4818,6 @@ EXTERN_C const IID IID_ID3D12CommandList; #define ID3D12CommandList_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12CommandList_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -5046,32 +4830,24 @@ EXTERN_C const IID IID_ID3D12CommandList; #define ID3D12CommandList_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12CommandList_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12CommandList_GetType(This) \ ( (This)->lpVtbl -> GetType(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12CommandList_INTERFACE_DEFINED__ */ - #ifndef __ID3D12GraphicsCommandList_INTERFACE_DEFINED__ #define __ID3D12GraphicsCommandList_INTERFACE_DEFINED__ /* interface ID3D12GraphicsCommandList */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12GraphicsCommandList; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -5688,7 +5464,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList; #ifdef COBJMACROS - #define ID3D12GraphicsCommandList_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -5698,7 +5473,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList; #define ID3D12GraphicsCommandList_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12GraphicsCommandList_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -5711,15 +5485,12 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList; #define ID3D12GraphicsCommandList_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12GraphicsCommandList_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12GraphicsCommandList_GetType(This) \ ( (This)->lpVtbl -> GetType(This) ) - #define ID3D12GraphicsCommandList_Close(This) \ ( (This)->lpVtbl -> Close(This) ) @@ -5875,22 +5646,16 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12GraphicsCommandList_INTERFACE_DEFINED__ */ - #ifndef __ID3D12GraphicsCommandList1_INTERFACE_DEFINED__ #define __ID3D12GraphicsCommandList1_INTERFACE_DEFINED__ /* interface ID3D12GraphicsCommandList1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12GraphicsCommandList1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -6347,7 +6112,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList1; #ifdef COBJMACROS - #define ID3D12GraphicsCommandList1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -6357,7 +6121,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList1; #define ID3D12GraphicsCommandList1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12GraphicsCommandList1_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -6370,15 +6133,12 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList1; #define ID3D12GraphicsCommandList1_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12GraphicsCommandList1_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12GraphicsCommandList1_GetType(This) \ ( (This)->lpVtbl -> GetType(This) ) - #define ID3D12GraphicsCommandList1_Close(This) \ ( (This)->lpVtbl -> Close(This) ) @@ -6532,7 +6292,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList1; #define ID3D12GraphicsCommandList1_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ ( (This)->lpVtbl -> ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) ) - #define ID3D12GraphicsCommandList1_AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ ( (This)->lpVtbl -> AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) @@ -6553,15 +6312,10 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12GraphicsCommandList1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12_0000_0018 */ /* [local] */ @@ -6579,8 +6333,6 @@ enum D3D12_WRITEBUFFERIMMEDIATE_MODE D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2 } D3D12_WRITEBUFFERIMMEDIATE_MODE; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0018_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0018_v0_0_s_ifspec; @@ -6590,7 +6342,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0018_v0_0_s_ifspec; /* interface ID3D12GraphicsCommandList2 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12GraphicsCommandList2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -7017,7 +6768,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList2; #ifdef COBJMACROS - #define ID3D12GraphicsCommandList2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -7027,7 +6777,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList2; #define ID3D12GraphicsCommandList2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12GraphicsCommandList2_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -7040,15 +6789,12 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList2; #define ID3D12GraphicsCommandList2_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12GraphicsCommandList2_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12GraphicsCommandList2_GetType(This) \ ( (This)->lpVtbl -> GetType(This) ) - #define ID3D12GraphicsCommandList2_Close(This) \ ( (This)->lpVtbl -> Close(This) ) @@ -7202,7 +6948,6 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList2; #define ID3D12GraphicsCommandList2_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ ( (This)->lpVtbl -> ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) ) - #define ID3D12GraphicsCommandList2_AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ ( (This)->lpVtbl -> AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) @@ -7221,28 +6966,21 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList2; #define ID3D12GraphicsCommandList2_SetViewInstanceMask(This,Mask) \ ( (This)->lpVtbl -> SetViewInstanceMask(This,Mask) ) - #define ID3D12GraphicsCommandList2_WriteBufferImmediate(This,Count,pParams,pModes) \ ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12GraphicsCommandList2_INTERFACE_DEFINED__ */ - #ifndef __ID3D12CommandQueue_INTERFACE_DEFINED__ #define __ID3D12CommandQueue_INTERFACE_DEFINED__ /* interface ID3D12CommandQueue */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12CommandQueue; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -7426,7 +7164,6 @@ EXTERN_C const IID IID_ID3D12CommandQueue; #ifdef COBJMACROS - #define ID3D12CommandQueue_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -7436,7 +7173,6 @@ EXTERN_C const IID IID_ID3D12CommandQueue; #define ID3D12CommandQueue_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12CommandQueue_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -7449,12 +7185,9 @@ EXTERN_C const IID IID_ID3D12CommandQueue; #define ID3D12CommandQueue_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12CommandQueue_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12CommandQueue_UpdateTileMappings(This,pResource,NumResourceRegions,pResourceRegionStartCoordinates,pResourceRegionSizes,pHeap,NumRanges,pRangeFlags,pHeapRangeStartOffsets,pRangeTileCounts,Flags) \ ( (This)->lpVtbl -> UpdateTileMappings(This,pResource,NumResourceRegions,pResourceRegionStartCoordinates,pResourceRegionSizes,pHeap,NumRanges,pRangeFlags,pHeapRangeStartOffsets,pRangeTileCounts,Flags) ) @@ -7490,19 +7223,10 @@ EXTERN_C const IID IID_ID3D12CommandQueue; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - #endif /* __ID3D12CommandQueue_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12_0000_0020 */ /* [local] */ @@ -7520,7 +7244,6 @@ typedef struct __LUID *PLUID; #endif #endif - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0020_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0020_v0_0_s_ifspec; @@ -7530,7 +7253,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0020_v0_0_s_ifspec; /* interface ID3D12Device */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Device; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -8033,7 +7755,6 @@ EXTERN_C const IID IID_ID3D12Device; #ifdef COBJMACROS - #define ID3D12Device_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -8043,7 +7764,6 @@ EXTERN_C const IID IID_ID3D12Device; #define ID3D12Device_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Device_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -8056,7 +7776,6 @@ EXTERN_C const IID IID_ID3D12Device; #define ID3D12Device_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Device_GetNodeCount(This) \ ( (This)->lpVtbl -> GetNodeCount(This) ) @@ -8170,34 +7889,16 @@ EXTERN_C const IID IID_ID3D12Device; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - - - - - - - - - #endif /* __ID3D12Device_INTERFACE_DEFINED__ */ - #ifndef __ID3D12PipelineLibrary_INTERFACE_DEFINED__ #define __ID3D12PipelineLibrary_INTERFACE_DEFINED__ /* interface ID3D12PipelineLibrary */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12PipelineLibrary; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -8313,7 +8014,6 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary; #ifdef COBJMACROS - #define ID3D12PipelineLibrary_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -8323,7 +8023,6 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary; #define ID3D12PipelineLibrary_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12PipelineLibrary_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -8336,11 +8035,9 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary; #define ID3D12PipelineLibrary_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12PipelineLibrary_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12PipelineLibrary_StorePipeline(This,pName,pPipeline) \ ( (This)->lpVtbl -> StorePipeline(This,pName,pPipeline) ) @@ -8358,22 +8055,16 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12PipelineLibrary_INTERFACE_DEFINED__ */ - #ifndef __ID3D12PipelineLibrary1_INTERFACE_DEFINED__ #define __ID3D12PipelineLibrary1_INTERFACE_DEFINED__ /* interface ID3D12PipelineLibrary1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12PipelineLibrary1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -8480,7 +8171,6 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary1; #ifdef COBJMACROS - #define ID3D12PipelineLibrary1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -8490,7 +8180,6 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary1; #define ID3D12PipelineLibrary1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12PipelineLibrary1_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -8503,11 +8192,9 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary1; #define ID3D12PipelineLibrary1_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12PipelineLibrary1_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12PipelineLibrary1_StorePipeline(This,pName,pPipeline) \ ( (This)->lpVtbl -> StorePipeline(This,pName,pPipeline) ) @@ -8523,21 +8210,15 @@ EXTERN_C const IID IID_ID3D12PipelineLibrary1; #define ID3D12PipelineLibrary1_Serialize(This,pData,DataSizeInBytes) \ ( (This)->lpVtbl -> Serialize(This,pData,DataSizeInBytes) ) - #define ID3D12PipelineLibrary1_LoadPipeline(This,pName,pDesc,riid,ppPipelineState) \ ( (This)->lpVtbl -> LoadPipeline(This,pName,pDesc,riid,ppPipelineState) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12PipelineLibrary1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12_0000_0023 */ /* [local] */ @@ -8560,8 +8241,6 @@ enum D3D12_RESIDENCY_PRIORITY D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000 } D3D12_RESIDENCY_PRIORITY; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0023_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0023_v0_0_s_ifspec; @@ -8571,7 +8250,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0023_v0_0_s_ifspec; /* interface ID3D12Device1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Device1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -8911,7 +8589,6 @@ EXTERN_C const IID IID_ID3D12Device1; #ifdef COBJMACROS - #define ID3D12Device1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -8921,7 +8598,6 @@ EXTERN_C const IID IID_ID3D12Device1; #define ID3D12Device1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Device1_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -8934,7 +8610,6 @@ EXTERN_C const IID IID_ID3D12Device1; #define ID3D12Device1_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Device1_GetNodeCount(This) \ ( (This)->lpVtbl -> GetNodeCount(This) ) @@ -9046,7 +8721,6 @@ EXTERN_C const IID IID_ID3D12Device1; #define ID3D12Device1_GetAdapterLuid(This) \ ( (This)->lpVtbl -> GetAdapterLuid(This) ) - #define ID3D12Device1_CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) \ ( (This)->lpVtbl -> CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) ) @@ -9058,22 +8732,16 @@ EXTERN_C const IID IID_ID3D12Device1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Device1_INTERFACE_DEFINED__ */ - #ifndef __ID3D12Device2_INTERFACE_DEFINED__ #define __ID3D12Device2_INTERFACE_DEFINED__ /* interface ID3D12Device2 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Device2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -9406,7 +9074,6 @@ EXTERN_C const IID IID_ID3D12Device2; #ifdef COBJMACROS - #define ID3D12Device2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -9416,7 +9083,6 @@ EXTERN_C const IID IID_ID3D12Device2; #define ID3D12Device2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Device2_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -9429,7 +9095,6 @@ EXTERN_C const IID IID_ID3D12Device2; #define ID3D12Device2_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Device2_GetNodeCount(This) \ ( (This)->lpVtbl -> GetNodeCount(This) ) @@ -9541,7 +9206,6 @@ EXTERN_C const IID IID_ID3D12Device2; #define ID3D12Device2_GetAdapterLuid(This) \ ( (This)->lpVtbl -> GetAdapterLuid(This) ) - #define ID3D12Device2_CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) \ ( (This)->lpVtbl -> CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) ) @@ -9551,21 +9215,15 @@ EXTERN_C const IID IID_ID3D12Device2; #define ID3D12Device2_SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) \ ( (This)->lpVtbl -> SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) ) - #define ID3D12Device2_CreatePipelineState(This,pDesc,riid,ppPipelineState) \ ( (This)->lpVtbl -> CreatePipelineState(This,pDesc,riid,ppPipelineState) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Device2_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12_0000_0025 */ /* [local] */ @@ -9578,7 +9236,6 @@ enum D3D12_RESIDENCY_FLAGS DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESIDENCY_FLAGS ); - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0025_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0025_v0_0_s_ifspec; @@ -9588,7 +9245,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0025_v0_0_s_ifspec; /* interface ID3D12Device3 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Device3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -9953,7 +9609,6 @@ EXTERN_C const IID IID_ID3D12Device3; #ifdef COBJMACROS - #define ID3D12Device3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -9963,7 +9618,6 @@ EXTERN_C const IID IID_ID3D12Device3; #define ID3D12Device3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Device3_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -9976,7 +9630,6 @@ EXTERN_C const IID IID_ID3D12Device3; #define ID3D12Device3_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12Device3_GetNodeCount(This) \ ( (This)->lpVtbl -> GetNodeCount(This) ) @@ -10088,7 +9741,6 @@ EXTERN_C const IID IID_ID3D12Device3; #define ID3D12Device3_GetAdapterLuid(This) \ ( (This)->lpVtbl -> GetAdapterLuid(This) ) - #define ID3D12Device3_CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) \ ( (This)->lpVtbl -> CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) ) @@ -10098,11 +9750,9 @@ EXTERN_C const IID IID_ID3D12Device3; #define ID3D12Device3_SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) \ ( (This)->lpVtbl -> SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) ) - #define ID3D12Device3_CreatePipelineState(This,pDesc,riid,ppPipelineState) \ ( (This)->lpVtbl -> CreatePipelineState(This,pDesc,riid,ppPipelineState) ) - #define ID3D12Device3_OpenExistingHeapFromAddress(This,pAddress,riid,ppvHeap) \ ( (This)->lpVtbl -> OpenExistingHeapFromAddress(This,pAddress,riid,ppvHeap) ) @@ -10114,22 +9764,16 @@ EXTERN_C const IID IID_ID3D12Device3; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Device3_INTERFACE_DEFINED__ */ - #ifndef __ID3D12Tools_INTERFACE_DEFINED__ #define __ID3D12Tools_INTERFACE_DEFINED__ /* interface ID3D12Tools */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Tools; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -10182,7 +9826,6 @@ EXTERN_C const IID IID_ID3D12Tools; #ifdef COBJMACROS - #define ID3D12Tools_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -10192,7 +9835,6 @@ EXTERN_C const IID IID_ID3D12Tools; #define ID3D12Tools_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Tools_EnableShaderInstrumentation(This,bEnable) \ ( (This)->lpVtbl -> EnableShaderInstrumentation(This,bEnable) ) @@ -10201,15 +9843,10 @@ EXTERN_C const IID IID_ID3D12Tools; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Tools_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12_0000_0027 */ /* [local] */ @@ -10262,7 +9899,6 @@ HRESULT WINAPI D3D12CreateDevice( _In_ REFIID riid, // Expected: ID3D12Device _COM_Outptr_opt_ void** ppDevice ); - typedef HRESULT (WINAPI* PFN_D3D12_GET_DEBUG_INTERFACE)( _In_ REFIID, _COM_Outptr_opt_ void** ); HRESULT WINAPI D3D12GetDebugInterface( _In_ REFIID riid, _COM_Outptr_opt_ void** ppvDebug ); @@ -10342,7 +9978,6 @@ DEFINE_GUID(IID_ID3D12Device2,0x30baa41e,0xb15b,0x475c,0xa0,0xbb,0x1a,0xf5,0xc5, DEFINE_GUID(IID_ID3D12Device3,0x81dadc15,0x2bad,0x4392,0x93,0xc5,0x10,0x13,0x45,0xc4,0xaa,0x98); DEFINE_GUID(IID_ID3D12Tools,0x7071e1f0,0xe84b,0x4b33,0x97,0x4f,0x12,0xfa,0x49,0xde,0x65,0xc5); - extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0027_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0027_v0_0_s_ifspec; @@ -10355,5 +9990,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0027_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d12sdklayers.h b/gfx/include/dxsdk/d3d12sdklayers.h index 841c3f7b2e..4b807685bc 100644 --- a/gfx/include/dxsdk/d3d12sdklayers.h +++ b/gfx/include/dxsdk/d3d12sdklayers.h @@ -4,14 +4,10 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -49,70 +45,60 @@ typedef interface ID3D12Debug ID3D12Debug; #endif /* __ID3D12Debug_FWD_DEFINED__ */ - #ifndef __ID3D12Debug1_FWD_DEFINED__ #define __ID3D12Debug1_FWD_DEFINED__ typedef interface ID3D12Debug1 ID3D12Debug1; #endif /* __ID3D12Debug1_FWD_DEFINED__ */ - #ifndef __ID3D12Debug2_FWD_DEFINED__ #define __ID3D12Debug2_FWD_DEFINED__ typedef interface ID3D12Debug2 ID3D12Debug2; #endif /* __ID3D12Debug2_FWD_DEFINED__ */ - #ifndef __ID3D12DebugDevice1_FWD_DEFINED__ #define __ID3D12DebugDevice1_FWD_DEFINED__ typedef interface ID3D12DebugDevice1 ID3D12DebugDevice1; #endif /* __ID3D12DebugDevice1_FWD_DEFINED__ */ - #ifndef __ID3D12DebugDevice_FWD_DEFINED__ #define __ID3D12DebugDevice_FWD_DEFINED__ typedef interface ID3D12DebugDevice ID3D12DebugDevice; #endif /* __ID3D12DebugDevice_FWD_DEFINED__ */ - #ifndef __ID3D12DebugCommandQueue_FWD_DEFINED__ #define __ID3D12DebugCommandQueue_FWD_DEFINED__ typedef interface ID3D12DebugCommandQueue ID3D12DebugCommandQueue; #endif /* __ID3D12DebugCommandQueue_FWD_DEFINED__ */ - #ifndef __ID3D12DebugCommandList1_FWD_DEFINED__ #define __ID3D12DebugCommandList1_FWD_DEFINED__ typedef interface ID3D12DebugCommandList1 ID3D12DebugCommandList1; #endif /* __ID3D12DebugCommandList1_FWD_DEFINED__ */ - #ifndef __ID3D12DebugCommandList_FWD_DEFINED__ #define __ID3D12DebugCommandList_FWD_DEFINED__ typedef interface ID3D12DebugCommandList ID3D12DebugCommandList; #endif /* __ID3D12DebugCommandList_FWD_DEFINED__ */ - #ifndef __ID3D12SharingContract_FWD_DEFINED__ #define __ID3D12SharingContract_FWD_DEFINED__ typedef interface ID3D12SharingContract ID3D12SharingContract; #endif /* __ID3D12SharingContract_FWD_DEFINED__ */ - #ifndef __ID3D12InfoQueue_FWD_DEFINED__ #define __ID3D12InfoQueue_FWD_DEFINED__ typedef interface ID3D12InfoQueue ID3D12InfoQueue; #endif /* __ID3D12InfoQueue_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -122,7 +108,6 @@ typedef interface ID3D12InfoQueue ID3D12InfoQueue; extern "C"{ #endif - /* interface __MIDL_itf_d3d12sdklayers_0000_0000 */ /* [local] */ @@ -130,7 +115,6 @@ extern "C"{ /*#pragma region App Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ - extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_s_ifspec; @@ -140,7 +124,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_s_ifspec; /* interface ID3D12Debug */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Debug; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -186,7 +169,6 @@ EXTERN_C const IID IID_ID3D12Debug; #ifdef COBJMACROS - #define ID3D12Debug_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -196,28 +178,21 @@ EXTERN_C const IID IID_ID3D12Debug; #define ID3D12Debug_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Debug_EnableDebugLayer(This) \ ( (This)->lpVtbl -> EnableDebugLayer(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Debug_INTERFACE_DEFINED__ */ - #ifndef __ID3D12Debug1_INTERFACE_DEFINED__ #define __ID3D12Debug1_INTERFACE_DEFINED__ /* interface ID3D12Debug1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Debug1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -277,7 +252,6 @@ EXTERN_C const IID IID_ID3D12Debug1; #ifdef COBJMACROS - #define ID3D12Debug1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -287,7 +261,6 @@ EXTERN_C const IID IID_ID3D12Debug1; #define ID3D12Debug1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Debug1_EnableDebugLayer(This) \ ( (This)->lpVtbl -> EnableDebugLayer(This) ) @@ -299,15 +272,10 @@ EXTERN_C const IID IID_ID3D12Debug1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Debug1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12sdklayers_0000_0002 */ /* [local] */ @@ -320,7 +288,6 @@ enum D3D12_GPU_BASED_VALIDATION_FLAGS DEFINE_ENUM_FLAG_OPERATORS(D3D12_GPU_BASED_VALIDATION_FLAGS) - extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_s_ifspec; @@ -330,7 +297,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_s_ifspec; /* interface ID3D12Debug2 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12Debug2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -378,7 +344,6 @@ EXTERN_C const IID IID_ID3D12Debug2; #ifdef COBJMACROS - #define ID3D12Debug2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -388,21 +353,15 @@ EXTERN_C const IID IID_ID3D12Debug2; #define ID3D12Debug2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12Debug2_SetGPUBasedValidationFlags(This,Flags) \ ( (This)->lpVtbl -> SetGPUBasedValidationFlags(This,Flags) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12Debug2_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12sdklayers_0000_0003 */ /* [local] */ @@ -468,8 +427,6 @@ typedef struct D3D12_DEBUG_DEVICE_GPU_SLOWDOWN_PERFORMANCE_FACTOR FLOAT SlowdownFactor; } D3D12_DEBUG_DEVICE_GPU_SLOWDOWN_PERFORMANCE_FACTOR; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_s_ifspec; @@ -479,7 +436,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_s_ifspec; /* interface ID3D12DebugDevice1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12DebugDevice1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -549,7 +505,6 @@ EXTERN_C const IID IID_ID3D12DebugDevice1; #ifdef COBJMACROS - #define ID3D12DebugDevice1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -559,7 +514,6 @@ EXTERN_C const IID IID_ID3D12DebugDevice1; #define ID3D12DebugDevice1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12DebugDevice1_SetDebugParameter(This,Type,pData,DataSize) \ ( (This)->lpVtbl -> SetDebugParameter(This,Type,pData,DataSize) ) @@ -571,22 +525,16 @@ EXTERN_C const IID IID_ID3D12DebugDevice1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12DebugDevice1_INTERFACE_DEFINED__ */ - #ifndef __ID3D12DebugDevice_INTERFACE_DEFINED__ #define __ID3D12DebugDevice_INTERFACE_DEFINED__ /* interface ID3D12DebugDevice */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12DebugDevice; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -646,7 +594,6 @@ EXTERN_C const IID IID_ID3D12DebugDevice; #ifdef COBJMACROS - #define ID3D12DebugDevice_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -656,7 +603,6 @@ EXTERN_C const IID IID_ID3D12DebugDevice; #define ID3D12DebugDevice_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12DebugDevice_SetFeatureMask(This,Mask) \ ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) @@ -668,21 +614,15 @@ EXTERN_C const IID IID_ID3D12DebugDevice; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12DebugDevice_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12sdklayers_0000_0005 */ /* [local] */ DEFINE_GUID(DXGI_DEBUG_D3D12, 0xcf59a98c, 0xa950, 0x4326, 0x91, 0xef, 0x9b, 0xba, 0xa1, 0x7b, 0xfd, 0x95); - extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_s_ifspec; @@ -692,7 +632,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_s_ifspec; /* interface ID3D12DebugCommandQueue */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12DebugCommandQueue; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -744,7 +683,6 @@ EXTERN_C const IID IID_ID3D12DebugCommandQueue; #ifdef COBJMACROS - #define ID3D12DebugCommandQueue_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -754,21 +692,15 @@ EXTERN_C const IID IID_ID3D12DebugCommandQueue; #define ID3D12DebugCommandQueue_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12DebugCommandQueue_AssertResourceState(This,pResource,Subresource,State) \ ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12sdklayers_0000_0006 */ /* [local] */ @@ -783,8 +715,6 @@ typedef struct D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE ShaderPatchMode; } D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_s_ifspec; @@ -794,7 +724,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_s_ifspec; /* interface ID3D12DebugCommandList1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12DebugCommandList1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -868,7 +797,6 @@ EXTERN_C const IID IID_ID3D12DebugCommandList1; #ifdef COBJMACROS - #define ID3D12DebugCommandList1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -878,7 +806,6 @@ EXTERN_C const IID IID_ID3D12DebugCommandList1; #define ID3D12DebugCommandList1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12DebugCommandList1_AssertResourceState(This,pResource,Subresource,State) \ ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) @@ -890,22 +817,16 @@ EXTERN_C const IID IID_ID3D12DebugCommandList1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12DebugCommandList1_INTERFACE_DEFINED__ */ - #ifndef __ID3D12DebugCommandList_INTERFACE_DEFINED__ #define __ID3D12DebugCommandList_INTERFACE_DEFINED__ /* interface ID3D12DebugCommandList */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12DebugCommandList; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -969,7 +890,6 @@ EXTERN_C const IID IID_ID3D12DebugCommandList; #ifdef COBJMACROS - #define ID3D12DebugCommandList_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -979,7 +899,6 @@ EXTERN_C const IID IID_ID3D12DebugCommandList; #define ID3D12DebugCommandList_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12DebugCommandList_AssertResourceState(This,pResource,Subresource,State) \ ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) @@ -991,22 +910,16 @@ EXTERN_C const IID IID_ID3D12DebugCommandList; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12DebugCommandList_INTERFACE_DEFINED__ */ - #ifndef __ID3D12SharingContract_INTERFACE_DEFINED__ #define __ID3D12SharingContract_INTERFACE_DEFINED__ /* interface ID3D12SharingContract */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12SharingContract; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1065,7 +978,6 @@ EXTERN_C const IID IID_ID3D12SharingContract; #ifdef COBJMACROS - #define ID3D12SharingContract_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1075,7 +987,6 @@ EXTERN_C const IID IID_ID3D12SharingContract; #define ID3D12SharingContract_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12SharingContract_Present(This,pResource,Subresource) \ ( (This)->lpVtbl -> Present(This,pResource,Subresource) ) @@ -1084,15 +995,10 @@ EXTERN_C const IID IID_ID3D12SharingContract; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12SharingContract_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12sdklayers_0000_0009 */ /* [local] */ @@ -2266,7 +2172,6 @@ typedef struct D3D12_INFO_QUEUE_FILTER #define D3D12_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 - extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_s_ifspec; @@ -2276,7 +2181,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_s_ifspec; /* interface ID3D12InfoQueue */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12InfoQueue; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2548,7 +2452,6 @@ EXTERN_C const IID IID_ID3D12InfoQueue; #ifdef COBJMACROS - #define ID3D12InfoQueue_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2558,7 +2461,6 @@ EXTERN_C const IID IID_ID3D12InfoQueue; #define ID3D12InfoQueue_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12InfoQueue_SetMessageCountLimit(This,MessageCountLimit) \ ( (This)->lpVtbl -> SetMessageCountLimit(This,MessageCountLimit) ) @@ -2666,15 +2568,10 @@ EXTERN_C const IID IID_ID3D12InfoQueue; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12InfoQueue_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12sdklayers_0000_0010 */ /* [local] */ @@ -2691,7 +2588,6 @@ DEFINE_GUID(IID_ID3D12DebugCommandList,0x09e0bf36,0x54ac,0x484f,0x88,0x47,0x4b,0 DEFINE_GUID(IID_ID3D12SharingContract,0xa251ff70,0xcdeb,0x49fa,0x9b,0xcf,0x5e,0xbd,0xf4,0xdb,0xac,0xa9); DEFINE_GUID(IID_ID3D12InfoQueue,0x0742a90b,0xc387,0x483f,0xb9,0x46,0x30,0xa7,0xe4,0xe6,0x14,0x58); - extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0010_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0010_v0_0_s_ifspec; @@ -2704,5 +2600,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0010_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3d12shader.h b/gfx/include/dxsdk/d3d12shader.h index fbeb7633d2..8d1bc7c5d0 100644 --- a/gfx/include/dxsdk/d3d12shader.h +++ b/gfx/include/dxsdk/d3d12shader.h @@ -40,7 +40,6 @@ typedef D3D_RESOURCE_RETURN_TYPE D3D12_RESOURCE_RETURN_TYPE; typedef D3D_CBUFFER_TYPE D3D12_CBUFFER_TYPE; - typedef struct _D3D12_SIGNATURE_PARAMETER_DESC { LPCSTR SemanticName; // Name of the semantic @@ -173,7 +172,6 @@ typedef struct _D3D12_SHADER_INPUT_BIND_DESC #define D3D_SHADER_REQUIRES_ROVS 0x00001000 #define D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER 0x00002000 - typedef struct _D3D12_LIBRARY_DESC { LPCSTR Creator; // The name of the originator of the library. @@ -238,7 +236,6 @@ typedef struct _D3D12_PARAMETER_DESC UINT FirstOutComponent; // The first output register component for this parameter. } D3D12_PARAMETER_DESC; - ////////////////////////////////////////////////////////////////////////////// // Interfaces //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -264,7 +261,6 @@ typedef interface ID3D12FunctionReflection *LPD3D12FUNCTIONREFLECTION; typedef interface ID3D12FunctionParameterReflection ID3D12FunctionParameterReflection; typedef interface ID3D12FunctionParameterReflection *LPD3D12FUNCTIONPARAMETERREFLECTION; - // {E913C351-783D-48CA-A1D1-4F306284AD56} interface DECLSPEC_UUID("E913C351-783D-48CA-A1D1-4F306284AD56") ID3D12ShaderReflectionType; DEFINE_GUID(IID_ID3D12ShaderReflectionType, @@ -442,7 +438,6 @@ DECLARE_INTERFACE(ID3D12FunctionParameterReflection) STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_PARAMETER_DESC * pDesc) PURE; }; - ////////////////////////////////////////////////////////////////////////////// // APIs ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -456,4 +451,3 @@ extern "C" { #endif //__cplusplus #endif //__D3D12SHADER_H__ - diff --git a/gfx/include/dxsdk/d3d12video.h b/gfx/include/dxsdk/d3d12video.h index daa4bdd1f7..65a40cf467 100644 --- a/gfx/include/dxsdk/d3d12video.h +++ b/gfx/include/dxsdk/d3d12video.h @@ -4,14 +4,10 @@ * *-------------------------------------------------------------------------------------*/ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -49,42 +45,36 @@ typedef interface ID3D12VideoDecoderHeap ID3D12VideoDecoderHeap; #endif /* __ID3D12VideoDecoderHeap_FWD_DEFINED__ */ - #ifndef __ID3D12VideoDevice_FWD_DEFINED__ #define __ID3D12VideoDevice_FWD_DEFINED__ typedef interface ID3D12VideoDevice ID3D12VideoDevice; #endif /* __ID3D12VideoDevice_FWD_DEFINED__ */ - #ifndef __ID3D12VideoDecoder_FWD_DEFINED__ #define __ID3D12VideoDecoder_FWD_DEFINED__ typedef interface ID3D12VideoDecoder ID3D12VideoDecoder; #endif /* __ID3D12VideoDecoder_FWD_DEFINED__ */ - #ifndef __ID3D12VideoProcessor_FWD_DEFINED__ #define __ID3D12VideoProcessor_FWD_DEFINED__ typedef interface ID3D12VideoProcessor ID3D12VideoProcessor; #endif /* __ID3D12VideoProcessor_FWD_DEFINED__ */ - #ifndef __ID3D12VideoDecodeCommandList_FWD_DEFINED__ #define __ID3D12VideoDecodeCommandList_FWD_DEFINED__ typedef interface ID3D12VideoDecodeCommandList ID3D12VideoDecodeCommandList; #endif /* __ID3D12VideoDecodeCommandList_FWD_DEFINED__ */ - #ifndef __ID3D12VideoProcessCommandList_FWD_DEFINED__ #define __ID3D12VideoProcessCommandList_FWD_DEFINED__ typedef interface ID3D12VideoProcessCommandList ID3D12VideoProcessCommandList; #endif /* __ID3D12VideoProcessCommandList_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -95,7 +85,6 @@ typedef interface ID3D12VideoProcessCommandList ID3D12VideoProcessCommandList; extern "C"{ #endif - /* interface __MIDL_itf_d3d12video_0000_0000 */ /* [local] */ @@ -287,8 +276,6 @@ typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC BOOL EnableStereo; } D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0000_v0_0_s_ifspec; @@ -298,7 +285,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0000_v0_0_s_ifspec; /* interface ID3D12VideoDecoderHeap */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12VideoDecoderHeap; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -370,7 +356,6 @@ EXTERN_C const IID IID_ID3D12VideoDecoderHeap; #ifdef COBJMACROS - #define ID3D12VideoDecoderHeap_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -380,7 +365,6 @@ EXTERN_C const IID IID_ID3D12VideoDecoderHeap; #define ID3D12VideoDecoderHeap_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12VideoDecoderHeap_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -393,37 +377,24 @@ EXTERN_C const IID IID_ID3D12VideoDecoderHeap; #define ID3D12VideoDecoderHeap_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12VideoDecoderHeap_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12VideoDecoderHeap_GetDesc(This) \ ( (This)->lpVtbl -> GetDesc(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - #endif /* __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__ */ - #ifndef __ID3D12VideoDevice_INTERFACE_DEFINED__ #define __ID3D12VideoDevice_INTERFACE_DEFINED__ /* interface ID3D12VideoDevice */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12VideoDevice; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -514,7 +485,6 @@ EXTERN_C const IID IID_ID3D12VideoDevice; #ifdef COBJMACROS - #define ID3D12VideoDevice_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -524,7 +494,6 @@ EXTERN_C const IID IID_ID3D12VideoDevice; #define ID3D12VideoDevice_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12VideoDevice_CheckFeatureSupport(This,FeatureVideo,pFeatureSupportData,FeatureSupportDataSize) \ ( (This)->lpVtbl -> CheckFeatureSupport(This,FeatureVideo,pFeatureSupportData,FeatureSupportDataSize) ) @@ -539,22 +508,16 @@ EXTERN_C const IID IID_ID3D12VideoDevice; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12VideoDevice_INTERFACE_DEFINED__ */ - #ifndef __ID3D12VideoDecoder_INTERFACE_DEFINED__ #define __ID3D12VideoDecoder_INTERFACE_DEFINED__ /* interface ID3D12VideoDecoder */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12VideoDecoder; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -626,7 +589,6 @@ EXTERN_C const IID IID_ID3D12VideoDecoder; #ifdef COBJMACROS - #define ID3D12VideoDecoder_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -636,7 +598,6 @@ EXTERN_C const IID IID_ID3D12VideoDecoder; #define ID3D12VideoDecoder_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12VideoDecoder_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -649,30 +610,18 @@ EXTERN_C const IID IID_ID3D12VideoDecoder; #define ID3D12VideoDecoder_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12VideoDecoder_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12VideoDecoder_GetDesc(This) \ ( (This)->lpVtbl -> GetDesc(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - #endif /* __ID3D12VideoDecoder_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12video_0000_0003 */ /* [local] */ @@ -882,8 +831,6 @@ typedef struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS ConversionArguments; } D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0003_v0_0_s_ifspec; @@ -893,7 +840,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0003_v0_0_s_ifspec; /* interface ID3D12VideoProcessor */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12VideoProcessor; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -984,7 +930,6 @@ EXTERN_C const IID IID_ID3D12VideoProcessor; #ifdef COBJMACROS - #define ID3D12VideoProcessor_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -994,7 +939,6 @@ EXTERN_C const IID IID_ID3D12VideoProcessor; #define ID3D12VideoProcessor_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12VideoProcessor_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -1007,12 +951,9 @@ EXTERN_C const IID IID_ID3D12VideoProcessor; #define ID3D12VideoProcessor_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12VideoProcessor_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - #define ID3D12VideoProcessor_GetNodeMask(This) \ ( (This)->lpVtbl -> GetNodeMask(This) ) @@ -1027,19 +968,10 @@ EXTERN_C const IID IID_ID3D12VideoProcessor; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - - - - - #endif /* __ID3D12VideoProcessor_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12video_0000_0004 */ /* [local] */ @@ -1201,8 +1133,6 @@ typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS D3D12_RECT TargetRectangle; } D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS; - - extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0004_v0_0_s_ifspec; @@ -1212,7 +1142,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0004_v0_0_s_ifspec; /* interface ID3D12VideoDecodeCommandList */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12VideoDecodeCommandList; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1416,7 +1345,6 @@ EXTERN_C const IID IID_ID3D12VideoDecodeCommandList; #ifdef COBJMACROS - #define ID3D12VideoDecodeCommandList_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1426,7 +1354,6 @@ EXTERN_C const IID IID_ID3D12VideoDecodeCommandList; #define ID3D12VideoDecodeCommandList_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12VideoDecodeCommandList_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -1439,15 +1366,12 @@ EXTERN_C const IID IID_ID3D12VideoDecodeCommandList; #define ID3D12VideoDecodeCommandList_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12VideoDecodeCommandList_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12VideoDecodeCommandList_GetType(This) \ ( (This)->lpVtbl -> GetType(This) ) - #define ID3D12VideoDecodeCommandList_Close(This) \ ( (This)->lpVtbl -> Close(This) ) @@ -1492,22 +1416,16 @@ EXTERN_C const IID IID_ID3D12VideoDecodeCommandList; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12VideoDecodeCommandList_INTERFACE_DEFINED__ */ - #ifndef __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__ #define __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__ /* interface ID3D12VideoProcessCommandList */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D12VideoProcessCommandList; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1713,7 +1631,6 @@ EXTERN_C const IID IID_ID3D12VideoProcessCommandList; #ifdef COBJMACROS - #define ID3D12VideoProcessCommandList_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1723,7 +1640,6 @@ EXTERN_C const IID IID_ID3D12VideoProcessCommandList; #define ID3D12VideoProcessCommandList_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D12VideoProcessCommandList_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) @@ -1736,15 +1652,12 @@ EXTERN_C const IID IID_ID3D12VideoProcessCommandList; #define ID3D12VideoProcessCommandList_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) - #define ID3D12VideoProcessCommandList_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - #define ID3D12VideoProcessCommandList_GetType(This) \ ( (This)->lpVtbl -> GetType(This) ) - #define ID3D12VideoProcessCommandList_Close(This) \ ( (This)->lpVtbl -> Close(This) ) @@ -1789,15 +1702,10 @@ EXTERN_C const IID IID_ID3D12VideoProcessCommandList; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3d12video_0000_0006 */ /* [local] */ @@ -1825,7 +1733,6 @@ DEFINE_GUID(IID_ID3D12VideoProcessor,0x304FDB32,0xBEDE,0x410A,0x85,0x45,0x94,0x3 DEFINE_GUID(IID_ID3D12VideoDecodeCommandList,0x3B60536E,0xAD29,0x4E64,0xA2,0x69,0xF8,0x53,0x83,0x7E,0x5E,0x53); DEFINE_GUID(IID_ID3D12VideoProcessCommandList,0xAEB2543A,0x167F,0x4682,0xAC,0xC8,0xD1,0x59,0xED,0x4A,0x62,0x09); - extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0006_v0_0_s_ifspec; @@ -1838,5 +1745,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0006_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3dcommon.h b/gfx/include/dxsdk/d3dcommon.h index 02630c9b02..8cef6d293c 100644 --- a/gfx/include/dxsdk/d3dcommon.h +++ b/gfx/include/dxsdk/d3dcommon.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,14 +41,12 @@ typedef interface ID3D10Blob ID3D10Blob; #endif /* __ID3D10Blob_FWD_DEFINED__ */ - #ifndef __ID3DDestructionNotifier_FWD_DEFINED__ #define __ID3DDestructionNotifier_FWD_DEFINED__ typedef interface ID3DDestructionNotifier ID3DDestructionNotifier; #endif /* __ID3DDestructionNotifier_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -61,7 +55,6 @@ typedef interface ID3DDestructionNotifier ID3DDestructionNotifier; extern "C"{ #endif - /* interface __MIDL_itf_d3dcommon_0000_0000 */ /* [local] */ @@ -351,7 +344,6 @@ typedef struct _D3D_SHADER_MACRO *LPD3D_SHADER_MACRO; DEFINE_GUID(IID_ID3D10Blob, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2); - extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_s_ifspec; @@ -361,7 +353,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_s_ifspec; /* interface ID3D10Blob */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3D10Blob; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -413,7 +404,6 @@ EXTERN_C const IID IID_ID3D10Blob; #ifdef COBJMACROS - #define ID3D10Blob_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -423,7 +413,6 @@ EXTERN_C const IID IID_ID3D10Blob; #define ID3D10Blob_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3D10Blob_GetBufferPointer(This) \ ( (This)->lpVtbl -> GetBufferPointer(This) ) @@ -432,15 +421,10 @@ EXTERN_C const IID IID_ID3D10Blob; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3D10Blob_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3dcommon_0000_0001 */ /* [local] */ @@ -452,8 +436,6 @@ typedef ID3DBlob* LPD3DBLOB; typedef void ( __stdcall *PFN_DESTRUCTION_CALLBACK )( void *pData); - - extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_s_ifspec; @@ -463,7 +445,6 @@ extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_s_ifspec; /* interface ID3DDestructionNotifier */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_ID3DDestructionNotifier; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -531,7 +512,6 @@ EXTERN_C const IID IID_ID3DDestructionNotifier; #ifdef COBJMACROS - #define ID3DDestructionNotifier_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -541,7 +521,6 @@ EXTERN_C const IID IID_ID3DDestructionNotifier; #define ID3DDestructionNotifier_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define ID3DDestructionNotifier_RegisterDestructionCallback(This,callbackFn,pData,pCallbackID) \ ( (This)->lpVtbl -> RegisterDestructionCallback(This,callbackFn,pData,pCallbackID) ) @@ -550,15 +529,10 @@ EXTERN_C const IID IID_ID3DDestructionNotifier; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __ID3DDestructionNotifier_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_d3dcommon_0000_0002 */ /* [local] */ @@ -987,7 +961,6 @@ DEFINE_GUID(WKPDID_CommentStringW,0xd0149dc0,0x90e8,0x4ec8,0x81, 0x44, 0xe9, 0x0 #define D3D_COMPONENT_MASK_Z 4 #define D3D_COMPONENT_MASK_W 8 - extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_s_ifspec; @@ -1000,5 +973,3 @@ extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/d3dcompiler.h b/gfx/include/dxsdk/d3dcompiler.h index 632c3da9cf..3cb367ab19 100644 --- a/gfx/include/dxsdk/d3dcompiler.h +++ b/gfx/include/dxsdk/d3dcompiler.h @@ -14,8 +14,6 @@ // Current name of the DLL shipped in the same SDK as this header. - - #define D3DCOMPILER_DLL_W L"d3dcompiler_47.dll" #define D3DCOMPILER_DLL_A "d3dcompiler_47.dll" @@ -40,7 +38,6 @@ extern "C" { #endif //__cplusplus - /*#pragma region Application Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ @@ -559,7 +556,6 @@ D3DDecompressShaders(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ /*#pragma endregion*/ - /*#pragma region Desktop Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ @@ -578,7 +574,6 @@ D3DDisassemble10Effect(_In_ interface ID3D10Effect *pEffect, /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ /*#pragma endregion*/ - #ifdef __cplusplus } #endif //__cplusplus diff --git a/gfx/include/dxsdk/d3dcsx.h b/gfx/include/dxsdk/d3dcsx.h index bab5bbca30..a12e76aec2 100644 --- a/gfx/include/dxsdk/d3dcsx.h +++ b/gfx/include/dxsdk/d3dcsx.h @@ -20,7 +20,6 @@ // Current name of the DLL shipped in the same SDK as this header. - #define D3DCSX_DLL_W L"d3dcsx_47.dll" #define D3DCSX_DLL_A "d3dcsx_47.dll" @@ -30,16 +29,10 @@ #define D3DCSX_DLL D3DCSX_DLL_A #endif - #ifdef __cplusplus extern "C" { #endif //__cplusplus - - - - - ////////////////////////////////////////////////////////////////////////////// typedef enum D3DX11_SCAN_DATA_TYPE @@ -66,7 +59,6 @@ typedef enum D3DX11_SCAN_DIRECTION D3DX11_SCAN_DIRECTION_BACKWARD, } D3DX11_SCAN_DIRECTION; - ////////////////////////////////////////////////////////////////////////////// // ID3DX11Scan: ////////////////////////////////////////////////////////////////////////////// @@ -127,7 +119,6 @@ DECLARE_INTERFACE_(ID3DX11Scan, IUnknown) ) PURE; }; - //============================================================================= // Creates a scan context // pDevice the device context @@ -141,8 +132,6 @@ HRESULT WINAPI D3DX11CreateScan( UINT MaxScanCount, _Out_ ID3DX11Scan** ppScan ); - - ////////////////////////////////////////////////////////////////////////////// // ID3DX11SegmentedScan: ////////////////////////////////////////////////////////////////////////////// @@ -185,7 +174,6 @@ DECLARE_INTERFACE_(ID3DX11SegmentedScan, IUnknown) ) PURE; }; - //============================================================================= // Creates a segmented scan context // pDevice the device context @@ -197,16 +185,12 @@ HRESULT WINAPI D3DX11CreateSegmentedScan( UINT MaxElementScanSize, _Out_ ID3DX11SegmentedScan** ppScan ); - - ////////////////////////////////////////////////////////////////////////////// #define D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS 4 #define D3DX11_FFT_MAX_TEMP_BUFFERS 4 #define D3DX11_FFT_MAX_DIMENSIONS 32 - - ////////////////////////////////////////////////////////////////////////////// // ID3DX11FFT: ////////////////////////////////////////////////////////////////////////////// @@ -272,7 +256,6 @@ DECLARE_INTERFACE_(ID3DX11FFT, IUnknown) _Inout_ ID3D11UnorderedAccessView** ppOutputBuffer ) PURE; }; - ////////////////////////////////////////////////////////////////////////////// // ID3DX11FFT Creation Routines ////////////////////////////////////////////////////////////////////////////// @@ -299,7 +282,6 @@ typedef struct D3DX11_FFT_DESC D3DX11_FFT_DATA_TYPE Type; // type of the elements in spatial domain } D3DX11_FFT_DESC; - //------------------------------------------------------------------------------ // NumTempBufferSizes Number of temporary buffers needed // pTempBufferSizes Minimum sizes (in FLOATs) of temporary buffers @@ -315,13 +297,11 @@ typedef struct D3DX11_FFT_BUFFER_INFO UINT PrecomputeBufferFloatSizes[D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS]; } D3DX11_FFT_BUFFER_INFO; - typedef enum D3DX11_FFT_CREATE_FLAG { D3DX11_FFT_CREATE_FLAG_NO_PRECOMPUTE_BUFFERS = 0x01L, // do not precompute values and store into buffers } D3DX11_FFT_CREATE_FLAG; - //------------------------------------------------------------------------------ // Creates an ID3DX11FFT COM interface object and returns a pointer to it at *ppFFT. // The descriptor describes the shape of the data as well as the scaling factors @@ -404,7 +384,6 @@ HRESULT WINAPI D3DX11CreateFFT3DComplex( _Out_ ID3DX11FFT** ppFFT ); - #ifdef __cplusplus } #endif //__cplusplus @@ -413,4 +392,3 @@ HRESULT WINAPI D3DX11CreateFFT3DComplex( /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ /*#pragma endregion*/ - diff --git a/gfx/include/dxsdk/d3dx10.h b/gfx/include/dxsdk/d3dx10.h index 5cdcd51d96..3f9699f157 100644 --- a/gfx/include/dxsdk/d3dx10.h +++ b/gfx/include/dxsdk/d3dx10.h @@ -14,7 +14,6 @@ #ifndef __D3DX10_H__ #define __D3DX10_H__ - // Defines #include #include @@ -39,8 +38,6 @@ #endif #endif - - // Includes #include "d3d10.h" #include "d3dx10.h" @@ -50,7 +47,6 @@ #include "d3dx10mesh.h" #include "d3dx10async.h" - // Errors #define _FACDD 0x876 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) @@ -67,6 +63,4 @@ enum _D3DX10_ERR { D3DX10_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), }; - #endif //__D3DX10_H__ - diff --git a/gfx/include/dxsdk/d3dx10async.h b/gfx/include/dxsdk/d3dx10async.h index d1b1fc53b5..b36841214c 100644 --- a/gfx/include/dxsdk/d3dx10async.h +++ b/gfx/include/dxsdk/d3dx10async.h @@ -17,7 +17,6 @@ extern "C" { #endif //__cplusplus - //---------------------------------------------------------------------------- // D3DX10Compile: // ------------------ @@ -157,7 +156,6 @@ HRESULT WINAPI D3DX10CompileFromMemory(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCST // the asynchronous execution completes. //---------------------------------------------------------------------------- - HRESULT WINAPI D3DX10CreateEffectFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO *pDefines, ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult); @@ -178,7 +176,6 @@ HRESULT WINAPI D3DX10CreateEffectFromResourceW(HMODULE hModule, LPCWSTR pResourc ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice, ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult); - #ifdef UNICODE #define D3DX10CreateEffectFromFile D3DX10CreateEffectFromFileW #define D3DX10CreateEffectFromResource D3DX10CreateEffectFromResourceW @@ -257,8 +254,6 @@ HRESULT WINAPI D3DX10CreateAsyncEffectPoolCreateProcessor(LPCSTR pFileName, CONS HRESULT WINAPI D3DX10CreateAsyncShaderPreprocessProcessor(LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, ID3D10Blob** ppShaderText, ID3D10Blob **ppErrorBuffer, ID3DX10DataProcessor **ppProcessor); - - //---------------------------------------------------------------------------- // D3DX10 Asynchronous texture I/O (advanced mode) //---------------------------------------------------------------------------- @@ -286,5 +281,3 @@ HRESULT WINAPI D3DX10CreateAsyncShaderResourceViewProcessor(ID3D10Device *pDevic #endif //__cplusplus #endif //__D3DX10ASYNC_H__ - - diff --git a/gfx/include/dxsdk/d3dx10core.h b/gfx/include/dxsdk/d3dx10core.h index 290a00421e..155424c841 100644 --- a/gfx/include/dxsdk/d3dx10core.h +++ b/gfx/include/dxsdk/d3dx10core.h @@ -14,7 +14,6 @@ // Current name of the DLL shipped in the same SDK as this header. - #define D3DX10_DLL_W L"d3dx10_43.dll" #define D3DX10_DLL_A "d3dx10_43.dll" @@ -38,10 +37,8 @@ extern "C" { // D3DX10CreateVersion will return FALSE. (The number itself has no meaning.) /////////////////////////////////////////////////////////////////////////// - #define D3DX10_SDK_VERSION 43 - /////////////////////////////////////////////////////////////////////////// // D3DX10CreateDevice // D3DX10CreateDeviceAndSwapChain @@ -64,7 +61,6 @@ HRESULT WINAPI D3DX10CreateDeviceAndSwapChain(IDXGIAdapter *pAdapter, typedef interface ID3D10Device1 ID3D10Device1; HRESULT WINAPI D3DX10GetFeatureLevel1(ID3D10Device *pDevice, ID3D10Device1 **ppDevice1); - #ifdef D3D_DIAG_DLL BOOL WINAPI D3DX10DebugMute(BOOL Mute); #endif @@ -74,7 +70,6 @@ HRESULT WINAPI D3DX10CheckVersion(UINT D3DSdkVersion, UINT D3DX10SdkVersion); } #endif //__cplusplus - ////////////////////////////////////////////////////////////////////////////// // D3DX10_SPRITE flags: // ----------------- @@ -116,7 +111,6 @@ typedef struct _D3DX10_SPRITE UINT TextureIndex; } D3DX10_SPRITE; - ////////////////////////////////////////////////////////////////////////////// // ID3DX10Sprite: // ------------ @@ -139,12 +133,10 @@ typedef struct _D3DX10_SPRITE typedef interface ID3DX10Sprite ID3DX10Sprite; typedef interface ID3DX10Sprite *LPD3DX10SPRITE; - // {BA0B762D-8D28-43ec-B9DC-2F84443B0614} DEFINE_GUID(IID_ID3DX10Sprite, 0xba0b762d, 0x8d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14); - #undef INTERFACE #define INTERFACE ID3DX10Sprite @@ -172,7 +164,6 @@ DECLARE_INTERFACE_(ID3DX10Sprite, IUnknown) STDMETHOD(GetDevice)(THIS_ ID3D10Device** ppDevice) PURE; }; - #ifdef __cplusplus extern "C" { #endif //__cplusplus @@ -187,7 +178,6 @@ HRESULT WINAPI } #endif //__cplusplus - ////////////////////////////////////////////////////////////////////////////// // ID3DX10ThreadPump: ////////////////////////////////////////////////////////////////////////////// @@ -240,7 +230,6 @@ DECLARE_INTERFACE_(ID3DX10ThreadPump, IUnknown) HRESULT WINAPI D3DX10CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX10ThreadPump **ppThreadPump); - ////////////////////////////////////////////////////////////////////////////// // ID3DX10Font: // ---------- @@ -299,16 +288,13 @@ typedef D3DX10_FONT_DESCA D3DX10_FONT_DESC; typedef LPD3DX10_FONT_DESCA LPD3DX10_FONT_DESC; #endif - typedef interface ID3DX10Font ID3DX10Font; typedef interface ID3DX10Font *LPD3DX10FONT; - // {D79DBB70-5F21-4d36-BBC2-FF525C213CDC} DEFINE_GUID(IID_ID3DX10Font, 0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc); - #undef INTERFACE #define INTERFACE ID3DX10Font @@ -364,12 +350,10 @@ DECLARE_INTERFACE_(ID3DX10Font, IUnknown) #endif #endif - #ifdef __cplusplus extern "C" { #endif //__cplusplus - HRESULT WINAPI D3DX10CreateFontA( ID3D10Device* pDevice, @@ -406,7 +390,6 @@ HRESULT WINAPI #define D3DX10CreateFont D3DX10CreateFontA #endif - HRESULT WINAPI D3DX10CreateFontIndirectA( ID3D10Device* pDevice, @@ -441,4 +424,3 @@ HRESULT WINAPI D3DX10UnsetAllDeviceObjects(ID3D10Device *pDevice); #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) #endif //__D3DX10CORE_H__ - diff --git a/gfx/include/dxsdk/d3dx10math.h b/gfx/include/dxsdk/d3dx10math.h index 84e0141006..8ac1d84d8c 100644 --- a/gfx/include/dxsdk/d3dx10math.h +++ b/gfx/include/dxsdk/d3dx10math.h @@ -62,8 +62,6 @@ typedef struct _D3DMATRIX { #define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0)) #define D3DXToDegree( radian ) ((radian) * (180.0 / D3DX_PI)) - - //=========================================================================== // // 16 bit floating point numbers @@ -105,15 +103,12 @@ protected: WORD value; } D3DXFLOAT16, *LPD3DXFLOAT16; - - //=========================================================================== // // Vectors // //=========================================================================== - //-------------------------- // 2D Vector //-------------------------- @@ -151,14 +146,11 @@ public: BOOL operator == ( CONST D3DXVECTOR2& ) const; BOOL operator != ( CONST D3DXVECTOR2& ) const; - public: #endif //__cplusplus FLOAT x, y; } D3DXVECTOR2, *LPD3DXVECTOR2; - - //-------------------------- // 2D Vector (16 bit) //-------------------------- @@ -186,8 +178,6 @@ public: } D3DXVECTOR2_16F, *LPD3DXVECTOR2_16F; - - //-------------------------- // 3D Vector //-------------------------- @@ -232,8 +222,6 @@ public: typedef struct _D3DVECTOR D3DXVECTOR3, *LPD3DXVECTOR3; #endif //!__cplusplus - - //-------------------------- // 3D Vector (16 bit) //-------------------------- @@ -261,8 +249,6 @@ public: } D3DXVECTOR3_16F, *LPD3DXVECTOR3_16F; - - //-------------------------- // 4D Vector //-------------------------- @@ -306,7 +292,6 @@ public: FLOAT x, y, z, w; } D3DXVECTOR4, *LPD3DXVECTOR4; - //-------------------------- // 4D Vector (16 bit) //-------------------------- @@ -334,8 +319,6 @@ public: } D3DXVECTOR4_16F, *LPD3DXVECTOR4_16F; - - //=========================================================================== // // Matrices @@ -354,7 +337,6 @@ public: FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); - // access grants FLOAT& operator () ( UINT Row, UINT Col ); FLOAT operator () ( UINT Row, UINT Col ) const; @@ -392,7 +374,6 @@ public: typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX; #endif //!__cplusplus - //--------------------------------------------------------------------------- // Aligned Matrices // @@ -438,8 +419,6 @@ typedef struct _D3DXMATRIXA16 : public D3DXMATRIX typedef D3DXMATRIX _D3DXMATRIXA16; #endif //!__cplusplus - - #if _MSC_VER >= 1300 // VC7 #define D3DX_ALIGN16 __declspec(align(16)) #else @@ -448,8 +427,6 @@ typedef D3DXMATRIX _D3DXMATRIXA16; typedef D3DX_ALIGN16 _D3DXMATRIXA16 D3DXMATRIXA16, *LPD3DXMATRIXA16; - - //=========================================================================== // // Quaternions @@ -495,7 +472,6 @@ public: FLOAT x, y, z, w; } D3DXQUATERNION, *LPD3DXQUATERNION; - //=========================================================================== // // Planes @@ -535,7 +511,6 @@ public: FLOAT a, b, c, d; } D3DXPLANE, *LPD3DXPLANE; - //=========================================================================== // // Colors @@ -583,8 +558,6 @@ public: FLOAT r, g, b, a; } D3DXCOLOR, *LPD3DXCOLOR; - - //=========================================================================== // // D3DX math functions: @@ -618,7 +591,6 @@ FLOAT* WINAPI D3DXFloat16To32Array } #endif - //-------------------------- // 2D Vector //-------------------------- @@ -714,7 +686,6 @@ D3DXVECTOR2* WINAPI D3DXVec2TransformNormalArray } #endif - //-------------------------- // 3D Vector //-------------------------- @@ -828,13 +799,10 @@ D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3D10_VIEWPORT *pViewport, CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n); - #ifdef __cplusplus } #endif - - //-------------------------- // 4D Vector //-------------------------- @@ -913,7 +881,6 @@ D3DXVECTOR4* WINAPI D3DXVec4TransformArray } #endif - //-------------------------- // 4D Matrix //-------------------------- @@ -926,7 +893,6 @@ D3DXMATRIX* D3DXMatrixIdentity BOOL D3DXMatrixIsIdentity ( CONST D3DXMATRIX *pM ); - // non-inline #ifdef __cplusplus extern "C" { @@ -1086,7 +1052,6 @@ D3DXMATRIX* WINAPI D3DXMatrixReflect } #endif - //-------------------------- // Quaternion //-------------------------- @@ -1114,7 +1079,6 @@ BOOL D3DXQuaternionIsIdentity D3DXQUATERNION* D3DXQuaternionConjugate ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); - // non-inline #ifdef __cplusplus extern "C" { @@ -1192,7 +1156,6 @@ D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric } #endif - //-------------------------- // Plane //-------------------------- @@ -1252,7 +1215,6 @@ D3DXPLANE* WINAPI D3DXPlaneTransformArray } #endif - //-------------------------- // Color //-------------------------- @@ -1298,9 +1260,6 @@ D3DXCOLOR* WINAPI D3DXColorAdjustContrast } #endif - - - //-------------------------- // Misc //-------------------------- @@ -1318,8 +1277,6 @@ FLOAT WINAPI D3DXFresnelTerm } #endif - - //=========================================================================== // // Matrix Stack @@ -1333,7 +1290,6 @@ typedef interface ID3DXMatrixStack *LPD3DXMATRIXSTACK; DEFINE_GUID(IID_ID3DXMatrixStack, 0xc7885ba7, 0xf990, 0x4fe7, 0x92, 0x2d, 0x85, 0x15, 0xe4, 0x77, 0xdd, 0x85); - #undef INTERFACE #define INTERFACE ID3DXMatrixStack @@ -1510,7 +1466,6 @@ FLOAT* WINAPI D3DXSHRotate // //============================================================================ - FLOAT* WINAPI D3DXSHRotateZ ( FLOAT *pOut, UINT Order, FLOAT Angle, CONST FLOAT *pIn ); @@ -1607,7 +1562,6 @@ __out_ecount(16) FLOAT* WINAPI D3DXSHMultiply4(__out_ecount(16) FLOAT *pOut,__in __out_ecount(25) FLOAT* WINAPI D3DXSHMultiply5(__out_ecount(25) FLOAT *pOut,__in_ecount(25) CONST FLOAT *pF,__in_ecount(25) CONST FLOAT *pG); __out_ecount(36) FLOAT* WINAPI D3DXSHMultiply6(__out_ecount(36) FLOAT *pOut,__in_ecount(36) CONST FLOAT *pF,__in_ecount(36) CONST FLOAT *pG); - //============================================================================ // // Basic Spherical Harmonic lighting routines @@ -1811,7 +1765,6 @@ HRESULT WINAPI D3DXVECTOR3 *pMin, D3DXVECTOR3 *pMax); - /////////////////////////////////////////////////////////////////////////// // CPU Optimization: /////////////////////////////////////////////////////////////////////////// @@ -1825,7 +1778,6 @@ HRESULT WINAPI // D3DX_SSE2_OPTIMIZED Use Intel Pentium IV SSE2 optimizations //------------------------------------------------------------------------- - typedef enum _D3DX_CPU_OPTIMIZATION { D3DX_NOT_OPTIMIZED = 0, @@ -1834,7 +1786,6 @@ typedef enum _D3DX_CPU_OPTIMIZATION D3DX_SSE_OPTIMIZED } D3DX_CPU_OPTIMIZATION; - //------------------------------------------------------------------------- // D3DXCpuOptimizations: // --------------------- @@ -1853,7 +1804,6 @@ D3DX_CPU_OPTIMIZATION WINAPI } #endif - #include "d3dx10math.inl" #if _MSC_VER >= 1200 @@ -1863,4 +1813,3 @@ D3DX_CPU_OPTIMIZATION WINAPI #endif #endif // __D3DX9MATH_H__ - diff --git a/gfx/include/dxsdk/d3dx10math.inl b/gfx/include/dxsdk/d3dx10math.inl index 56f11638ef..34dff2f12b 100644 --- a/gfx/include/dxsdk/d3dx10math.inl +++ b/gfx/include/dxsdk/d3dx10math.inl @@ -2225,4 +2225,3 @@ D3DX10INLINE D3DXCOLOR* D3DXColorLerp #endif // __D3DXMATH_INL__ - diff --git a/gfx/include/dxsdk/d3dx10mesh.h b/gfx/include/dxsdk/d3dx10mesh.h index e5fed8fc93..2e2ff2e94f 100644 --- a/gfx/include/dxsdk/d3dx10mesh.h +++ b/gfx/include/dxsdk/d3dx10mesh.h @@ -36,7 +36,6 @@ DEFINE_GUID(IID_ID3DX10SPMesh, DEFINE_GUID(IID_ID3DX10PatchMesh, 0x3ce6cc22, 0xdbf2, 0x44f4, 0x89, 0x4d, 0xf9, 0xc3, 0x4a, 0x33, 0x71, 0x39); - // Mesh options - lower 3 bytes only, upper byte used by _D3DX10MESHOPT option flags enum _D3DX10_MESH { D3DX10_MESH_32_BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. @@ -166,7 +165,6 @@ DECLARE_INTERFACE_(ID3DX10Mesh, IUnknown) STDMETHOD(GetDeviceIndexBuffer)(THIS_ ID3D10Buffer **ppIndexBuffer) PURE; }; - // Flat API #ifdef __cplusplus extern "C" { @@ -187,7 +185,6 @@ HRESULT WINAPI } #endif //__cplusplus - // ID3DX10Mesh::Optimize options - upper byte only, lower 3 bytes used from _D3DX10MESH option flags enum _D3DX10_MESHOPT { D3DX10_MESHOPT_COMPACT = 0x01000000, @@ -202,7 +199,6 @@ enum _D3DX10_MESHOPT { }; - ////////////////////////////////////////////////////////////////////////// // ID3DXSkinInfo ////////////////////////////////////////////////////////////////////////// @@ -282,5 +278,3 @@ typedef struct _D3DX10_ATTRIBUTE_WEIGHTS } D3DX10_ATTRIBUTE_WEIGHTS, *LPD3DX10_ATTRIBUTE_WEIGHTS; #endif //__D3DX10MESH_H__ - - diff --git a/gfx/include/dxsdk/d3dx10tex.h b/gfx/include/dxsdk/d3dx10tex.h index a6d8bb958b..5c28fc8587 100644 --- a/gfx/include/dxsdk/d3dx10tex.h +++ b/gfx/include/dxsdk/d3dx10tex.h @@ -12,7 +12,6 @@ #ifndef __D3DX10TEX_H__ #define __D3DX10TEX_H__ - //---------------------------------------------------------------------------- // D3DX10_FILTER flags: // ------------------ @@ -144,8 +143,6 @@ typedef enum D3DX10_CHANNEL_FLAG D3DX10_CHANNEL_LUMINANCE = (1 << 4), } D3DX10_CHANNEL_FLAG; - - //---------------------------------------------------------------------------- // D3DX10_IMAGE_FILE_FORMAT: // --------------------- @@ -166,7 +163,6 @@ typedef enum D3DX10_IMAGE_FILE_FORMAT } D3DX10_IMAGE_FILE_FORMAT; - //---------------------------------------------------------------------------- // D3DX10_SAVE_TEXTURE_FLAG: // --------------------- @@ -179,8 +175,6 @@ typedef enum D3DX10_SAVE_TEXTURE_FLAG D3DX10_STF_USEINPUTBLOB = 0x0001, } D3DX10_SAVE_TEXTURE_FLAG; - - //---------------------------------------------------------------------------- // D3DX10_IMAGE_INFO: // --------------- @@ -221,16 +215,10 @@ typedef struct D3DX10_IMAGE_INFO D3DX10_IMAGE_FILE_FORMAT ImageFileFormat; } D3DX10_IMAGE_INFO; - - - - #ifdef __cplusplus extern "C" { #endif //__cplusplus - - ////////////////////////////////////////////////////////////////////////////// // Image File APIs /////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -272,7 +260,6 @@ extern "C" { // populated with source image information //---------------------------------------------------------------------------- - typedef struct D3DX10_IMAGE_LOAD_INFO { UINT Width; @@ -359,7 +346,6 @@ HRESULT WINAPI #define D3DX10GetImageInfoFromFile D3DX10GetImageInfoFromFileA #endif - HRESULT WINAPI D3DX10GetImageInfoFromResourceA( HMODULE hSrcModule, @@ -382,7 +368,6 @@ HRESULT WINAPI #define D3DX10GetImageInfoFromResource D3DX10GetImageInfoFromResourceA #endif - HRESULT WINAPI D3DX10GetImageInfoFromMemory( LPCVOID pSrcData, @@ -391,7 +376,6 @@ HRESULT WINAPI D3DX10_IMAGE_INFO* pSrcInfo, HRESULT* pHResult); - ////////////////////////////////////////////////////////////////////////////// // Create/Save Texture APIs ////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -433,7 +417,6 @@ HRESULT WINAPI // //---------------------------------------------------------------------------- - // FromFile HRESULT WINAPI @@ -484,7 +467,6 @@ HRESULT WINAPI #define D3DX10CreateTextureFromFile D3DX10CreateTextureFromFileA #endif - // FromResource (resources in dll/exes) HRESULT WINAPI @@ -539,7 +521,6 @@ HRESULT WINAPI #define D3DX10CreateTextureFromResource D3DX10CreateTextureFromResourceA #endif - // FromFileInMemory HRESULT WINAPI @@ -562,7 +543,6 @@ HRESULT WINAPI ID3D10Resource** ppTexture, HRESULT* pHResult); - ////////////////////////////////////////////////////////////////////////////// // Misc Texture APIs ///////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -604,7 +584,6 @@ typedef struct _D3DX10_TEXTURE_LOAD_INFO } D3DX10_TEXTURE_LOAD_INFO; - //---------------------------------------------------------------------------- // D3DX10LoadTextureFromTexture: // ---------------------------- @@ -614,14 +593,12 @@ typedef struct _D3DX10_TEXTURE_LOAD_INFO // //---------------------------------------------------------------------------- - HRESULT WINAPI D3DX10LoadTextureFromTexture( ID3D10Resource *pSrcTexture, D3DX10_TEXTURE_LOAD_INFO *pLoadInfo, ID3D10Resource *pDstTexture); - //---------------------------------------------------------------------------- // D3DX10FilterTexture: // ------------------ @@ -644,7 +621,6 @@ HRESULT WINAPI UINT SrcLevel, UINT MipFilter); - //---------------------------------------------------------------------------- // D3DX10SaveTextureToFile: // ---------------------- @@ -678,7 +654,6 @@ HRESULT WINAPI #define D3DX10SaveTextureToFile D3DX10SaveTextureToFileA #endif - //---------------------------------------------------------------------------- // D3DX10SaveTextureToMemory: // ---------------------- @@ -702,7 +677,6 @@ HRESULT WINAPI LPD3D10BLOB* ppDestBuf, UINT Flags); - //---------------------------------------------------------------------------- // D3DX10ComputeNormalMap: // --------------------- @@ -730,7 +704,6 @@ HRESULT WINAPI FLOAT Amplitude, ID3D10Texture2D *pDestTexture); - //---------------------------------------------------------------------------- // D3DX10SHProjectCubeMap: // ---------------------- @@ -763,4 +736,3 @@ HRESULT WINAPI #endif //__cplusplus #endif //__D3DX10TEX_H__ - diff --git a/gfx/include/dxsdk/d3dx11.h b/gfx/include/dxsdk/d3dx11.h index 103c782f17..0dd7bc0df1 100644 --- a/gfx/include/dxsdk/d3dx11.h +++ b/gfx/include/dxsdk/d3dx11.h @@ -14,7 +14,6 @@ #ifndef __D3DX11_H__ #define __D3DX11_H__ - // Defines #include #include @@ -43,8 +42,6 @@ #endif #endif - - // Includes #include "d3d11.h" #include "d3dx11.h" @@ -52,7 +49,6 @@ #include "d3dx11tex.h" #include "d3dx11async.h" - // Errors #define _FACDD 0x876 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) @@ -69,6 +65,4 @@ enum _D3DX11_ERR { D3DX11_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), }; - #endif //__D3DX11_H__ - diff --git a/gfx/include/dxsdk/d3dx11async.h b/gfx/include/dxsdk/d3dx11async.h index 4586c55ecd..f925f8d045 100644 --- a/gfx/include/dxsdk/d3dx11async.h +++ b/gfx/include/dxsdk/d3dx11async.h @@ -17,7 +17,6 @@ extern "C" { #endif //__cplusplus - //---------------------------------------------------------------------------- // D3DX11Compile: // ------------------ @@ -160,5 +159,3 @@ HRESULT WINAPI D3DX11CreateAsyncShaderResourceViewProcessor(ID3D11Device *pDevic #endif //__cplusplus #endif //__D3DX11ASYNC_H__ - - diff --git a/gfx/include/dxsdk/d3dx11core.h b/gfx/include/dxsdk/d3dx11core.h index 18e99351e0..bbb26b94d2 100644 --- a/gfx/include/dxsdk/d3dx11core.h +++ b/gfx/include/dxsdk/d3dx11core.h @@ -14,7 +14,6 @@ // Current name of the DLL shipped in the same SDK as this header. - #define D3DX11_DLL_W L"d3dx11_43.dll" #define D3DX11_DLL_A "d3dx11_43.dll" @@ -38,10 +37,8 @@ extern "C" { // D3DX11CreateVersion will return FALSE. (The number itself has no meaning.) /////////////////////////////////////////////////////////////////////////// - #define D3DX11_SDK_VERSION 43 - #ifdef D3D_DIAG_DLL BOOL WINAPI D3DX11DebugMute(BOOL Mute); #endif @@ -51,8 +48,6 @@ HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion); } #endif //__cplusplus - - ////////////////////////////////////////////////////////////////////////////// // ID3DX11ThreadPump: ////////////////////////////////////////////////////////////////////////////// @@ -125,4 +120,3 @@ HRESULT WINAPI D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext *pContext); #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540) #endif //__D3DX11CORE_H__ - diff --git a/gfx/include/dxsdk/d3dx11tex.h b/gfx/include/dxsdk/d3dx11tex.h index 16c0409136..e0a7334e95 100644 --- a/gfx/include/dxsdk/d3dx11tex.h +++ b/gfx/include/dxsdk/d3dx11tex.h @@ -12,7 +12,6 @@ #ifndef __D3DX11TEX_H__ #define __D3DX11TEX_H__ - //---------------------------------------------------------------------------- // D3DX11_FILTER flags: // ------------------ @@ -144,8 +143,6 @@ typedef enum D3DX11_CHANNEL_FLAG D3DX11_CHANNEL_LUMINANCE = (1 << 4), } D3DX11_CHANNEL_FLAG; - - //---------------------------------------------------------------------------- // D3DX11_IMAGE_FILE_FORMAT: // --------------------- @@ -166,7 +163,6 @@ typedef enum D3DX11_IMAGE_FILE_FORMAT } D3DX11_IMAGE_FILE_FORMAT; - //---------------------------------------------------------------------------- // D3DX11_SAVE_TEXTURE_FLAG: // --------------------- @@ -179,7 +175,6 @@ typedef enum D3DX11_SAVE_TEXTURE_FLAG D3DX11_STF_USEINPUTBLOB = 0x0001, } D3DX11_SAVE_TEXTURE_FLAG; - //---------------------------------------------------------------------------- // D3DX11_IMAGE_INFO: // --------------- @@ -220,16 +215,10 @@ typedef struct D3DX11_IMAGE_INFO D3DX11_IMAGE_FILE_FORMAT ImageFileFormat; } D3DX11_IMAGE_INFO; - - - - #ifdef __cplusplus extern "C" { #endif //__cplusplus - - ////////////////////////////////////////////////////////////////////////////// // Image File APIs /////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -271,7 +260,6 @@ extern "C" { // populated with source image information //---------------------------------------------------------------------------- - typedef struct D3DX11_IMAGE_LOAD_INFO { UINT Width; @@ -358,7 +346,6 @@ HRESULT WINAPI #define D3DX11GetImageInfoFromFile D3DX11GetImageInfoFromFileA #endif - HRESULT WINAPI D3DX11GetImageInfoFromResourceA( HMODULE hSrcModule, @@ -381,7 +368,6 @@ HRESULT WINAPI #define D3DX11GetImageInfoFromResource D3DX11GetImageInfoFromResourceA #endif - HRESULT WINAPI D3DX11GetImageInfoFromMemory( LPCVOID pSrcData, @@ -390,7 +376,6 @@ HRESULT WINAPI D3DX11_IMAGE_INFO* pSrcInfo, HRESULT* pHResult); - ////////////////////////////////////////////////////////////////////////////// // Create/Save Texture APIs ////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -432,7 +417,6 @@ HRESULT WINAPI // //---------------------------------------------------------------------------- - // FromFile HRESULT WINAPI @@ -483,7 +467,6 @@ HRESULT WINAPI #define D3DX11CreateTextureFromFile D3DX11CreateTextureFromFileA #endif - // FromResource (resources in dll/exes) HRESULT WINAPI @@ -538,7 +521,6 @@ HRESULT WINAPI #define D3DX11CreateTextureFromResource D3DX11CreateTextureFromResourceA #endif - // FromFileInMemory HRESULT WINAPI @@ -561,7 +543,6 @@ HRESULT WINAPI ID3D11Resource** ppTexture, HRESULT* pHResult); - ////////////////////////////////////////////////////////////////////////////// // Misc Texture APIs ///////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -603,7 +584,6 @@ typedef struct _D3DX11_TEXTURE_LOAD_INFO } D3DX11_TEXTURE_LOAD_INFO; - //---------------------------------------------------------------------------- // D3DX11LoadTextureFromTexture: // ---------------------------- @@ -613,7 +593,6 @@ typedef struct _D3DX11_TEXTURE_LOAD_INFO // //---------------------------------------------------------------------------- - HRESULT WINAPI D3DX11LoadTextureFromTexture( ID3D11DeviceContext *pContext, @@ -621,7 +600,6 @@ HRESULT WINAPI D3DX11_TEXTURE_LOAD_INFO *pLoadInfo, ID3D11Resource *pDstTexture); - //---------------------------------------------------------------------------- // D3DX11FilterTexture: // ------------------ @@ -645,7 +623,6 @@ HRESULT WINAPI UINT SrcLevel, UINT MipFilter); - //---------------------------------------------------------------------------- // D3DX11SaveTextureToFile: // ---------------------- @@ -681,7 +658,6 @@ HRESULT WINAPI #define D3DX11SaveTextureToFile D3DX11SaveTextureToFileA #endif - //---------------------------------------------------------------------------- // D3DX11SaveTextureToMemory: // ---------------------- @@ -706,7 +682,6 @@ HRESULT WINAPI ID3D10Blob** ppDestBuf, UINT Flags); - //---------------------------------------------------------------------------- // D3DX11ComputeNormalMap: // --------------------- @@ -735,7 +710,6 @@ HRESULT WINAPI FLOAT Amplitude, ID3D11Texture2D *pDestTexture); - //---------------------------------------------------------------------------- // D3DX11SHProjectCubeMap: // ---------------------- @@ -769,4 +743,3 @@ HRESULT WINAPI #endif //__cplusplus #endif //__D3DX11TEX_H__ - diff --git a/gfx/include/dxsdk/dcommon.h b/gfx/include/dxsdk/dcommon.h index 543dab13f4..70774522d7 100644 --- a/gfx/include/dxsdk/dcommon.h +++ b/gfx/include/dxsdk/dcommon.h @@ -191,7 +191,6 @@ typedef struct D2D_VECTOR_2F } D2D_VECTOR_2F; - /// /// A vector of 3 FLOAT values (x, y, z). /// @@ -203,7 +202,6 @@ typedef struct D2D_VECTOR_3F } D2D_VECTOR_3F; - /// /// A vector of 4 FLOAT values (x, y, z, w). /// @@ -216,7 +214,6 @@ typedef struct D2D_VECTOR_4F } D2D_VECTOR_4F; - /// /// Represents a rectangle defined by the coordinates of the upper-left corner /// (left, top) and the coordinates of the lower-right corner (right, bottom). @@ -230,7 +227,6 @@ typedef struct D2D_RECT_F } D2D_RECT_F; - /// /// Represents a rectangle defined by the coordinates of the upper-left corner /// (left, top) and the coordinates of the lower-right corner (right, bottom). @@ -256,7 +252,6 @@ typedef struct D2D_SIZE_F } D2D_SIZE_F; - /// /// Stores an ordered pair of integers, typically the width and height of a /// rectangle. @@ -268,7 +263,6 @@ typedef struct D2D_SIZE_U } D2D_SIZE_U; - /// /// Represents a 3-by-2 matrix. /// @@ -321,8 +315,6 @@ typedef struct D2D_MATRIX_3X2_F } D2D_MATRIX_3X2_F; - - /// /// Represents a 4-by-3 matrix. /// @@ -343,7 +335,6 @@ typedef struct D2D_MATRIX_4X3_F } D2D_MATRIX_4X3_F; - /// /// Represents a 4-by-4 matrix. /// @@ -364,7 +355,6 @@ typedef struct D2D_MATRIX_4X4_F } D2D_MATRIX_4X4_F; - /// /// Represents a 5-by-4 matrix. /// @@ -386,7 +376,6 @@ typedef struct D2D_MATRIX_5X4_F } D2D_MATRIX_5X4_F; - typedef D2D_POINT_2F D2D1_POINT_2F; typedef D2D_POINT_2U D2D1_POINT_2U; typedef D2D_POINT_2L D2D1_POINT_2L; @@ -397,7 +386,6 @@ typedef D2D_SIZE_F D2D1_SIZE_F; typedef D2D_SIZE_U D2D1_SIZE_U; typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F; - #pragma warning(pop) #endif /* DCOMMON_H_INCLUDED */ diff --git a/gfx/include/dxsdk/dsconf.h b/gfx/include/dxsdk/dsconf.h index 25a321a9f7..d1e31fa930 100644 --- a/gfx/include/dxsdk/dsconf.h +++ b/gfx/include/dxsdk/dsconf.h @@ -14,7 +14,6 @@ /*#pragma region Desktop Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ - #ifndef __DSOUND_INCLUDED__ #error dsound.h not included #endif // __DSOUND_INCLUDED__ @@ -23,11 +22,9 @@ extern "C" { #endif // __cplusplus - // DirectSound Configuration Component GUID {11AB3EC0-25EC-11d1-A4D8-00C04FC28ACA} DEFINE_GUID(CLSID_DirectSoundPrivate, 0x11ab3ec0, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); - // // DirectSound Device Properties {84624F82-25EC-11d1-A4D8-00C04FC28ACA} // @@ -75,7 +72,6 @@ typedef enum DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE } DIRECTSOUNDDEVICE_DATAFLOW; - typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA { LPSTR DeviceName; // waveIn/waveOut device name @@ -191,14 +187,11 @@ typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA #endif // DIRECTSOUND_VERSION >= 0x0700 - #ifdef __cplusplus } #endif // __cplusplus - /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ /*#pragma endregion*/ #endif // __DSCONF_INCLUDED__ - diff --git a/gfx/include/dxsdk/dsetup.h b/gfx/include/dxsdk/dsetup.h index ebada13fd3..8cd464e811 100644 --- a/gfx/include/dxsdk/dsetup.h +++ b/gfx/include/dxsdk/dsetup.h @@ -60,8 +60,6 @@ extern "C" { #define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */ #define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */ - - //****************************************************************** // DirectX Setup Callback mechanism //****************************************************************** @@ -74,11 +72,6 @@ extern "C" { #define DSETUP_CB_MSG_PROGRESS 18 #define DSETUP_CB_MSG_WARNING_DISABLED_COMPONENT 19 - - - - - typedef struct _DSETUP_CB_PROGRESS { DWORD dwPhase; @@ -97,7 +90,6 @@ enum _DSETUP_CB_PROGRESS_PHASE DSETUP_FINALIZING }; - #ifdef _WIN32 // // Data Structures @@ -169,7 +161,6 @@ typedef PDIRECTXREGISTERAPP2A PDIRECTXREGISTERAPP2; typedef LPDIRECTXREGISTERAPP2A LPDIRECTXREGISTERAPP2; #endif // UNICODE - // // API // @@ -275,7 +266,6 @@ typedef UINT (WINAPI * LPDIRECTXSETUPGETEULA)(LPSTR, UINT, WORD); #endif // WIN32 - #ifdef __cplusplus }; #endif diff --git a/gfx/include/dxsdk/dwrite.h b/gfx/include/dxsdk/dwrite.h index 22b18b9568..ea887fdbf3 100644 --- a/gfx/include/dxsdk/dwrite.h +++ b/gfx/include/dxsdk/dwrite.h @@ -464,7 +464,6 @@ enum DWRITE_INFORMATIONAL_STRING_ID DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME = DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME, }; - /// /// The DWRITE_FONT_METRICS structure specifies the metrics of a font face that /// are applicable to all glyphs within the font face. @@ -1295,7 +1294,6 @@ interface DWRITE_DECLARE_INTERFACE("5f49804d-7024-4d43-bfa9-d25984f53849") IDWri ) PURE; }; - interface IDWriteFactory; interface IDWriteFontFileEnumerator; @@ -2036,7 +2034,6 @@ struct DWRITE_TRIMMING UINT32 delimiterCount; }; - interface IDWriteTypography; interface IDWriteInlineObject; @@ -2288,7 +2285,6 @@ interface DWRITE_DECLARE_INTERFACE("9c906818-31d7-4fd3-a151-7c5e225db55a") IDWri ) PURE; }; - /// /// Font typography setting. /// @@ -3257,7 +3253,6 @@ struct DWRITE_LINE_METRICS BOOL isTrimmed; }; - /// /// The DWRITE_CLUSTER_METRICS structure contains information about a glyph cluster. /// @@ -3301,7 +3296,6 @@ struct DWRITE_CLUSTER_METRICS UINT16 padding : 11; }; - /// /// Overall metrics associated with text after layout. /// All coordinates are in device independent pixels (DIPs). @@ -3365,7 +3359,6 @@ struct DWRITE_TEXT_METRICS UINT32 lineCount; }; - /// /// Properties describing the geometric measurement of an /// application-defined inline object. @@ -3395,7 +3388,6 @@ struct DWRITE_INLINE_OBJECT_METRICS BOOL supportsSideways; }; - /// /// The DWRITE_OVERHANG_METRICS structure holds how much any visible pixels /// (in DIPs) overshoot each side of the layout or inline objects. @@ -3430,7 +3422,6 @@ struct DWRITE_OVERHANG_METRICS FLOAT bottom; }; - /// /// Geometry enclosing of text positions. /// @@ -3482,10 +3473,8 @@ struct DWRITE_HIT_TEST_METRICS BOOL isTrimmed; }; - interface IDWriteTextRenderer; - /// /// The IDWriteInlineObject interface wraps an application defined inline graphic, /// allowing DWrite to query metrics as if it was a glyph inline with the text. @@ -4400,7 +4389,6 @@ interface DWRITE_DECLARE_INTERFACE("53737037-6d14-410b-9bfe-0b182bb70961") IDWri using IDWriteTextFormat::GetLocaleName; }; - /// /// Encapsulates a 32-bit device independent bitmap and device context, which can be used for rendering glyphs. /// @@ -5083,7 +5071,6 @@ interface DWRITE_DECLARE_INTERFACE("b859ee5a-d838-4b5b-a2e8-1adc7d93db48") IDWri }; // interface IDWriteFactory - /// /// Creates a DirectWrite factory object that is used for subsequent creation of individual DirectWrite objects. /// @@ -5117,5 +5104,4 @@ EXTERN_C HRESULT DWRITE_EXPORT DWriteCreateFactory( // DWrite errors have moved to winerror.h - #endif /* DWRITE_H_INCLUDED */ diff --git a/gfx/include/dxsdk/dwrite_1.h b/gfx/include/dxsdk/dwrite_1.h index 301d30dce4..c7bc62e6d0 100644 --- a/gfx/include/dxsdk/dwrite_1.h +++ b/gfx/include/dxsdk/dwrite_1.h @@ -14,8 +14,6 @@ #include - - /// /// The overall kind of family. /// @@ -623,7 +621,6 @@ enum DWRITE_GLYPH_ORIENTATION_ANGLE DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES, }; - struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS { /// @@ -715,7 +712,6 @@ struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS BOOL hasTypographicMetrics; }; - /// /// Metrics for caret placement in a font. /// @@ -740,7 +736,6 @@ struct DWRITE_CARET_METRICS INT16 offset; }; - /// /// Typeface classification values, used for font selection and matching. /// @@ -812,7 +807,6 @@ union DWRITE_PANOSE } symbol; }; - /// /// Range of Unicode codepoints. /// @@ -829,7 +823,6 @@ struct DWRITE_UNICODE_RANGE UINT32 last; }; - /// /// Script-specific properties for caret navigation and justification. /// @@ -937,7 +930,6 @@ struct DWRITE_SCRIPT_PROPERTIES UINT32 reserved : 25; }; - /// /// Justification information per glyph. /// @@ -1007,7 +999,6 @@ struct DWRITE_JUSTIFICATION_OPPORTUNITY UINT32 reserved : 12; }; - interface IDWriteTextAnalysisSource1; interface IDWriteTextAnalysisSink1; interface IDWriteRenderingParams1; @@ -1081,7 +1072,6 @@ interface DWRITE_DECLARE_INTERFACE("30572f99-dac6-41db-a16e-0486307e606a") IDWri using IDWriteFactory::CreateCustomRenderingParams; }; - /// /// The interface that represents an absolute reference to a font face. /// It contains font face type, appropriate file references and face identification data. @@ -1341,7 +1331,6 @@ interface DWRITE_DECLARE_INTERFACE("a71efdb4-9fdb-4838-ad90-cfc3be8c3daf") IDWri using IDWriteFontFace::GetRecommendedRenderingMode; }; - /// /// The IDWriteFont interface represents a physical font in a font collection. /// @@ -1711,7 +1700,6 @@ interface DWRITE_DECLARE_INTERFACE("80DAD800-E21F-4E83-96CE-BFCCE500DB7C") IDWri ) PURE; }; - /// /// The interface implemented by the client to provide needed information to /// the text analyzer, such as the text and associated text properties. @@ -1752,7 +1740,6 @@ interface DWRITE_DECLARE_INTERFACE("639CFAD8-0FB4-4B21-A58A-067920120009") IDWri ) PURE; }; - /// /// The interface implemented by the client to receive the /// output of the text analyzers. @@ -1792,7 +1779,6 @@ interface DWRITE_DECLARE_INTERFACE("B0D941A0-85E7-4D8B-9FD3-5CED9934482A") IDWri ) PURE; }; - /// /// The IDWriteTextLayout1 interface represents a block of text after it has /// been fully analyzed and formatted. diff --git a/gfx/include/dxsdk/dwrite_2.h b/gfx/include/dxsdk/dwrite_2.h index 10a5dd4d57..ffa8dd2d69 100644 --- a/gfx/include/dxsdk/dwrite_2.h +++ b/gfx/include/dxsdk/dwrite_2.h @@ -14,10 +14,8 @@ #include - interface IDWriteFontFallback; - /// /// How to align glyphs to the margin. /// @@ -37,7 +35,6 @@ enum DWRITE_OPTICAL_ALIGNMENT DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS, }; - /// /// Whether to enable grid-fitting of glyph outlines (a.k.a. hinting). /// @@ -59,7 +56,6 @@ enum DWRITE_GRID_FIT_MODE DWRITE_GRID_FIT_MODE_ENABLED }; - /// /// Overall metrics associated with text after layout. /// All coordinates are in device independent pixels (DIPs). @@ -74,7 +70,6 @@ struct DWRITE_TEXT_METRICS1 : DWRITE_TEXT_METRICS FLOAT heightIncludingTrailingWhitespace; }; - /// /// The text renderer interface represents a set of application-defined /// callbacks that perform rendering of text, inline objects, and decorations @@ -243,7 +238,6 @@ interface DWRITE_DECLARE_INTERFACE("D3E0E934-22A0-427E-AAE4-7D9574B59DB1") IDWri using IDWriteTextRenderer::DrawInlineObject; }; - /// /// The format of text used for text layout. /// @@ -325,7 +319,6 @@ interface DWRITE_DECLARE_INTERFACE("5F174B49-0D8B-4CFB-8BCA-F1CCE9D06C67") IDWri ) PURE; }; - /// /// The text layout interface represents a block of text after it has /// been fully analyzed and formatted. @@ -426,7 +419,6 @@ interface DWRITE_DECLARE_INTERFACE("1093C18F-8D5E-43F0-B064-0917311B525E") IDWri ) PURE; }; - /// /// The text analyzer interface represents a set of application-defined /// callbacks that perform rendering of text, inline objects, and decorations @@ -517,7 +509,6 @@ interface DWRITE_DECLARE_INTERFACE("553A9FF3-5693-4DF7-B52B-74806F7F2EB9") IDWri using IDWriteTextAnalyzer1::GetGlyphOrientationTransform; }; - /// /// A font fallback definition used for mapping characters to fonts capable of /// supporting them. @@ -564,7 +555,6 @@ interface DWRITE_DECLARE_INTERFACE("EFA008F9-F7A1-48BF-B05C-F224713CC0FF") IDWri ) PURE; }; - /// /// Builder used to create a font fallback definition by appending a series of /// fallback mappings, followed by a creation call. @@ -971,5 +961,4 @@ interface DWRITE_DECLARE_INTERFACE("0439fc60-ca44-4994-8dee-3a9af7b732ec") IDWri using IDWriteFactory::CreateGlyphRunAnalysis; }; - #endif /* DWRITE_2_H_INCLUDED */ diff --git a/gfx/include/dxsdk/dwrite_3.h b/gfx/include/dxsdk/dwrite_3.h index 45eb6203cb..a1bfa6761e 100644 --- a/gfx/include/dxsdk/dwrite_3.h +++ b/gfx/include/dxsdk/dwrite_3.h @@ -24,7 +24,6 @@ interface IDWriteFontFamily1; interface IDWriteStringList; interface IDWriteFontDownloadQueue; - /// /// A font resource could not be accessed because it was remote. This can happen /// when calling CreateFontFace on a non-local font or trying to measure/draw @@ -218,7 +217,6 @@ enum DWRITE_FONT_PROPERTY_ID DWRITE_FONT_PROPERTY_ID_FACE_NAME = DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FACE_NAME, }; - /// /// Font property used for filtering font sets and /// building a font set with explicit properties. @@ -249,7 +247,6 @@ struct DWRITE_FONT_PROPERTY _Field_z_ _Maybenull_ WCHAR const* localeName; }; - /// /// Specifies the locality of a resource. /// @@ -275,7 +272,6 @@ enum DWRITE_LOCALITY DWRITE_LOCALITY_LOCAL, }; - /// /// Represents a method of rendering glyphs. /// @@ -338,7 +334,6 @@ enum DWRITE_RENDERING_MODE1 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED, }; - /// /// The interface that represents text rendering settings for glyph rasterization and filtering. /// @@ -350,7 +345,6 @@ interface DWRITE_DECLARE_INTERFACE("B7924BAA-391B-412A-8C5C-E44CC2D867DC") IDWri STDMETHOD_(DWRITE_RENDERING_MODE1, GetRenderingMode1)() PURE; }; - /// /// The root factory interface for all DWrite objects. /// @@ -529,7 +523,6 @@ interface DWRITE_DECLARE_INTERFACE("9A1B41C3-D3BB-466A-87FC-FE67556A3B65") IDWri ) PURE; }; - /// /// Set of fonts used for creating font faces, selecting nearest matching fonts, and filtering. /// Unlike IDWriteFontFamily and IDWriteFontList, which are part of the IDWriteFontCollection heirarchy, font sets @@ -714,7 +707,6 @@ interface DWRITE_DECLARE_INTERFACE("53585141-D9F8-4095-8321-D73CF6BD116B") IDWri ) PURE; }; - /// /// Builder interface to add font face references and create a font set. /// @@ -787,7 +779,6 @@ interface DWRITE_DECLARE_INTERFACE("2F642AFE-9C68-4F40-B8BE-457401AFCB3D") IDWri ) PURE; }; - interface DWRITE_DECLARE_INTERFACE("53585141-D9F8-4095-8321-D73CF6BD116C") IDWriteFontCollection1 : public IDWriteFontCollection { /// @@ -817,7 +808,6 @@ interface DWRITE_DECLARE_INTERFACE("53585141-D9F8-4095-8321-D73CF6BD116C") IDWri using IDWriteFontCollection::GetFontFamily; }; - /// /// The IDWriteFontFamily interface represents a set of fonts that share the same design but are differentiated /// by weight, stretch, and style. @@ -870,7 +860,6 @@ interface DWRITE_DECLARE_INTERFACE("DA20D8EF-812A-4C43-9802-62EC4ABD7ADF") IDWri ) PURE; }; - /// /// The IDWriteFontList interface represents a list of fonts. /// @@ -922,7 +911,6 @@ interface DWRITE_DECLARE_INTERFACE("DA20D8EF-812A-4C43-9802-62EC4ABD7ADE") IDWri ) PURE; }; - /// /// A uniquely identifying reference to a font, from which you can create a font /// face to query font metrics and use for rendering. A font face reference @@ -1083,7 +1071,6 @@ interface DWRITE_DECLARE_INTERFACE("5E7FA7CA-DDE3-424C-89F0-9FCD6FED58CD") IDWri ) PURE; }; - /// /// The IDWriteFont interface represents a font in a font collection. /// @@ -1145,7 +1132,6 @@ interface DWRITE_DECLARE_INTERFACE("29748ED6-8C9C-4A6A-BE0B-D912E8538944") IDWri STDMETHOD_(DWRITE_LOCALITY, GetLocality)() PURE; }; - /// /// The interface that represents an absolute reference to a font face. /// It contains font face type, appropriate file references and face identification data. @@ -1344,7 +1330,6 @@ interface DWRITE_DECLARE_INTERFACE("D37D7598-09BE-4222-A236-2081341CC1F2") IDWri ) PURE; }; - /// /// Represents a collection of strings indexed by number. /// An IDWriteStringList is otherwise identical to IDWriteLocalizedStrings except @@ -1420,7 +1405,6 @@ interface DWRITE_DECLARE_INTERFACE("CFEE3140-1157-47CA-8B85-31BFCF3F2D0E") IDWri ) PURE; }; - /// /// Application-defined callback interface that receives notifications from the font /// download queue (IDWriteFontDownloadQueue interface). Callbacks will occur on the @@ -1446,7 +1430,6 @@ interface DWRITE_DECLARE_INTERFACE("B06FE5B9-43EC-4393-881B-DBE4DC72FDA7") IDWri ) PURE; }; - /// /// Interface that enqueues download requests for remote fonts, characters, glyphs, and font fragments. /// Provides methods to asynchronously execute a download, cancel pending downloads, and be notified of @@ -1545,7 +1528,6 @@ interface DWRITE_DECLARE_INTERFACE("B71E6052-5AEA-4FA3-832E-F60D431F7E91") IDWri STDMETHOD_(UINT64, GetGenerationCount)() PURE; }; - /// /// The GDI interop interface provides interoperability with GDI. /// @@ -1784,13 +1766,10 @@ interface DWRITE_DECLARE_INTERFACE("07DDCD52-020E-4DE8-AC33-6C953D83F92D") IDWri using IDWriteTextLayout2::GetLineMetrics; }; - //////////////////////////////////////////////////////////////////////////////////////////////////// - #if NTDDI_VERSION >= NTDDI_WIN10_RS1 - /// /// Represents a color glyph run. The IDWriteFactory4::TranslateColorGlyphRun /// method returns an ordered collection of color glyph runs of varying types @@ -1813,7 +1792,6 @@ struct DWRITE_COLOR_GLYPH_RUN1 : DWRITE_COLOR_GLYPH_RUN DWRITE_MEASURING_MODE measuringMode; }; - /// /// Data for a single glyph from GetGlyphImageData. /// @@ -1868,7 +1846,6 @@ struct DWRITE_GLYPH_IMAGE_DATA D2D1_POINT_2L verticalBottomOrigin; }; - /// /// Enumerator for an ordered collection of color glyph runs. /// @@ -1892,7 +1869,6 @@ interface DWRITE_DECLARE_INTERFACE("7C5F86DA-C7A1-4F05-B8E1-55A179FE5A35") IDWri using IDWriteColorGlyphRunEnumerator::GetCurrentRun; }; - /// /// The interface that represents an absolute reference to a font face. /// It contains font face type, appropriate file references and face identification data. @@ -1958,7 +1934,6 @@ interface DWRITE_DECLARE_INTERFACE("27F2A904-4EB8-441D-9678-0563F53E3E2F") IDWri ) PURE; }; - interface DWRITE_DECLARE_INTERFACE("4B0B5BD3-0797-4549-8AC5-FE915CC53856") IDWriteFactory4 : public IDWriteFactory3 { /// @@ -2038,10 +2013,8 @@ interface DWRITE_DECLARE_INTERFACE("4B0B5BD3-0797-4549-8AC5-FE915CC53856") IDWri #endif // NTDDI_VERSION >= NTDDI_WIN10_RS1 - //////////////////////////////////////////////////////////////////////////////////////////////////// - #if NTDDI_VERSION >= NTDDI_WIN10_RS2 interface DWRITE_DECLARE_INTERFACE("3FF7715F-3CDC-4DC6-9B72-EC5621DCCAFD") IDWriteFontSetBuilder1 : public IDWriteFontSetBuilder @@ -2080,7 +2053,6 @@ interface DWRITE_DECLARE_INTERFACE("CE25F8FD-863B-4D13-9651-C1F88DC73FE2") IDWri STDMETHOD(GetResult)() PURE; }; - /// /// DWRITE_FILE_FRAGMENT represents a range of bytes in a font file. /// @@ -2097,7 +2069,6 @@ struct DWRITE_FILE_FRAGMENT UINT64 fragmentSize; }; - /// /// IDWriteRemoteFontFileStream represents a font file stream parts of which may be /// non-local. Non-local data must be downloaded before it can be accessed using @@ -2174,7 +2145,6 @@ interface DWRITE_DECLARE_INTERFACE("4DB3757A-2C72-4ED9-B2B6-1ABABE1AFF9C") IDWri ) PURE; }; - /// /// Specifies the container format of a font resource. A container format is distinct from /// a font file format (DWRITE_FONT_FILE_TYPE) because the container describes the container @@ -2187,7 +2157,6 @@ enum DWRITE_CONTAINER_TYPE DWRITE_CONTAINER_TYPE_WOFF2 }; - /// /// The IDWriteRemoteFontFileLoader interface represents a font file loader that can access /// remote (i.e., downloadable) fonts. The IDWriteFactory5::CreateHttpFontFileLoader method @@ -2260,7 +2229,6 @@ interface DWRITE_DECLARE_INTERFACE("68648C83-6EDE-46C0-AB46-20083A887FDE") IDWri ) PURE; }; - /// /// The IDWriteInMemoryFontFileLoader interface enables clients to reference /// in-memory fonts without having to implement a custom loader. The @@ -2306,7 +2274,6 @@ interface DWRITE_DECLARE_INTERFACE("DC102F47-A12D-4B1C-822D-9E117E33043F") IDWri STDMETHOD_(UINT32, GetFileCount)() PURE; }; - /// /// The root factory interface for all DWrite objects. /// @@ -2395,13 +2362,10 @@ interface DWRITE_DECLARE_INTERFACE("958DB99A-BE2A-4F09-AF7D-65189803D1D3") IDWri #endif // NTDDI_VERSION >= NTDDI_WIN10_RS2 - //////////////////////////////////////////////////////////////////////////////////////////////////// - #if NTDDI_VERSION >= NTDDI_WIN10_RS3 - interface IDWriteFontResource; interface IDWriteFontFace5; interface IDWriteFontFaceReference1; @@ -2410,13 +2374,11 @@ interface IDWriteFontCollection2; interface IDWriteTextFormat3; interface IDWriteFontSetBuilder2; - /// /// Creates an OpenType tag for a font axis. /// #define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) (static_cast(DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d))) - /// /// Four character identifier for a font axis. /// @@ -2432,7 +2394,6 @@ enum DWRITE_FONT_AXIS_TAG : UINT32 DWRITE_FONT_AXIS_TAG_ITALIC = DWRITE_MAKE_FONT_AXIS_TAG('i','t','a','l'), }; - /// /// Value for a font axis, used when querying and creating font instances. /// @@ -2451,7 +2412,6 @@ struct DWRITE_FONT_AXIS_VALUE FLOAT value; }; - /// /// Minimum and maximum range of a font axis. /// @@ -2473,7 +2433,6 @@ struct DWRITE_FONT_AXIS_RANGE FLOAT maxValue; }; - /// /// How font families are grouped together, used by IDWriteFontCollection. /// @@ -2495,7 +2454,6 @@ enum DWRITE_FONT_FAMILY_MODEL DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE, }; - /// /// Apply certain axes automatically in layout during font selection. /// @@ -2518,7 +2476,6 @@ enum DWRITE_AUTOMATIC_FONT_AXES DEFINE_ENUM_FLAG_OPERATORS(DWRITE_AUTOMATIC_FONT_AXES); #endif - /// /// Attributes for a font axis. /// @@ -2551,7 +2508,6 @@ enum DWRITE_FONT_AXIS_ATTRIBUTES DEFINE_ENUM_FLAG_OPERATORS(DWRITE_FONT_AXIS_ATTRIBUTES); #endif - interface DWRITE_DECLARE_INTERFACE("F3744D80-21F7-42EB-B35D-995BC72FC223") IDWriteFactory6 : public IDWriteFactory5 { /// @@ -2688,7 +2644,6 @@ interface DWRITE_DECLARE_INTERFACE("F3744D80-21F7-42EB-B35D-995BC72FC223") IDWri using IDWriteFactory::CreateTextFormat; }; - interface DWRITE_DECLARE_INTERFACE("98EFF3A5-B667-479A-B145-E2FA5B9FDC29") IDWriteFontFace5 : public IDWriteFontFace4 { /// @@ -2737,7 +2692,6 @@ interface DWRITE_DECLARE_INTERFACE("98EFF3A5-B667-479A-B145-E2FA5B9FDC29") IDWri STDMETHOD_(BOOL, Equals)(IDWriteFontFace* fontFace) PURE; }; - /// /// Interface to return axis information for a font resource and create specific font face instances. /// @@ -2913,7 +2867,6 @@ interface DWRITE_DECLARE_INTERFACE("1F803A76-6871-48E8-987F-B975551C50F2") IDWri ) PURE; }; - interface DWRITE_DECLARE_INTERFACE("C081FE77-2FD1-41AC-A5A3-34983C4BA61A") IDWriteFontFaceReference1 : public IDWriteFontFaceReference { /// @@ -2951,7 +2904,6 @@ interface DWRITE_DECLARE_INTERFACE("C081FE77-2FD1-41AC-A5A3-34983C4BA61A") IDWri ) PURE; }; - interface DWRITE_DECLARE_INTERFACE("EE5BA612-B131-463C-8F4F-3189B9401E45") IDWriteFontSetBuilder2 : public IDWriteFontSetBuilder1 { /// @@ -3001,7 +2953,6 @@ interface DWRITE_DECLARE_INTERFACE("EE5BA612-B131-463C-8F4F-3189B9401E45") IDWri using IDWriteFontSetBuilder1::AddFontFile; }; - interface DWRITE_DECLARE_INTERFACE("7E9FDA85-6C92-4053-BC47-7AE3530DB4D3") IDWriteFontSet1 : public IDWriteFontSet { /// @@ -3229,7 +3180,6 @@ interface DWRITE_DECLARE_INTERFACE("7E9FDA85-6C92-4053-BC47-7AE3530DB4D3") IDWri STDMETHOD_(DWRITE_LOCALITY, GetFontLocality)(UINT32 listIndex) PURE; }; - interface DWRITE_DECLARE_INTERFACE("C0763A34-77AF-445A-B735-08C37B0A5BF5") IDWriteFontList2 : public IDWriteFontList1 { /// @@ -3244,7 +3194,6 @@ interface DWRITE_DECLARE_INTERFACE("C0763A34-77AF-445A-B735-08C37B0A5BF5") IDWri ) PURE; }; - interface DWRITE_DECLARE_INTERFACE("3ED49E77-A398-4261-B9CF-C126C2131EF3") IDWriteFontFamily2 : public IDWriteFontFamily1 { /// @@ -3276,7 +3225,6 @@ interface DWRITE_DECLARE_INTERFACE("3ED49E77-A398-4261-B9CF-C126C2131EF3") IDWri ) PURE; }; - interface DWRITE_DECLARE_INTERFACE("514039C6-4617-4064-BF8B-92EA83E506E0") IDWriteFontCollection2 : public IDWriteFontCollection1 { /// @@ -3336,7 +3284,6 @@ interface DWRITE_DECLARE_INTERFACE("514039C6-4617-4064-BF8B-92EA83E506E0") IDWri ) PURE; }; - interface DWRITE_DECLARE_INTERFACE("05A9BF42-223F-4441-B5FB-8263685F55E9") IDWriteTextLayout4 : public IDWriteTextLayout3 { /// @@ -3393,7 +3340,6 @@ interface DWRITE_DECLARE_INTERFACE("05A9BF42-223F-4441-B5FB-8263685F55E9") IDWri STDMETHOD(SetAutomaticFontAxes)(DWRITE_AUTOMATIC_FONT_AXES automaticFontAxes) PURE; }; - interface DWRITE_DECLARE_INTERFACE("6D3B5641-E550-430D-A85B-B7BF48A93427") IDWriteTextFormat3 : public IDWriteTextFormat2 { /// @@ -3445,7 +3391,6 @@ interface DWRITE_DECLARE_INTERFACE("6D3B5641-E550-430D-A85B-B7BF48A93427") IDWri STDMETHOD(SetAutomaticFontAxes)(DWRITE_AUTOMATIC_FONT_AXES automaticFontAxes) PURE; }; - interface DWRITE_DECLARE_INTERFACE("2397599D-DD0D-4681-BD6A-F4F31EAADE77") IDWriteFontFallback1 : public IDWriteFontFallback { /// diff --git a/gfx/include/dxsdk/dxdiag.h b/gfx/include/dxsdk/dxdiag.h index 82b607c02a..aacd411f95 100644 --- a/gfx/include/dxsdk/dxdiag.h +++ b/gfx/include/dxsdk/dxdiag.h @@ -14,7 +14,6 @@ #pragma region Desktop Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - #include // for DECLARE_INTERFACE_ and HRESULT // This identifier is passed to IDxDiagProvider::Initialize in order to ensure that an @@ -28,7 +27,6 @@ extern "C" { #endif - /**************************************************************************** * * DxDiag Errors @@ -36,7 +34,6 @@ extern "C" { ****************************************************************************/ #define DXDIAG_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) - /**************************************************************************** * * DxDiag CLSIDs @@ -47,7 +44,6 @@ extern "C" { DEFINE_GUID(CLSID_DxDiagProvider, 0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7); - /**************************************************************************** * * DxDiag Interface IIDs @@ -62,7 +58,6 @@ DEFINE_GUID(IID_IDxDiagProvider, DEFINE_GUID(IID_IDxDiagContainer, 0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F); - /**************************************************************************** * * DxDiag Interface Pointer definitions @@ -73,7 +68,6 @@ typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER; typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER; - /**************************************************************************** * * DxDiag Structures @@ -91,7 +85,6 @@ typedef struct _DXDIAG_INIT_PARAMS VOID* pReserved; // Reserved. Must be NULL. } DXDIAG_INIT_PARAMS; - /**************************************************************************** * * DxDiag Application Interfaces @@ -115,7 +108,6 @@ DECLARE_INTERFACE_(IDxDiagProvider,IUnknown) STDMETHOD(GetRootContainer) (THIS_ IDxDiagContainer **ppInstance) PURE; }; - // // COM definition for IDxDiagContainer // @@ -137,7 +129,6 @@ DECLARE_INTERFACE_(IDxDiagContainer,IUnknown) STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE; }; - /**************************************************************************** * * DxDiag application interface macros @@ -182,15 +173,11 @@ DECLARE_INTERFACE_(IDxDiagContainer,IUnknown) #endif - #ifdef __cplusplus } #endif - #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ #pragma endregion #endif /* _DXDIAG_H_ */ - - diff --git a/gfx/include/dxsdk/dxerr.h b/gfx/include/dxsdk/dxerr.h index 2bd7591197..3bafb2fca9 100644 --- a/gfx/include/dxsdk/dxerr.h +++ b/gfx/include/dxsdk/dxerr.h @@ -32,7 +32,6 @@ const WCHAR* WINAPI DXGetErrorStringW(__in HRESULT hr); #define DXGetErrorString DXGetErrorStringA #endif - // // DXGetErrorDescription // @@ -52,7 +51,6 @@ const WCHAR* WINAPI DXGetErrorDescriptionW(__in HRESULT hr); #define DXGetErrorDescription DXGetErrorDescriptionA #endif - // // DXTrace // @@ -77,7 +75,6 @@ HRESULT WINAPI DXTraceW( __in_z const char* strFile, __in DWORD dwLine, __in HRE #define DXTrace DXTraceA #endif - // // Helper macros // @@ -91,7 +88,6 @@ HRESULT WINAPI DXTraceW( __in_z const char* strFile, __in DWORD dwLine, __in HRE #define DXTRACE_ERR_MSGBOX(str,hr) (hr) #endif - #ifdef __cplusplus } #endif //__cplusplus diff --git a/gfx/include/dxsdk/dxfile.h b/gfx/include/dxsdk/dxfile.h index 74e80e585b..3fb665ee43 100644 --- a/gfx/include/dxsdk/dxfile.h +++ b/gfx/include/dxsdk/dxfile.h @@ -119,7 +119,6 @@ DECLARE_INTERFACE_(IDirectXFileSaveObject, IUnknown) STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE; }; - #undef INTERFACE #define INTERFACE IDirectXFileObject @@ -193,7 +192,6 @@ DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); - /* * DirectX File errors. */ @@ -231,7 +229,6 @@ DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x2 #define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875) #define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876) - #ifdef __cplusplus }; #endif diff --git a/gfx/include/dxsdk/dxgi.h b/gfx/include/dxsdk/dxgi.h index 06bc6c64ef..f3ce03f46d 100644 --- a/gfx/include/dxsdk/dxgi.h +++ b/gfx/include/dxsdk/dxgi.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,98 +41,84 @@ typedef interface IDXGIObject IDXGIObject; #endif /* __IDXGIObject_FWD_DEFINED__ */ - #ifndef __IDXGIDeviceSubObject_FWD_DEFINED__ #define __IDXGIDeviceSubObject_FWD_DEFINED__ typedef interface IDXGIDeviceSubObject IDXGIDeviceSubObject; #endif /* __IDXGIDeviceSubObject_FWD_DEFINED__ */ - #ifndef __IDXGIResource_FWD_DEFINED__ #define __IDXGIResource_FWD_DEFINED__ typedef interface IDXGIResource IDXGIResource; #endif /* __IDXGIResource_FWD_DEFINED__ */ - #ifndef __IDXGIKeyedMutex_FWD_DEFINED__ #define __IDXGIKeyedMutex_FWD_DEFINED__ typedef interface IDXGIKeyedMutex IDXGIKeyedMutex; #endif /* __IDXGIKeyedMutex_FWD_DEFINED__ */ - #ifndef __IDXGISurface_FWD_DEFINED__ #define __IDXGISurface_FWD_DEFINED__ typedef interface IDXGISurface IDXGISurface; #endif /* __IDXGISurface_FWD_DEFINED__ */ - #ifndef __IDXGISurface1_FWD_DEFINED__ #define __IDXGISurface1_FWD_DEFINED__ typedef interface IDXGISurface1 IDXGISurface1; #endif /* __IDXGISurface1_FWD_DEFINED__ */ - #ifndef __IDXGIAdapter_FWD_DEFINED__ #define __IDXGIAdapter_FWD_DEFINED__ typedef interface IDXGIAdapter IDXGIAdapter; #endif /* __IDXGIAdapter_FWD_DEFINED__ */ - #ifndef __IDXGIOutput_FWD_DEFINED__ #define __IDXGIOutput_FWD_DEFINED__ typedef interface IDXGIOutput IDXGIOutput; #endif /* __IDXGIOutput_FWD_DEFINED__ */ - #ifndef __IDXGISwapChain_FWD_DEFINED__ #define __IDXGISwapChain_FWD_DEFINED__ typedef interface IDXGISwapChain IDXGISwapChain; #endif /* __IDXGISwapChain_FWD_DEFINED__ */ - #ifndef __IDXGIFactory_FWD_DEFINED__ #define __IDXGIFactory_FWD_DEFINED__ typedef interface IDXGIFactory IDXGIFactory; #endif /* __IDXGIFactory_FWD_DEFINED__ */ - #ifndef __IDXGIDevice_FWD_DEFINED__ #define __IDXGIDevice_FWD_DEFINED__ typedef interface IDXGIDevice IDXGIDevice; #endif /* __IDXGIDevice_FWD_DEFINED__ */ - #ifndef __IDXGIFactory1_FWD_DEFINED__ #define __IDXGIFactory1_FWD_DEFINED__ typedef interface IDXGIFactory1 IDXGIFactory1; #endif /* __IDXGIFactory1_FWD_DEFINED__ */ - #ifndef __IDXGIAdapter1_FWD_DEFINED__ #define __IDXGIAdapter1_FWD_DEFINED__ typedef interface IDXGIAdapter1 IDXGIAdapter1; #endif /* __IDXGIAdapter1_FWD_DEFINED__ */ - #ifndef __IDXGIDevice1_FWD_DEFINED__ #define __IDXGIDevice1_FWD_DEFINED__ typedef interface IDXGIDevice1 IDXGIDevice1; #endif /* __IDXGIDevice1_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -147,7 +129,6 @@ typedef interface IDXGIDevice1 IDXGIDevice1; extern "C"{ #endif - /* interface __MIDL_itf_dxgi_0000_0000 */ /* [local] */ @@ -294,8 +275,6 @@ typedef struct DXGI_SWAP_CHAIN_DESC UINT Flags; } DXGI_SWAP_CHAIN_DESC; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0000_v0_0_s_ifspec; @@ -305,7 +284,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0000_v0_0_s_ifspec; /* interface IDXGIObject */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIObject; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -405,7 +383,6 @@ EXTERN_C const IID IID_IDXGIObject; #ifdef COBJMACROS - #define IDXGIObject_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -415,7 +392,6 @@ EXTERN_C const IID IID_IDXGIObject; #define IDXGIObject_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIObject_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -430,22 +406,16 @@ EXTERN_C const IID IID_IDXGIObject; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIObject_INTERFACE_DEFINED__ */ - #ifndef __IDXGIDeviceSubObject_INTERFACE_DEFINED__ #define __IDXGIDeviceSubObject_INTERFACE_DEFINED__ /* interface IDXGIDeviceSubObject */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDeviceSubObject; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -531,7 +501,6 @@ EXTERN_C const IID IID_IDXGIDeviceSubObject; #ifdef COBJMACROS - #define IDXGIDeviceSubObject_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -541,7 +510,6 @@ EXTERN_C const IID IID_IDXGIDeviceSubObject; #define IDXGIDeviceSubObject_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDeviceSubObject_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -554,28 +522,21 @@ EXTERN_C const IID IID_IDXGIDeviceSubObject; #define IDXGIDeviceSubObject_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIDeviceSubObject_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDeviceSubObject_INTERFACE_DEFINED__ */ - #ifndef __IDXGIResource_INTERFACE_DEFINED__ #define __IDXGIResource_INTERFACE_DEFINED__ /* interface IDXGIResource */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIResource; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -687,7 +648,6 @@ EXTERN_C const IID IID_IDXGIResource; #ifdef COBJMACROS - #define IDXGIResource_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -697,7 +657,6 @@ EXTERN_C const IID IID_IDXGIResource; #define IDXGIResource_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIResource_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -710,11 +669,9 @@ EXTERN_C const IID IID_IDXGIResource; #define IDXGIResource_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIResource_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGIResource_GetSharedHandle(This,pSharedHandle) \ ( (This)->lpVtbl -> GetSharedHandle(This,pSharedHandle) ) @@ -729,22 +686,16 @@ EXTERN_C const IID IID_IDXGIResource; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIResource_INTERFACE_DEFINED__ */ - #ifndef __IDXGIKeyedMutex_INTERFACE_DEFINED__ #define __IDXGIKeyedMutex_INTERFACE_DEFINED__ /* interface IDXGIKeyedMutex */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIKeyedMutex; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -840,7 +791,6 @@ EXTERN_C const IID IID_IDXGIKeyedMutex; #ifdef COBJMACROS - #define IDXGIKeyedMutex_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -850,7 +800,6 @@ EXTERN_C const IID IID_IDXGIKeyedMutex; #define IDXGIKeyedMutex_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIKeyedMutex_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -863,11 +812,9 @@ EXTERN_C const IID IID_IDXGIKeyedMutex; #define IDXGIKeyedMutex_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIKeyedMutex_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGIKeyedMutex_AcquireSync(This,Key,dwMilliseconds) \ ( (This)->lpVtbl -> AcquireSync(This,Key,dwMilliseconds) ) @@ -876,15 +823,10 @@ EXTERN_C const IID IID_IDXGIKeyedMutex; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIKeyedMutex_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0004 */ /* [local] */ @@ -894,8 +836,6 @@ EXTERN_C const IID IID_IDXGIKeyedMutex; #define DXGI_MAP_DISCARD ( 4UL ) - - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0004_v0_0_s_ifspec; @@ -905,7 +845,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0004_v0_0_s_ifspec; /* interface IDXGISurface */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISurface; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1010,7 +949,6 @@ EXTERN_C const IID IID_IDXGISurface; #ifdef COBJMACROS - #define IDXGISurface_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1020,7 +958,6 @@ EXTERN_C const IID IID_IDXGISurface; #define IDXGISurface_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISurface_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1033,11 +970,9 @@ EXTERN_C const IID IID_IDXGISurface; #define IDXGISurface_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISurface_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISurface_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -1049,22 +984,16 @@ EXTERN_C const IID IID_IDXGISurface; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISurface_INTERFACE_DEFINED__ */ - #ifndef __IDXGISurface1_INTERFACE_DEFINED__ #define __IDXGISurface1_INTERFACE_DEFINED__ /* interface IDXGISurface1 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISurface1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1178,7 +1107,6 @@ EXTERN_C const IID IID_IDXGISurface1; #ifdef COBJMACROS - #define IDXGISurface1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1188,7 +1116,6 @@ EXTERN_C const IID IID_IDXGISurface1; #define IDXGISurface1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISurface1_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1201,11 +1128,9 @@ EXTERN_C const IID IID_IDXGISurface1; #define IDXGISurface1_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISurface1_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISurface1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -1215,7 +1140,6 @@ EXTERN_C const IID IID_IDXGISurface1; #define IDXGISurface1_Unmap(This) \ ( (This)->lpVtbl -> Unmap(This) ) - #define IDXGISurface1_GetDC(This,Discard,phdc) \ ( (This)->lpVtbl -> GetDC(This,Discard,phdc) ) @@ -1224,21 +1148,13 @@ EXTERN_C const IID IID_IDXGISurface1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISurface1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0006 */ /* [local] */ - - - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0006_v0_0_s_ifspec; @@ -1248,7 +1164,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0006_v0_0_s_ifspec; /* interface IDXGIAdapter */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIAdapter; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1354,7 +1269,6 @@ EXTERN_C const IID IID_IDXGIAdapter; #ifdef COBJMACROS - #define IDXGIAdapter_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1364,7 +1278,6 @@ EXTERN_C const IID IID_IDXGIAdapter; #define IDXGIAdapter_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIAdapter_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1377,7 +1290,6 @@ EXTERN_C const IID IID_IDXGIAdapter; #define IDXGIAdapter_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIAdapter_EnumOutputs(This,Output,ppOutput) \ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) @@ -1389,15 +1301,10 @@ EXTERN_C const IID IID_IDXGIAdapter; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIAdapter_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0007 */ /* [local] */ @@ -1405,8 +1312,6 @@ EXTERN_C const IID IID_IDXGIAdapter; #define DXGI_ENUM_MODES_SCALING ( 2UL ) - - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0007_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0007_v0_0_s_ifspec; @@ -1416,7 +1321,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0007_v0_0_s_ifspec; /* interface IDXGIOutput */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutput; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1607,7 +1511,6 @@ EXTERN_C const IID IID_IDXGIOutput; #ifdef COBJMACROS - #define IDXGIOutput_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1617,7 +1520,6 @@ EXTERN_C const IID IID_IDXGIOutput; #define IDXGIOutput_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutput_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1630,7 +1532,6 @@ EXTERN_C const IID IID_IDXGIOutput; #define IDXGIOutput_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutput_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -1669,15 +1570,10 @@ EXTERN_C const IID IID_IDXGIOutput; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutput_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0008 */ /* [local] */ @@ -1692,7 +1588,6 @@ EXTERN_C const IID IID_IDXGIOutput; #define DXGI_PRESENT_USE_DURATION 0x00000100UL #define DXGI_PRESENT_ALLOW_TEARING 0x00000200UL - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0008_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0008_v0_0_s_ifspec; @@ -1702,7 +1597,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0008_v0_0_s_ifspec; /* interface IDXGISwapChain */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISwapChain; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1890,7 +1784,6 @@ EXTERN_C const IID IID_IDXGISwapChain; #ifdef COBJMACROS - #define IDXGISwapChain_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1900,7 +1793,6 @@ EXTERN_C const IID IID_IDXGISwapChain; #define IDXGISwapChain_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISwapChain_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1913,11 +1805,9 @@ EXTERN_C const IID IID_IDXGISwapChain; #define IDXGISwapChain_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISwapChain_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISwapChain_Present(This,SyncInterval,Flags) \ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) @@ -1950,15 +1840,10 @@ EXTERN_C const IID IID_IDXGISwapChain; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISwapChain_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0009 */ /* [local] */ @@ -1967,7 +1852,6 @@ EXTERN_C const IID IID_IDXGISwapChain; #define DXGI_MWA_NO_PRINT_SCREEN ( 1 << 2 ) #define DXGI_MWA_VALID ( 0x7 ) - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0009_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0009_v0_0_s_ifspec; @@ -1977,7 +1861,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0009_v0_0_s_ifspec; /* interface IDXGIFactory */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIFactory; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2107,7 +1990,6 @@ EXTERN_C const IID IID_IDXGIFactory; #ifdef COBJMACROS - #define IDXGIFactory_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2117,7 +1999,6 @@ EXTERN_C const IID IID_IDXGIFactory; #define IDXGIFactory_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIFactory_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2130,7 +2011,6 @@ EXTERN_C const IID IID_IDXGIFactory; #define IDXGIFactory_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIFactory_EnumAdapters(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) @@ -2148,15 +2028,10 @@ EXTERN_C const IID IID_IDXGIFactory; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIFactory_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0010 */ /* [local] */ @@ -2167,7 +2042,6 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, _COM_Outptr_ void **ppFactory); /*#pragma endregion*/ HRESULT WINAPI CreateDXGIFactory1(REFIID riid, _COM_Outptr_ void **ppFactory); - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0010_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0010_v0_0_s_ifspec; @@ -2177,7 +2051,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0010_v0_0_s_ifspec; /* interface IDXGIDevice */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDevice; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2311,7 +2184,6 @@ EXTERN_C const IID IID_IDXGIDevice; #ifdef COBJMACROS - #define IDXGIDevice_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2321,7 +2193,6 @@ EXTERN_C const IID IID_IDXGIDevice; #define IDXGIDevice_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDevice_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2334,7 +2205,6 @@ EXTERN_C const IID IID_IDXGIDevice; #define IDXGIDevice_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIDevice_GetAdapter(This,pAdapter) \ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) @@ -2352,15 +2222,10 @@ EXTERN_C const IID IID_IDXGIDevice; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDevice_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0011 */ /* [local] */ @@ -2393,9 +2258,6 @@ typedef struct DXGI_DISPLAY_COLOR_SPACE FLOAT WhitePoints[ 16 ][ 2 ]; } DXGI_DISPLAY_COLOR_SPACE; - - - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0011_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0011_v0_0_s_ifspec; @@ -2405,7 +2267,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0011_v0_0_s_ifspec; /* interface IDXGIFactory1 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIFactory1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2525,7 +2386,6 @@ EXTERN_C const IID IID_IDXGIFactory1; #ifdef COBJMACROS - #define IDXGIFactory1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2535,7 +2395,6 @@ EXTERN_C const IID IID_IDXGIFactory1; #define IDXGIFactory1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIFactory1_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2548,7 +2407,6 @@ EXTERN_C const IID IID_IDXGIFactory1; #define IDXGIFactory1_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIFactory1_EnumAdapters(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) @@ -2564,7 +2422,6 @@ EXTERN_C const IID IID_IDXGIFactory1; #define IDXGIFactory1_CreateSoftwareAdapter(This,Module,ppAdapter) \ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) - #define IDXGIFactory1_EnumAdapters1(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) @@ -2573,22 +2430,16 @@ EXTERN_C const IID IID_IDXGIFactory1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIFactory1_INTERFACE_DEFINED__ */ - #ifndef __IDXGIAdapter1_INTERFACE_DEFINED__ #define __IDXGIAdapter1_INTERFACE_DEFINED__ /* interface IDXGIAdapter1 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIAdapter1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2688,7 +2539,6 @@ EXTERN_C const IID IID_IDXGIAdapter1; #ifdef COBJMACROS - #define IDXGIAdapter1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2698,7 +2548,6 @@ EXTERN_C const IID IID_IDXGIAdapter1; #define IDXGIAdapter1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIAdapter1_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2711,7 +2560,6 @@ EXTERN_C const IID IID_IDXGIAdapter1; #define IDXGIAdapter1_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIAdapter1_EnumOutputs(This,Output,ppOutput) \ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) @@ -2721,28 +2569,21 @@ EXTERN_C const IID IID_IDXGIAdapter1; #define IDXGIAdapter1_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) - #define IDXGIAdapter1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIAdapter1_INTERFACE_DEFINED__ */ - #ifndef __IDXGIDevice1_INTERFACE_DEFINED__ #define __IDXGIDevice1_INTERFACE_DEFINED__ /* interface IDXGIDevice1 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDevice1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2864,7 +2705,6 @@ EXTERN_C const IID IID_IDXGIDevice1; #ifdef COBJMACROS - #define IDXGIDevice1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2874,7 +2714,6 @@ EXTERN_C const IID IID_IDXGIDevice1; #define IDXGIDevice1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDevice1_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2887,7 +2726,6 @@ EXTERN_C const IID IID_IDXGIDevice1; #define IDXGIDevice1_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIDevice1_GetAdapter(This,pAdapter) \ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) @@ -2903,7 +2741,6 @@ EXTERN_C const IID IID_IDXGIDevice1; #define IDXGIDevice1_GetGPUThreadPriority(This,pPriority) \ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) - #define IDXGIDevice1_SetMaximumFrameLatency(This,MaxLatency) \ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) @@ -2912,15 +2749,10 @@ EXTERN_C const IID IID_IDXGIDevice1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDevice1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi_0000_0014 */ /* [local] */ @@ -2941,7 +2773,6 @@ DEFINE_GUID(IID_IDXGIFactory1,0x770aae78,0xf26f,0x4dba,0xa8,0x29,0x25,0x3c,0x83, DEFINE_GUID(IID_IDXGIAdapter1,0x29038f61,0x3839,0x4626,0x91,0xfd,0x08,0x68,0x79,0x01,0x1a,0x05); DEFINE_GUID(IID_IDXGIDevice1,0x77db970f,0x6276,0x48ba,0xba,0x28,0x07,0x01,0x43,0xb4,0x39,0x2c); - extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0014_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0014_v0_0_s_ifspec; @@ -2954,5 +2785,3 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi_0000_0014_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/dxgi1_2.h b/gfx/include/dxsdk/dxgi1_2.h index 84e231bd82..bc39bccad1 100644 --- a/gfx/include/dxsdk/dxgi1_2.h +++ b/gfx/include/dxsdk/dxgi1_2.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,63 +41,54 @@ typedef interface IDXGIDisplayControl IDXGIDisplayControl; #endif /* __IDXGIDisplayControl_FWD_DEFINED__ */ - #ifndef __IDXGIOutputDuplication_FWD_DEFINED__ #define __IDXGIOutputDuplication_FWD_DEFINED__ typedef interface IDXGIOutputDuplication IDXGIOutputDuplication; #endif /* __IDXGIOutputDuplication_FWD_DEFINED__ */ - #ifndef __IDXGISurface2_FWD_DEFINED__ #define __IDXGISurface2_FWD_DEFINED__ typedef interface IDXGISurface2 IDXGISurface2; #endif /* __IDXGISurface2_FWD_DEFINED__ */ - #ifndef __IDXGIResource1_FWD_DEFINED__ #define __IDXGIResource1_FWD_DEFINED__ typedef interface IDXGIResource1 IDXGIResource1; #endif /* __IDXGIResource1_FWD_DEFINED__ */ - #ifndef __IDXGIDevice2_FWD_DEFINED__ #define __IDXGIDevice2_FWD_DEFINED__ typedef interface IDXGIDevice2 IDXGIDevice2; #endif /* __IDXGIDevice2_FWD_DEFINED__ */ - #ifndef __IDXGISwapChain1_FWD_DEFINED__ #define __IDXGISwapChain1_FWD_DEFINED__ typedef interface IDXGISwapChain1 IDXGISwapChain1; #endif /* __IDXGISwapChain1_FWD_DEFINED__ */ - #ifndef __IDXGIFactory2_FWD_DEFINED__ #define __IDXGIFactory2_FWD_DEFINED__ typedef interface IDXGIFactory2 IDXGIFactory2; #endif /* __IDXGIFactory2_FWD_DEFINED__ */ - #ifndef __IDXGIAdapter2_FWD_DEFINED__ #define __IDXGIAdapter2_FWD_DEFINED__ typedef interface IDXGIAdapter2 IDXGIAdapter2; #endif /* __IDXGIAdapter2_FWD_DEFINED__ */ - #ifndef __IDXGIOutput1_FWD_DEFINED__ #define __IDXGIOutput1_FWD_DEFINED__ typedef interface IDXGIOutput1 IDXGIOutput1; #endif /* __IDXGIOutput1_FWD_DEFINED__ */ - /* header files for imported files */ #include "dxgi.h" @@ -109,7 +96,6 @@ typedef interface IDXGIOutput1 IDXGIOutput1; extern "C"{ #endif - /* interface __MIDL_itf_dxgi1_2_0000_0000 */ /* [local] */ @@ -117,7 +103,6 @@ extern "C"{ /*#pragma region Desktop Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/ - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_s_ifspec; @@ -127,7 +112,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_s_ifspec; /* interface IDXGIDisplayControl */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDisplayControl; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -181,7 +165,6 @@ EXTERN_C const IID IID_IDXGIDisplayControl; #ifdef COBJMACROS - #define IDXGIDisplayControl_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -191,7 +174,6 @@ EXTERN_C const IID IID_IDXGIDisplayControl; #define IDXGIDisplayControl_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDisplayControl_IsStereoEnabled(This) \ ( (This)->lpVtbl -> IsStereoEnabled(This) ) @@ -200,15 +182,10 @@ EXTERN_C const IID IID_IDXGIDisplayControl; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDisplayControl_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_2_0000_0001 */ /* [local] */ @@ -260,8 +237,6 @@ typedef struct DXGI_OUTDUPL_FRAME_INFO UINT PointerShapeBufferSize; } DXGI_OUTDUPL_FRAME_INFO; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0001_v0_0_s_ifspec; @@ -271,7 +246,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0001_v0_0_s_ifspec; /* interface IDXGIOutputDuplication */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutputDuplication; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -444,7 +418,6 @@ EXTERN_C const IID IID_IDXGIOutputDuplication; #ifdef COBJMACROS - #define IDXGIOutputDuplication_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -454,7 +427,6 @@ EXTERN_C const IID IID_IDXGIOutputDuplication; #define IDXGIOutputDuplication_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutputDuplication_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -467,7 +439,6 @@ EXTERN_C const IID IID_IDXGIOutputDuplication; #define IDXGIOutputDuplication_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutputDuplication_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -494,15 +465,10 @@ EXTERN_C const IID IID_IDXGIOutputDuplication; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutputDuplication_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_2_0000_0002 */ /* [local] */ @@ -520,8 +486,6 @@ enum DXGI_ALPHA_MODE DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff } DXGI_ALPHA_MODE; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0002_v0_0_s_ifspec; @@ -531,7 +495,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0002_v0_0_s_ifspec; /* interface IDXGISurface2 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISurface2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -653,7 +616,6 @@ EXTERN_C const IID IID_IDXGISurface2; #ifdef COBJMACROS - #define IDXGISurface2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -663,7 +625,6 @@ EXTERN_C const IID IID_IDXGISurface2; #define IDXGISurface2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISurface2_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -676,11 +637,9 @@ EXTERN_C const IID IID_IDXGISurface2; #define IDXGISurface2_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISurface2_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISurface2_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -690,35 +649,27 @@ EXTERN_C const IID IID_IDXGISurface2; #define IDXGISurface2_Unmap(This) \ ( (This)->lpVtbl -> Unmap(This) ) - #define IDXGISurface2_GetDC(This,Discard,phdc) \ ( (This)->lpVtbl -> GetDC(This,Discard,phdc) ) #define IDXGISurface2_ReleaseDC(This,pDirtyRect) \ ( (This)->lpVtbl -> ReleaseDC(This,pDirtyRect) ) - #define IDXGISurface2_GetResource(This,riid,ppParentResource,pSubresourceIndex) \ ( (This)->lpVtbl -> GetResource(This,riid,ppParentResource,pSubresourceIndex) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISurface2_INTERFACE_DEFINED__ */ - #ifndef __IDXGIResource1_INTERFACE_DEFINED__ #define __IDXGIResource1_INTERFACE_DEFINED__ /* interface IDXGIResource1 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIResource1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -848,7 +799,6 @@ EXTERN_C const IID IID_IDXGIResource1; #ifdef COBJMACROS - #define IDXGIResource1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -858,7 +808,6 @@ EXTERN_C const IID IID_IDXGIResource1; #define IDXGIResource1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIResource1_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -871,11 +820,9 @@ EXTERN_C const IID IID_IDXGIResource1; #define IDXGIResource1_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIResource1_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGIResource1_GetSharedHandle(This,pSharedHandle) \ ( (This)->lpVtbl -> GetSharedHandle(This,pSharedHandle) ) @@ -888,7 +835,6 @@ EXTERN_C const IID IID_IDXGIResource1; #define IDXGIResource1_GetEvictionPriority(This,pEvictionPriority) \ ( (This)->lpVtbl -> GetEvictionPriority(This,pEvictionPriority) ) - #define IDXGIResource1_CreateSubresourceSurface(This,index,ppSurface) \ ( (This)->lpVtbl -> CreateSubresourceSurface(This,index,ppSurface) ) @@ -897,15 +843,10 @@ EXTERN_C const IID IID_IDXGIResource1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIResource1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_2_0000_0004 */ /* [local] */ @@ -917,8 +858,6 @@ enum _DXGI_OFFER_RESOURCE_PRIORITY DXGI_OFFER_RESOURCE_PRIORITY_HIGH = ( DXGI_OFFER_RESOURCE_PRIORITY_NORMAL + 1 ) } DXGI_OFFER_RESOURCE_PRIORITY; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0004_v0_0_s_ifspec; @@ -928,7 +867,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0004_v0_0_s_ifspec; /* interface IDXGIDevice2 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDevice2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1086,7 +1024,6 @@ EXTERN_C const IID IID_IDXGIDevice2; #ifdef COBJMACROS - #define IDXGIDevice2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1096,7 +1033,6 @@ EXTERN_C const IID IID_IDXGIDevice2; #define IDXGIDevice2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDevice2_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1109,7 +1045,6 @@ EXTERN_C const IID IID_IDXGIDevice2; #define IDXGIDevice2_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIDevice2_GetAdapter(This,pAdapter) \ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) @@ -1125,14 +1060,12 @@ EXTERN_C const IID IID_IDXGIDevice2; #define IDXGIDevice2_GetGPUThreadPriority(This,pPriority) \ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) - #define IDXGIDevice2_SetMaximumFrameLatency(This,MaxLatency) \ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) #define IDXGIDevice2_GetMaximumFrameLatency(This,pMaxLatency) \ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) - #define IDXGIDevice2_OfferResources(This,NumResources,ppResources,Priority) \ ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) ) @@ -1144,15 +1077,10 @@ EXTERN_C const IID IID_IDXGIDevice2; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDevice2_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_2_0000_0005 */ /* [local] */ @@ -1215,8 +1143,6 @@ typedef struct DXGI_PRESENT_PARAMETERS POINT *pScrollOffset; } DXGI_PRESENT_PARAMETERS; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0005_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0005_v0_0_s_ifspec; @@ -1226,7 +1152,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0005_v0_0_s_ifspec; /* interface IDXGISwapChain1 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISwapChain1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1468,7 +1393,6 @@ EXTERN_C const IID IID_IDXGISwapChain1; #ifdef COBJMACROS - #define IDXGISwapChain1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1478,7 +1402,6 @@ EXTERN_C const IID IID_IDXGISwapChain1; #define IDXGISwapChain1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISwapChain1_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1491,11 +1414,9 @@ EXTERN_C const IID IID_IDXGISwapChain1; #define IDXGISwapChain1_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISwapChain1_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISwapChain1_Present(This,SyncInterval,Flags) \ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) @@ -1526,7 +1447,6 @@ EXTERN_C const IID IID_IDXGISwapChain1; #define IDXGISwapChain1_GetLastPresentCount(This,pLastPresentCount) \ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) - #define IDXGISwapChain1_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) @@ -1562,22 +1482,16 @@ EXTERN_C const IID IID_IDXGISwapChain1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISwapChain1_INTERFACE_DEFINED__ */ - #ifndef __IDXGIFactory2_INTERFACE_DEFINED__ #define __IDXGIFactory2_INTERFACE_DEFINED__ /* interface IDXGIFactory2 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIFactory2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1861,7 +1775,6 @@ EXTERN_C const IID IID_IDXGIFactory2; #ifdef COBJMACROS - #define IDXGIFactory2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1871,7 +1784,6 @@ EXTERN_C const IID IID_IDXGIFactory2; #define IDXGIFactory2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIFactory2_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1884,7 +1796,6 @@ EXTERN_C const IID IID_IDXGIFactory2; #define IDXGIFactory2_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIFactory2_EnumAdapters(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) @@ -1900,14 +1811,12 @@ EXTERN_C const IID IID_IDXGIFactory2; #define IDXGIFactory2_CreateSoftwareAdapter(This,Module,ppAdapter) \ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) - #define IDXGIFactory2_EnumAdapters1(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) #define IDXGIFactory2_IsCurrent(This) \ ( (This)->lpVtbl -> IsCurrent(This) ) - #define IDXGIFactory2_IsWindowedStereoEnabled(This) \ ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) @@ -1943,15 +1852,10 @@ EXTERN_C const IID IID_IDXGIFactory2; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIFactory2_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_2_0000_0007 */ /* [local] */ @@ -1991,8 +1895,6 @@ typedef struct DXGI_ADAPTER_DESC2 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity; } DXGI_ADAPTER_DESC2; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0007_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0007_v0_0_s_ifspec; @@ -2002,7 +1904,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0007_v0_0_s_ifspec; /* interface IDXGIAdapter2 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIAdapter2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2107,7 +2008,6 @@ EXTERN_C const IID IID_IDXGIAdapter2; #ifdef COBJMACROS - #define IDXGIAdapter2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2117,7 +2017,6 @@ EXTERN_C const IID IID_IDXGIAdapter2; #define IDXGIAdapter2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIAdapter2_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2130,7 +2029,6 @@ EXTERN_C const IID IID_IDXGIAdapter2; #define IDXGIAdapter2_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIAdapter2_EnumOutputs(This,Output,ppOutput) \ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) @@ -2140,32 +2038,24 @@ EXTERN_C const IID IID_IDXGIAdapter2; #define IDXGIAdapter2_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) - #define IDXGIAdapter2_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) - #define IDXGIAdapter2_GetDesc2(This,pDesc) \ ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIAdapter2_INTERFACE_DEFINED__ */ - #ifndef __IDXGIOutput1_INTERFACE_DEFINED__ #define __IDXGIOutput1_INTERFACE_DEFINED__ /* interface IDXGIOutput1 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutput1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -2359,7 +2249,6 @@ EXTERN_C const IID IID_IDXGIOutput1; #ifdef COBJMACROS - #define IDXGIOutput1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2369,7 +2258,6 @@ EXTERN_C const IID IID_IDXGIOutput1; #define IDXGIOutput1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutput1_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2382,7 +2270,6 @@ EXTERN_C const IID IID_IDXGIOutput1; #define IDXGIOutput1_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutput1_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -2419,7 +2306,6 @@ EXTERN_C const IID IID_IDXGIOutput1; #define IDXGIOutput1_GetFrameStatistics(This,pStats) \ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) - #define IDXGIOutput1_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) @@ -2434,15 +2320,10 @@ EXTERN_C const IID IID_IDXGIOutput1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutput1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_2_0000_0009 */ /* [local] */ @@ -2458,7 +2339,6 @@ DEFINE_GUID(IID_IDXGIFactory2,0x50c83a1c,0xe072,0x4c48,0x87,0xb0,0x36,0x30,0xfa, DEFINE_GUID(IID_IDXGIAdapter2,0x0AA1AE0A,0xFA0E,0x4B84,0x86,0x44,0xE0,0x5F,0xF8,0xE5,0xAC,0xB5); DEFINE_GUID(IID_IDXGIOutput1,0x00cddea8,0x939b,0x4b83,0xa3,0x40,0xa6,0x85,0x22,0x66,0x66,0xcc); - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0009_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0009_v0_0_s_ifspec; @@ -2471,5 +2351,3 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0009_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/dxgi1_3.h b/gfx/include/dxsdk/dxgi1_3.h index 839c05ca46..3b0470e2e8 100644 --- a/gfx/include/dxsdk/dxgi1_3.h +++ b/gfx/include/dxsdk/dxgi1_3.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,56 +41,48 @@ typedef interface IDXGIDevice3 IDXGIDevice3; #endif /* __IDXGIDevice3_FWD_DEFINED__ */ - #ifndef __IDXGISwapChain2_FWD_DEFINED__ #define __IDXGISwapChain2_FWD_DEFINED__ typedef interface IDXGISwapChain2 IDXGISwapChain2; #endif /* __IDXGISwapChain2_FWD_DEFINED__ */ - #ifndef __IDXGIOutput2_FWD_DEFINED__ #define __IDXGIOutput2_FWD_DEFINED__ typedef interface IDXGIOutput2 IDXGIOutput2; #endif /* __IDXGIOutput2_FWD_DEFINED__ */ - #ifndef __IDXGIFactory3_FWD_DEFINED__ #define __IDXGIFactory3_FWD_DEFINED__ typedef interface IDXGIFactory3 IDXGIFactory3; #endif /* __IDXGIFactory3_FWD_DEFINED__ */ - #ifndef __IDXGIDecodeSwapChain_FWD_DEFINED__ #define __IDXGIDecodeSwapChain_FWD_DEFINED__ typedef interface IDXGIDecodeSwapChain IDXGIDecodeSwapChain; #endif /* __IDXGIDecodeSwapChain_FWD_DEFINED__ */ - #ifndef __IDXGIFactoryMedia_FWD_DEFINED__ #define __IDXGIFactoryMedia_FWD_DEFINED__ typedef interface IDXGIFactoryMedia IDXGIFactoryMedia; #endif /* __IDXGIFactoryMedia_FWD_DEFINED__ */ - #ifndef __IDXGISwapChainMedia_FWD_DEFINED__ #define __IDXGISwapChainMedia_FWD_DEFINED__ typedef interface IDXGISwapChainMedia IDXGISwapChainMedia; #endif /* __IDXGISwapChainMedia_FWD_DEFINED__ */ - #ifndef __IDXGIOutput3_FWD_DEFINED__ #define __IDXGIOutput3_FWD_DEFINED__ typedef interface IDXGIOutput3 IDXGIOutput3; #endif /* __IDXGIOutput3_FWD_DEFINED__ */ - /* header files for imported files */ #include "dxgi1_2.h" @@ -102,7 +90,6 @@ typedef interface IDXGIOutput3 IDXGIOutput3; extern "C"{ #endif - /* interface __MIDL_itf_dxgi1_3_0000_0000 */ /* [local] */ @@ -113,7 +100,6 @@ extern "C"{ HRESULT WINAPI CreateDXGIFactory2(UINT Flags, REFIID riid, _COM_Outptr_ void **ppFactory); HRESULT WINAPI DXGIGetDebugInterface1(UINT Flags, REFIID riid, _COM_Outptr_ void **pDebug); - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0000_v0_0_s_ifspec; @@ -123,7 +109,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0000_v0_0_s_ifspec; /* interface IDXGIDevice3 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDevice3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -266,7 +251,6 @@ EXTERN_C const IID IID_IDXGIDevice3; #ifdef COBJMACROS - #define IDXGIDevice3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -276,7 +260,6 @@ EXTERN_C const IID IID_IDXGIDevice3; #define IDXGIDevice3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDevice3_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -289,7 +272,6 @@ EXTERN_C const IID IID_IDXGIDevice3; #define IDXGIDevice3_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIDevice3_GetAdapter(This,pAdapter) \ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) @@ -305,14 +287,12 @@ EXTERN_C const IID IID_IDXGIDevice3; #define IDXGIDevice3_GetGPUThreadPriority(This,pPriority) \ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) - #define IDXGIDevice3_SetMaximumFrameLatency(This,MaxLatency) \ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) #define IDXGIDevice3_GetMaximumFrameLatency(This,pMaxLatency) \ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) - #define IDXGIDevice3_OfferResources(This,NumResources,ppResources,Priority) \ ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) ) @@ -322,21 +302,15 @@ EXTERN_C const IID IID_IDXGIDevice3; #define IDXGIDevice3_EnqueueSetEvent(This,hEvent) \ ( (This)->lpVtbl -> EnqueueSetEvent(This,hEvent) ) - #define IDXGIDevice3_Trim(This) \ ( (This)->lpVtbl -> Trim(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDevice3_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_3_0000_0001 */ /* [local] */ @@ -350,8 +324,6 @@ typedef struct DXGI_MATRIX_3X2_F FLOAT _32; } DXGI_MATRIX_3X2_F; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0001_v0_0_s_ifspec; @@ -361,7 +333,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0001_v0_0_s_ifspec; /* interface IDXGISwapChain2 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISwapChain2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -616,7 +587,6 @@ EXTERN_C const IID IID_IDXGISwapChain2; #ifdef COBJMACROS - #define IDXGISwapChain2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -626,7 +596,6 @@ EXTERN_C const IID IID_IDXGISwapChain2; #define IDXGISwapChain2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISwapChain2_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -639,11 +608,9 @@ EXTERN_C const IID IID_IDXGISwapChain2; #define IDXGISwapChain2_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISwapChain2_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISwapChain2_Present(This,SyncInterval,Flags) \ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) @@ -674,7 +641,6 @@ EXTERN_C const IID IID_IDXGISwapChain2; #define IDXGISwapChain2_GetLastPresentCount(This,pLastPresentCount) \ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) - #define IDXGISwapChain2_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) @@ -708,7 +674,6 @@ EXTERN_C const IID IID_IDXGISwapChain2; #define IDXGISwapChain2_GetRotation(This,pRotation) \ ( (This)->lpVtbl -> GetRotation(This,pRotation) ) - #define IDXGISwapChain2_SetSourceSize(This,Width,Height) \ ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) ) @@ -732,22 +697,16 @@ EXTERN_C const IID IID_IDXGISwapChain2; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISwapChain2_INTERFACE_DEFINED__ */ - #ifndef __IDXGIOutput2_INTERFACE_DEFINED__ #define __IDXGIOutput2_INTERFACE_DEFINED__ /* interface IDXGIOutput2 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutput2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -920,7 +879,6 @@ EXTERN_C const IID IID_IDXGIOutput2; #ifdef COBJMACROS - #define IDXGIOutput2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -930,7 +888,6 @@ EXTERN_C const IID IID_IDXGIOutput2; #define IDXGIOutput2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutput2_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -943,7 +900,6 @@ EXTERN_C const IID IID_IDXGIOutput2; #define IDXGIOutput2_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutput2_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -980,7 +936,6 @@ EXTERN_C const IID IID_IDXGIOutput2; #define IDXGIOutput2_GetFrameStatistics(This,pStats) \ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) - #define IDXGIOutput2_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) @@ -993,28 +948,21 @@ EXTERN_C const IID IID_IDXGIOutput2; #define IDXGIOutput2_DuplicateOutput(This,pDevice,ppOutputDuplication) \ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) - #define IDXGIOutput2_SupportsOverlays(This) \ ( (This)->lpVtbl -> SupportsOverlays(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutput2_INTERFACE_DEFINED__ */ - #ifndef __IDXGIFactory3_INTERFACE_DEFINED__ #define __IDXGIFactory3_INTERFACE_DEFINED__ /* interface IDXGIFactory3 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIFactory3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1223,7 +1171,6 @@ EXTERN_C const IID IID_IDXGIFactory3; #ifdef COBJMACROS - #define IDXGIFactory3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1233,7 +1180,6 @@ EXTERN_C const IID IID_IDXGIFactory3; #define IDXGIFactory3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIFactory3_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1246,7 +1192,6 @@ EXTERN_C const IID IID_IDXGIFactory3; #define IDXGIFactory3_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIFactory3_EnumAdapters(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) @@ -1262,14 +1207,12 @@ EXTERN_C const IID IID_IDXGIFactory3; #define IDXGIFactory3_CreateSoftwareAdapter(This,Module,ppAdapter) \ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) - #define IDXGIFactory3_EnumAdapters1(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) #define IDXGIFactory3_IsCurrent(This) \ ( (This)->lpVtbl -> IsCurrent(This) ) - #define IDXGIFactory3_IsWindowedStereoEnabled(This) \ ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) @@ -1303,21 +1246,15 @@ EXTERN_C const IID IID_IDXGIFactory3; #define IDXGIFactory3_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) - #define IDXGIFactory3_GetCreationFlags(This) \ ( (This)->lpVtbl -> GetCreationFlags(This) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIFactory3_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_3_0000_0004 */ /* [local] */ @@ -1338,8 +1275,6 @@ enum DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 0x4 } DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0004_v0_0_s_ifspec; @@ -1349,7 +1284,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0004_v0_0_s_ifspec; /* interface IDXGIDecodeSwapChain */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDecodeSwapChain; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1468,7 +1402,6 @@ EXTERN_C const IID IID_IDXGIDecodeSwapChain; #ifdef COBJMACROS - #define IDXGIDecodeSwapChain_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1478,7 +1411,6 @@ EXTERN_C const IID IID_IDXGIDecodeSwapChain; #define IDXGIDecodeSwapChain_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDecodeSwapChain_PresentBuffer(This,BufferToPresent,SyncInterval,Flags) \ ( (This)->lpVtbl -> PresentBuffer(This,BufferToPresent,SyncInterval,Flags) ) @@ -1508,22 +1440,16 @@ EXTERN_C const IID IID_IDXGIDecodeSwapChain; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDecodeSwapChain_INTERFACE_DEFINED__ */ - #ifndef __IDXGIFactoryMedia_INTERFACE_DEFINED__ #define __IDXGIFactoryMedia_INTERFACE_DEFINED__ /* interface IDXGIFactoryMedia */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIFactoryMedia; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1619,7 +1545,6 @@ EXTERN_C const IID IID_IDXGIFactoryMedia; #ifdef COBJMACROS - #define IDXGIFactoryMedia_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1629,7 +1554,6 @@ EXTERN_C const IID IID_IDXGIFactoryMedia; #define IDXGIFactoryMedia_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIFactoryMedia_CreateSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pRestrictToOutput,ppSwapChain) \ ( (This)->lpVtbl -> CreateSwapChainForCompositionSurfaceHandle(This,pDevice,hSurface,pDesc,pRestrictToOutput,ppSwapChain) ) @@ -1638,15 +1562,10 @@ EXTERN_C const IID IID_IDXGIFactoryMedia; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIFactoryMedia_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_3_0000_0006 */ /* [local] */ @@ -1670,8 +1589,6 @@ typedef struct DXGI_FRAME_STATISTICS_MEDIA UINT ApprovedPresentDuration; } DXGI_FRAME_STATISTICS_MEDIA; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0006_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0006_v0_0_s_ifspec; @@ -1681,7 +1598,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0006_v0_0_s_ifspec; /* interface IDXGISwapChainMedia */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISwapChainMedia; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1754,7 +1670,6 @@ EXTERN_C const IID IID_IDXGISwapChainMedia; #ifdef COBJMACROS - #define IDXGISwapChainMedia_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1764,7 +1679,6 @@ EXTERN_C const IID IID_IDXGISwapChainMedia; #define IDXGISwapChainMedia_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISwapChainMedia_GetFrameStatisticsMedia(This,pStats) \ ( (This)->lpVtbl -> GetFrameStatisticsMedia(This,pStats) ) @@ -1776,15 +1690,10 @@ EXTERN_C const IID IID_IDXGISwapChainMedia; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISwapChainMedia_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_3_0000_0007 */ /* [local] */ @@ -1800,7 +1709,6 @@ enum DXGI_OVERLAY_SUPPORT_FLAG /*#pragma region App Family*/ /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/ - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_s_ifspec; @@ -1810,7 +1718,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_s_ifspec; /* interface IDXGIOutput3 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutput3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1998,7 +1905,6 @@ EXTERN_C const IID IID_IDXGIOutput3; #ifdef COBJMACROS - #define IDXGIOutput3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -2008,7 +1914,6 @@ EXTERN_C const IID IID_IDXGIOutput3; #define IDXGIOutput3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutput3_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -2021,7 +1926,6 @@ EXTERN_C const IID IID_IDXGIOutput3; #define IDXGIOutput3_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutput3_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -2058,7 +1962,6 @@ EXTERN_C const IID IID_IDXGIOutput3; #define IDXGIOutput3_GetFrameStatistics(This,pStats) \ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) - #define IDXGIOutput3_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) @@ -2071,25 +1974,18 @@ EXTERN_C const IID IID_IDXGIOutput3; #define IDXGIOutput3_DuplicateOutput(This,pDevice,ppOutputDuplication) \ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) - #define IDXGIOutput3_SupportsOverlays(This) \ ( (This)->lpVtbl -> SupportsOverlays(This) ) - #define IDXGIOutput3_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutput3_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_3_0000_0008 */ /* [local] */ @@ -2104,7 +2000,6 @@ DEFINE_GUID(IID_IDXGIFactoryMedia,0x41e7d1f2,0xa591,0x4f7b,0xa2,0xe5,0xfa,0x9c,0 DEFINE_GUID(IID_IDXGISwapChainMedia,0xdd95b90b,0xf05f,0x4f6a,0xbd,0x65,0x25,0xbf,0xb2,0x64,0xbd,0x84); DEFINE_GUID(IID_IDXGIOutput3,0x8a6bb301,0x7e7e,0x41F4,0xa8,0xe0,0x5b,0x32,0xf7,0xf9,0x9b,0x18); - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0008_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0008_v0_0_s_ifspec; @@ -2117,5 +2012,3 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0008_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/dxgi1_4.h b/gfx/include/dxsdk/dxgi1_4.h index 5eae7849dc..93b0430716 100644 --- a/gfx/include/dxsdk/dxgi1_4.h +++ b/gfx/include/dxsdk/dxgi1_4.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,28 +41,24 @@ typedef interface IDXGISwapChain3 IDXGISwapChain3; #endif /* __IDXGISwapChain3_FWD_DEFINED__ */ - #ifndef __IDXGIOutput4_FWD_DEFINED__ #define __IDXGIOutput4_FWD_DEFINED__ typedef interface IDXGIOutput4 IDXGIOutput4; #endif /* __IDXGIOutput4_FWD_DEFINED__ */ - #ifndef __IDXGIFactory4_FWD_DEFINED__ #define __IDXGIFactory4_FWD_DEFINED__ typedef interface IDXGIFactory4 IDXGIFactory4; #endif /* __IDXGIFactory4_FWD_DEFINED__ */ - #ifndef __IDXGIAdapter3_FWD_DEFINED__ #define __IDXGIAdapter3_FWD_DEFINED__ typedef interface IDXGIAdapter3 IDXGIAdapter3; #endif /* __IDXGIAdapter3_FWD_DEFINED__ */ - /* header files for imported files */ #include "dxgi1_3.h" @@ -74,7 +66,6 @@ typedef interface IDXGIAdapter3 IDXGIAdapter3; extern "C"{ #endif - /* interface __MIDL_itf_dxgi1_4_0000_0000 */ /* [local] */ @@ -88,8 +79,6 @@ enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2 } DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0000_v0_0_s_ifspec; @@ -99,7 +88,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0000_v0_0_s_ifspec; /* interface IDXGISwapChain3 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISwapChain3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -388,7 +376,6 @@ EXTERN_C const IID IID_IDXGISwapChain3; #ifdef COBJMACROS - #define IDXGISwapChain3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -398,7 +385,6 @@ EXTERN_C const IID IID_IDXGISwapChain3; #define IDXGISwapChain3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISwapChain3_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -411,11 +397,9 @@ EXTERN_C const IID IID_IDXGISwapChain3; #define IDXGISwapChain3_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISwapChain3_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISwapChain3_Present(This,SyncInterval,Flags) \ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) @@ -446,7 +430,6 @@ EXTERN_C const IID IID_IDXGISwapChain3; #define IDXGISwapChain3_GetLastPresentCount(This,pLastPresentCount) \ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) - #define IDXGISwapChain3_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) @@ -480,7 +463,6 @@ EXTERN_C const IID IID_IDXGISwapChain3; #define IDXGISwapChain3_GetRotation(This,pRotation) \ ( (This)->lpVtbl -> GetRotation(This,pRotation) ) - #define IDXGISwapChain3_SetSourceSize(This,Width,Height) \ ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) ) @@ -502,7 +484,6 @@ EXTERN_C const IID IID_IDXGISwapChain3; #define IDXGISwapChain3_GetMatrixTransform(This,pMatrix) \ ( (This)->lpVtbl -> GetMatrixTransform(This,pMatrix) ) - #define IDXGISwapChain3_GetCurrentBackBufferIndex(This) \ ( (This)->lpVtbl -> GetCurrentBackBufferIndex(This) ) @@ -517,15 +498,10 @@ EXTERN_C const IID IID_IDXGISwapChain3; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISwapChain3_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_4_0000_0001 */ /* [local] */ @@ -535,8 +511,6 @@ enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1 } DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0001_v0_0_s_ifspec; @@ -546,7 +520,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0001_v0_0_s_ifspec; /* interface IDXGIOutput4 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutput4; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -747,7 +720,6 @@ EXTERN_C const IID IID_IDXGIOutput4; #ifdef COBJMACROS - #define IDXGIOutput4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -757,7 +729,6 @@ EXTERN_C const IID IID_IDXGIOutput4; #define IDXGIOutput4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutput4_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -770,7 +741,6 @@ EXTERN_C const IID IID_IDXGIOutput4; #define IDXGIOutput4_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutput4_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -807,7 +777,6 @@ EXTERN_C const IID IID_IDXGIOutput4; #define IDXGIOutput4_GetFrameStatistics(This,pStats) \ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) - #define IDXGIOutput4_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) @@ -820,36 +789,27 @@ EXTERN_C const IID IID_IDXGIOutput4; #define IDXGIOutput4_DuplicateOutput(This,pDevice,ppOutputDuplication) \ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) - #define IDXGIOutput4_SupportsOverlays(This) \ ( (This)->lpVtbl -> SupportsOverlays(This) ) - #define IDXGIOutput4_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) - #define IDXGIOutput4_CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) \ ( (This)->lpVtbl -> CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutput4_INTERFACE_DEFINED__ */ - #ifndef __IDXGIFactory4_INTERFACE_DEFINED__ #define __IDXGIFactory4_INTERFACE_DEFINED__ /* interface IDXGIFactory4 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIFactory4; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1086,7 +1046,6 @@ EXTERN_C const IID IID_IDXGIFactory4; #ifdef COBJMACROS - #define IDXGIFactory4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1096,7 +1055,6 @@ EXTERN_C const IID IID_IDXGIFactory4; #define IDXGIFactory4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIFactory4_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1109,7 +1067,6 @@ EXTERN_C const IID IID_IDXGIFactory4; #define IDXGIFactory4_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIFactory4_EnumAdapters(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) @@ -1125,14 +1082,12 @@ EXTERN_C const IID IID_IDXGIFactory4; #define IDXGIFactory4_CreateSoftwareAdapter(This,Module,ppAdapter) \ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) - #define IDXGIFactory4_EnumAdapters1(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) #define IDXGIFactory4_IsCurrent(This) \ ( (This)->lpVtbl -> IsCurrent(This) ) - #define IDXGIFactory4_IsWindowedStereoEnabled(This) \ ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) @@ -1166,11 +1121,9 @@ EXTERN_C const IID IID_IDXGIFactory4; #define IDXGIFactory4_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) - #define IDXGIFactory4_GetCreationFlags(This) \ ( (This)->lpVtbl -> GetCreationFlags(This) ) - #define IDXGIFactory4_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) \ ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) @@ -1179,15 +1132,10 @@ EXTERN_C const IID IID_IDXGIFactory4; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIFactory4_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_4_0000_0003 */ /* [local] */ @@ -1206,8 +1154,6 @@ typedef struct DXGI_QUERY_VIDEO_MEMORY_INFO UINT64 CurrentReservation; } DXGI_QUERY_VIDEO_MEMORY_INFO; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0003_v0_0_s_ifspec; @@ -1217,7 +1163,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0003_v0_0_s_ifspec; /* interface IDXGIAdapter3 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIAdapter3; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1396,7 +1341,6 @@ EXTERN_C const IID IID_IDXGIAdapter3; #ifdef COBJMACROS - #define IDXGIAdapter3_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1406,7 +1350,6 @@ EXTERN_C const IID IID_IDXGIAdapter3; #define IDXGIAdapter3_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIAdapter3_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1419,7 +1362,6 @@ EXTERN_C const IID IID_IDXGIAdapter3; #define IDXGIAdapter3_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIAdapter3_EnumOutputs(This,Output,ppOutput) \ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) @@ -1429,15 +1371,12 @@ EXTERN_C const IID IID_IDXGIAdapter3; #define IDXGIAdapter3_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) - #define IDXGIAdapter3_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) - #define IDXGIAdapter3_GetDesc2(This,pDesc) \ ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) - #define IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) \ ( (This)->lpVtbl -> RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) ) @@ -1458,15 +1397,10 @@ EXTERN_C const IID IID_IDXGIAdapter3; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIAdapter3_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_4_0000_0004 */ /* [local] */ @@ -1477,7 +1411,6 @@ DEFINE_GUID(IID_IDXGIOutput4,0xdc7dca35,0x2196,0x414d,0x9F,0x53,0x61,0x78,0x84,0 DEFINE_GUID(IID_IDXGIFactory4,0x1bc6ea02,0xef36,0x464f,0xbf,0x0c,0x21,0xca,0x39,0xe5,0x16,0x8a); DEFINE_GUID(IID_IDXGIAdapter3,0x645967A4,0x1392,0x4310,0xA7,0x98,0x80,0x53,0xCE,0x3E,0x93,0xFD); - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0004_v0_0_s_ifspec; @@ -1490,5 +1423,3 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_4_0000_0004_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/dxgi1_5.h b/gfx/include/dxsdk/dxgi1_5.h index f9d8257d5c..2a1de48307 100644 --- a/gfx/include/dxsdk/dxgi1_5.h +++ b/gfx/include/dxsdk/dxgi1_5.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,28 +41,24 @@ typedef interface IDXGIOutput5 IDXGIOutput5; #endif /* __IDXGIOutput5_FWD_DEFINED__ */ - #ifndef __IDXGISwapChain4_FWD_DEFINED__ #define __IDXGISwapChain4_FWD_DEFINED__ typedef interface IDXGISwapChain4 IDXGISwapChain4; #endif /* __IDXGISwapChain4_FWD_DEFINED__ */ - #ifndef __IDXGIDevice4_FWD_DEFINED__ #define __IDXGIDevice4_FWD_DEFINED__ typedef interface IDXGIDevice4 IDXGIDevice4; #endif /* __IDXGIDevice4_FWD_DEFINED__ */ - #ifndef __IDXGIFactory5_FWD_DEFINED__ #define __IDXGIFactory5_FWD_DEFINED__ typedef interface IDXGIFactory5 IDXGIFactory5; #endif /* __IDXGIFactory5_FWD_DEFINED__ */ - /* header files for imported files */ #include "dxgi1_4.h" @@ -74,7 +66,6 @@ typedef interface IDXGIFactory5 IDXGIFactory5; extern "C"{ #endif - /* interface __MIDL_itf_dxgi1_5_0000_0000 */ /* [local] */ @@ -87,8 +78,6 @@ enum DXGI_OUTDUPL_FLAG DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY = 1 } DXGI_OUTDUPL_FLAG; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0000_v0_0_s_ifspec; @@ -98,7 +87,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0000_v0_0_s_ifspec; /* interface IDXGIOutput5 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutput5; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -312,7 +300,6 @@ EXTERN_C const IID IID_IDXGIOutput5; #ifdef COBJMACROS - #define IDXGIOutput5_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -322,7 +309,6 @@ EXTERN_C const IID IID_IDXGIOutput5; #define IDXGIOutput5_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutput5_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -335,7 +321,6 @@ EXTERN_C const IID IID_IDXGIOutput5; #define IDXGIOutput5_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutput5_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -372,7 +357,6 @@ EXTERN_C const IID IID_IDXGIOutput5; #define IDXGIOutput5_GetFrameStatistics(This,pStats) \ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) - #define IDXGIOutput5_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) @@ -385,33 +369,24 @@ EXTERN_C const IID IID_IDXGIOutput5; #define IDXGIOutput5_DuplicateOutput(This,pDevice,ppOutputDuplication) \ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) - #define IDXGIOutput5_SupportsOverlays(This) \ ( (This)->lpVtbl -> SupportsOverlays(This) ) - #define IDXGIOutput5_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) - #define IDXGIOutput5_CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) \ ( (This)->lpVtbl -> CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) ) - #define IDXGIOutput5_DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) \ ( (This)->lpVtbl -> DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutput5_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_5_0000_0001 */ /* [local] */ @@ -434,8 +409,6 @@ typedef struct DXGI_HDR_METADATA_HDR10 UINT16 MaxFrameAverageLightLevel; } DXGI_HDR_METADATA_HDR10; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0001_v0_0_s_ifspec; @@ -445,7 +418,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0001_v0_0_s_ifspec; /* interface IDXGISwapChain4 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGISwapChain4; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -723,7 +695,6 @@ EXTERN_C const IID IID_IDXGISwapChain4; #ifdef COBJMACROS - #define IDXGISwapChain4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -733,7 +704,6 @@ EXTERN_C const IID IID_IDXGISwapChain4; #define IDXGISwapChain4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGISwapChain4_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -746,11 +716,9 @@ EXTERN_C const IID IID_IDXGISwapChain4; #define IDXGISwapChain4_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGISwapChain4_GetDevice(This,riid,ppDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppDevice) ) - #define IDXGISwapChain4_Present(This,SyncInterval,Flags) \ ( (This)->lpVtbl -> Present(This,SyncInterval,Flags) ) @@ -781,7 +749,6 @@ EXTERN_C const IID IID_IDXGISwapChain4; #define IDXGISwapChain4_GetLastPresentCount(This,pLastPresentCount) \ ( (This)->lpVtbl -> GetLastPresentCount(This,pLastPresentCount) ) - #define IDXGISwapChain4_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) @@ -815,7 +782,6 @@ EXTERN_C const IID IID_IDXGISwapChain4; #define IDXGISwapChain4_GetRotation(This,pRotation) \ ( (This)->lpVtbl -> GetRotation(This,pRotation) ) - #define IDXGISwapChain4_SetSourceSize(This,Width,Height) \ ( (This)->lpVtbl -> SetSourceSize(This,Width,Height) ) @@ -837,7 +803,6 @@ EXTERN_C const IID IID_IDXGISwapChain4; #define IDXGISwapChain4_GetMatrixTransform(This,pMatrix) \ ( (This)->lpVtbl -> GetMatrixTransform(This,pMatrix) ) - #define IDXGISwapChain4_GetCurrentBackBufferIndex(This) \ ( (This)->lpVtbl -> GetCurrentBackBufferIndex(This) ) @@ -850,21 +815,15 @@ EXTERN_C const IID IID_IDXGISwapChain4; #define IDXGISwapChain4_ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) \ ( (This)->lpVtbl -> ResizeBuffers1(This,BufferCount,Width,Height,Format,SwapChainFlags,pCreationNodeMask,ppPresentQueue) ) - #define IDXGISwapChain4_SetHDRMetaData(This,Type,Size,pMetaData) \ ( (This)->lpVtbl -> SetHDRMetaData(This,Type,Size,pMetaData) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGISwapChain4_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_5_0000_0002 */ /* [local] */ @@ -882,8 +841,6 @@ enum _DXGI_RECLAIM_RESOURCE_RESULTS DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED = 2 } DXGI_RECLAIM_RESOURCE_RESULTS; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0002_v0_0_s_ifspec; @@ -893,7 +850,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0002_v0_0_s_ifspec; /* interface IDXGIDevice4 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIDevice4; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1072,7 +1028,6 @@ EXTERN_C const IID IID_IDXGIDevice4; #ifdef COBJMACROS - #define IDXGIDevice4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1082,7 +1037,6 @@ EXTERN_C const IID IID_IDXGIDevice4; #define IDXGIDevice4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDevice4_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1095,7 +1049,6 @@ EXTERN_C const IID IID_IDXGIDevice4; #define IDXGIDevice4_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIDevice4_GetAdapter(This,pAdapter) \ ( (This)->lpVtbl -> GetAdapter(This,pAdapter) ) @@ -1111,14 +1064,12 @@ EXTERN_C const IID IID_IDXGIDevice4; #define IDXGIDevice4_GetGPUThreadPriority(This,pPriority) \ ( (This)->lpVtbl -> GetGPUThreadPriority(This,pPriority) ) - #define IDXGIDevice4_SetMaximumFrameLatency(This,MaxLatency) \ ( (This)->lpVtbl -> SetMaximumFrameLatency(This,MaxLatency) ) #define IDXGIDevice4_GetMaximumFrameLatency(This,pMaxLatency) \ ( (This)->lpVtbl -> GetMaximumFrameLatency(This,pMaxLatency) ) - #define IDXGIDevice4_OfferResources(This,NumResources,ppResources,Priority) \ ( (This)->lpVtbl -> OfferResources(This,NumResources,ppResources,Priority) ) @@ -1128,11 +1079,9 @@ EXTERN_C const IID IID_IDXGIDevice4; #define IDXGIDevice4_EnqueueSetEvent(This,hEvent) \ ( (This)->lpVtbl -> EnqueueSetEvent(This,hEvent) ) - #define IDXGIDevice4_Trim(This) \ ( (This)->lpVtbl -> Trim(This) ) - #define IDXGIDevice4_OfferResources1(This,NumResources,ppResources,Priority,Flags) \ ( (This)->lpVtbl -> OfferResources1(This,NumResources,ppResources,Priority,Flags) ) @@ -1141,15 +1090,10 @@ EXTERN_C const IID IID_IDXGIDevice4; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDevice4_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_5_0000_0003 */ /* [local] */ @@ -1159,8 +1103,6 @@ enum DXGI_FEATURE DXGI_FEATURE_PRESENT_ALLOW_TEARING = 0 } DXGI_FEATURE; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0003_v0_0_s_ifspec; @@ -1170,7 +1112,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0003_v0_0_s_ifspec; /* interface IDXGIFactory5 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIFactory5; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -1406,7 +1347,6 @@ EXTERN_C const IID IID_IDXGIFactory5; #ifdef COBJMACROS - #define IDXGIFactory5_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -1416,7 +1356,6 @@ EXTERN_C const IID IID_IDXGIFactory5; #define IDXGIFactory5_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIFactory5_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -1429,7 +1368,6 @@ EXTERN_C const IID IID_IDXGIFactory5; #define IDXGIFactory5_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIFactory5_EnumAdapters(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) @@ -1445,14 +1383,12 @@ EXTERN_C const IID IID_IDXGIFactory5; #define IDXGIFactory5_CreateSoftwareAdapter(This,Module,ppAdapter) \ ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) - #define IDXGIFactory5_EnumAdapters1(This,Adapter,ppAdapter) \ ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) #define IDXGIFactory5_IsCurrent(This) \ ( (This)->lpVtbl -> IsCurrent(This) ) - #define IDXGIFactory5_IsWindowedStereoEnabled(This) \ ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) @@ -1486,32 +1422,24 @@ EXTERN_C const IID IID_IDXGIFactory5; #define IDXGIFactory5_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) - #define IDXGIFactory5_GetCreationFlags(This) \ ( (This)->lpVtbl -> GetCreationFlags(This) ) - #define IDXGIFactory5_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) \ ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) #define IDXGIFactory5_EnumWarpAdapter(This,riid,ppvAdapter) \ ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) ) - #define IDXGIFactory5_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIFactory5_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_5_0000_0004 */ /* [local] */ @@ -1522,7 +1450,6 @@ DEFINE_GUID(IID_IDXGISwapChain4,0x3D585D5A,0xBD4A,0x489E,0xB1,0xF4,0x3D,0xBC,0xB DEFINE_GUID(IID_IDXGIDevice4,0x95B4F95F,0xD8DA,0x4CA4,0x9E,0xE6,0x3B,0x76,0xD5,0x96,0x8A,0x10); DEFINE_GUID(IID_IDXGIFactory5,0x7632e1f5,0xee65,0x4dca,0x87,0xfd,0x84,0xcd,0x75,0xf8,0x83,0x8d); - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0004_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0004_v0_0_s_ifspec; @@ -1535,5 +1462,3 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0004_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/dxgi1_6.h b/gfx/include/dxsdk/dxgi1_6.h index a23db170d7..55544bde15 100644 --- a/gfx/include/dxsdk/dxgi1_6.h +++ b/gfx/include/dxsdk/dxgi1_6.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,14 +41,12 @@ typedef interface IDXGIAdapter4 IDXGIAdapter4; #endif /* __IDXGIAdapter4_FWD_DEFINED__ */ - #ifndef __IDXGIOutput6_FWD_DEFINED__ #define __IDXGIOutput6_FWD_DEFINED__ typedef interface IDXGIOutput6 IDXGIOutput6; #endif /* __IDXGIOutput6_FWD_DEFINED__ */ - /* header files for imported files */ #include "dxgi1_5.h" @@ -60,7 +54,6 @@ typedef interface IDXGIOutput6 IDXGIOutput6; extern "C"{ #endif - /* interface __MIDL_itf_dxgi1_6_0000_0000 */ /* [local] */ @@ -98,8 +91,6 @@ typedef struct DXGI_ADAPTER_DESC3 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity; } DXGI_ADAPTER_DESC3; - - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0000_v0_0_s_ifspec; @@ -109,7 +100,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0000_v0_0_s_ifspec; /* interface IDXGIAdapter4 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIAdapter4; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -261,7 +251,6 @@ EXTERN_C const IID IID_IDXGIAdapter4; #ifdef COBJMACROS - #define IDXGIAdapter4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -271,7 +260,6 @@ EXTERN_C const IID IID_IDXGIAdapter4; #define IDXGIAdapter4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIAdapter4_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -284,7 +272,6 @@ EXTERN_C const IID IID_IDXGIAdapter4; #define IDXGIAdapter4_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIAdapter4_EnumOutputs(This,Output,ppOutput) \ ( (This)->lpVtbl -> EnumOutputs(This,Output,ppOutput) ) @@ -294,15 +281,12 @@ EXTERN_C const IID IID_IDXGIAdapter4; #define IDXGIAdapter4_CheckInterfaceSupport(This,InterfaceName,pUMDVersion) \ ( (This)->lpVtbl -> CheckInterfaceSupport(This,InterfaceName,pUMDVersion) ) - #define IDXGIAdapter4_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) - #define IDXGIAdapter4_GetDesc2(This,pDesc) \ ( (This)->lpVtbl -> GetDesc2(This,pDesc) ) - #define IDXGIAdapter4_RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) \ ( (This)->lpVtbl -> RegisterHardwareContentProtectionTeardownStatusEvent(This,hEvent,pdwCookie) ) @@ -321,21 +305,15 @@ EXTERN_C const IID IID_IDXGIAdapter4; #define IDXGIAdapter4_UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) \ ( (This)->lpVtbl -> UnregisterVideoMemoryBudgetChangeNotification(This,dwCookie) ) - #define IDXGIAdapter4_GetDesc3(This,pDesc) \ ( (This)->lpVtbl -> GetDesc3(This,pDesc) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIAdapter4_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_6_0000_0001 */ /* [local] */ @@ -367,7 +345,6 @@ enum DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS DEFINE_ENUM_FLAG_OPERATORS( DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS ); - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0001_v0_0_s_ifspec; @@ -377,7 +354,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0001_v0_0_s_ifspec; /* interface IDXGIOutput6 */ /* [unique][local][uuid][object] */ - EXTERN_C const IID IID_IDXGIOutput6; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -598,7 +574,6 @@ EXTERN_C const IID IID_IDXGIOutput6; #ifdef COBJMACROS - #define IDXGIOutput6_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -608,7 +583,6 @@ EXTERN_C const IID IID_IDXGIOutput6; #define IDXGIOutput6_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIOutput6_SetPrivateData(This,Name,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) @@ -621,7 +595,6 @@ EXTERN_C const IID IID_IDXGIOutput6; #define IDXGIOutput6_GetParent(This,riid,ppParent) \ ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) - #define IDXGIOutput6_GetDesc(This,pDesc) \ ( (This)->lpVtbl -> GetDesc(This,pDesc) ) @@ -658,7 +631,6 @@ EXTERN_C const IID IID_IDXGIOutput6; #define IDXGIOutput6_GetFrameStatistics(This,pStats) \ ( (This)->lpVtbl -> GetFrameStatistics(This,pStats) ) - #define IDXGIOutput6_GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) \ ( (This)->lpVtbl -> GetDisplayModeList1(This,EnumFormat,Flags,pNumModes,pDesc) ) @@ -671,23 +643,18 @@ EXTERN_C const IID IID_IDXGIOutput6; #define IDXGIOutput6_DuplicateOutput(This,pDevice,ppOutputDuplication) \ ( (This)->lpVtbl -> DuplicateOutput(This,pDevice,ppOutputDuplication) ) - #define IDXGIOutput6_SupportsOverlays(This) \ ( (This)->lpVtbl -> SupportsOverlays(This) ) - #define IDXGIOutput6_CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) \ ( (This)->lpVtbl -> CheckOverlaySupport(This,EnumFormat,pConcernedDevice,pFlags) ) - #define IDXGIOutput6_CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) \ ( (This)->lpVtbl -> CheckOverlayColorSpaceSupport(This,Format,ColorSpace,pConcernedDevice,pFlags) ) - #define IDXGIOutput6_DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) \ ( (This)->lpVtbl -> DuplicateOutput1(This,pDevice,Flags,SupportedFormatsCount,pSupportedFormats,ppOutputDuplication) ) - #define IDXGIOutput6_GetDesc1(This,pDesc) \ ( (This)->lpVtbl -> GetDesc1(This,pDesc) ) @@ -696,15 +663,10 @@ EXTERN_C const IID IID_IDXGIOutput6; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIOutput6_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgi1_6_0000_0002 */ /* [local] */ @@ -713,7 +675,6 @@ EXTERN_C const IID IID_IDXGIOutput6; DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e); DEFINE_GUID(IID_IDXGIOutput6,0x068346e8,0xaaec,0x4b84,0xad,0xd7,0x13,0x7f,0x51,0x3f,0x77,0xa1); - extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_s_ifspec; @@ -726,5 +687,3 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/dxgicommon.h b/gfx/include/dxsdk/dxgicommon.h index bdeab3217f..58af149cd0 100644 --- a/gfx/include/dxsdk/dxgicommon.h +++ b/gfx/include/dxsdk/dxgicommon.h @@ -5,7 +5,6 @@ #ifndef __dxgicommon_h__ #define __dxgicommon_h__ - typedef struct DXGI_RATIONAL { UINT Numerator; @@ -53,4 +52,3 @@ typedef enum DXGI_COLOR_SPACE_TYPE } DXGI_COLOR_SPACE_TYPE; #endif // __dxgicommon_h__ - diff --git a/gfx/include/dxsdk/dxgidebug.h b/gfx/include/dxsdk/dxgidebug.h index 9a561ad31c..ae2077055e 100644 --- a/gfx/include/dxsdk/dxgidebug.h +++ b/gfx/include/dxsdk/dxgidebug.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,21 +41,18 @@ typedef interface IDXGIInfoQueue IDXGIInfoQueue; #endif /* __IDXGIInfoQueue_FWD_DEFINED__ */ - #ifndef __IDXGIDebug_FWD_DEFINED__ #define __IDXGIDebug_FWD_DEFINED__ typedef interface IDXGIDebug IDXGIDebug; #endif /* __IDXGIDebug_FWD_DEFINED__ */ - #ifndef __IDXGIDebug1_FWD_DEFINED__ #define __IDXGIDebug1_FWD_DEFINED__ typedef interface IDXGIDebug1 IDXGIDebug1; #endif /* __IDXGIDebug1_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -68,7 +61,6 @@ typedef interface IDXGIDebug1 IDXGIDebug1; extern "C"{ #endif - /* interface __MIDL_itf_dxgidebug_0000_0000 */ /* [local] */ @@ -154,7 +146,6 @@ typedef struct DXGI_INFO_QUEUE_FILTER #define DXGI_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 HRESULT WINAPI DXGIGetDebugInterface(REFIID riid, void **ppDebug); - extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0000_v0_0_s_ifspec; @@ -164,7 +155,6 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0000_v0_0_s_ifspec; /* interface IDXGIInfoQueue */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_IDXGIInfoQueue; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -647,7 +637,6 @@ EXTERN_C const IID IID_IDXGIInfoQueue; #ifdef COBJMACROS - #define IDXGIInfoQueue_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -657,7 +646,6 @@ EXTERN_C const IID IID_IDXGIInfoQueue; #define IDXGIInfoQueue_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIInfoQueue_SetMessageCountLimit(This,Producer,MessageCountLimit) \ ( (This)->lpVtbl -> SetMessageCountLimit(This,Producer,MessageCountLimit) ) @@ -771,22 +759,16 @@ EXTERN_C const IID IID_IDXGIInfoQueue; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIInfoQueue_INTERFACE_DEFINED__ */ - #ifndef __IDXGIDebug_INTERFACE_DEFINED__ #define __IDXGIDebug_INTERFACE_DEFINED__ /* interface IDXGIDebug */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_IDXGIDebug; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -837,7 +819,6 @@ EXTERN_C const IID IID_IDXGIDebug; #ifdef COBJMACROS - #define IDXGIDebug_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -847,28 +828,21 @@ EXTERN_C const IID IID_IDXGIDebug; #define IDXGIDebug_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDebug_ReportLiveObjects(This,apiid,flags) \ ( (This)->lpVtbl -> ReportLiveObjects(This,apiid,flags) ) #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDebug_INTERFACE_DEFINED__ */ - #ifndef __IDXGIDebug1_INTERFACE_DEFINED__ #define __IDXGIDebug1_INTERFACE_DEFINED__ /* interface IDXGIDebug1 */ /* [unique][local][object][uuid] */ - EXTERN_C const IID IID_IDXGIDebug1; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -930,7 +904,6 @@ EXTERN_C const IID IID_IDXGIDebug1; #ifdef COBJMACROS - #define IDXGIDebug1_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -940,11 +913,9 @@ EXTERN_C const IID IID_IDXGIDebug1; #define IDXGIDebug1_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IDXGIDebug1_ReportLiveObjects(This,apiid,flags) \ ( (This)->lpVtbl -> ReportLiveObjects(This,apiid,flags) ) - #define IDXGIDebug1_EnableLeakTrackingForThread(This) \ ( (This)->lpVtbl -> EnableLeakTrackingForThread(This) ) @@ -956,15 +927,10 @@ EXTERN_C const IID IID_IDXGIDebug1; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IDXGIDebug1_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_dxgidebug_0000_0003 */ /* [local] */ @@ -978,7 +944,6 @@ DEFINE_GUID(IID_IDXGIInfoQueue,0xD67441C7,0x672A,0x476f,0x9E,0x82,0xCD,0x55,0xB4 DEFINE_GUID(IID_IDXGIDebug,0x119E7452,0xDE9E,0x40fe,0x88,0x06,0x88,0xF9,0x0C,0x12,0xB4,0x41); DEFINE_GUID(IID_IDXGIDebug1,0xc5a05f0c,0x16f2,0x4adf,0x9f,0x4d,0xa8,0xc4,0xd5,0x8a,0xc5,0x50); - extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0003_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0003_v0_0_s_ifspec; @@ -991,5 +956,3 @@ extern RPC_IF_HANDLE __MIDL_itf_dxgidebug_0000_0003_v0_0_s_ifspec; #endif #endif - - diff --git a/gfx/include/dxsdk/dxgiformat.h b/gfx/include/dxsdk/dxgiformat.h index 4159caba4b..7eeb6c6ecc 100644 --- a/gfx/include/dxsdk/dxgiformat.h +++ b/gfx/include/dxsdk/dxgiformat.h @@ -130,7 +130,6 @@ typedef enum DXGI_FORMAT DXGI_FORMAT_V208 = 131, DXGI_FORMAT_V408 = 132, - DXGI_FORMAT_FORCE_UINT = 0xffffffff } DXGI_FORMAT; diff --git a/gfx/include/dxsdk/dxgitype.h b/gfx/include/dxsdk/dxgitype.h index d3a698b5a1..8d0d9b98d5 100644 --- a/gfx/include/dxsdk/dxgitype.h +++ b/gfx/include/dxsdk/dxgitype.h @@ -51,7 +51,6 @@ #define DXGI_CPU_ACCESS_SCRATCH ( 3 ) #define DXGI_CPU_ACCESS_FIELD 15 - typedef struct DXGI_RGB { float Red; @@ -140,4 +139,3 @@ typedef struct DXGI_JPEG_QUANTIZATION_TABLE } DXGI_JPEG_QUANTIZATION_TABLE; #endif // __dxgitype_h__ - diff --git a/gfx/include/dxsdk/dxsdkver.h b/gfx/include/dxsdk/dxsdkver.h index 7d88bbbb03..4351e14303 100644 --- a/gfx/include/dxsdk/dxsdkver.h +++ b/gfx/include/dxsdk/dxsdkver.h @@ -15,4 +15,3 @@ #define _DXSDK_BUILD_MINOR 0 #endif // _DXSDKVER_H_ - diff --git a/gfx/include/dxsdk/gameux.h b/gfx/include/dxsdk/gameux.h index 5065960d7f..bee2e2d8d0 100644 --- a/gfx/include/dxsdk/gameux.h +++ b/gfx/include/dxsdk/gameux.h @@ -1,13 +1,9 @@ - /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ - - /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 @@ -45,28 +41,24 @@ typedef interface IGameExplorer IGameExplorer; #endif /* __IGameExplorer_FWD_DEFINED__ */ - #ifndef __IGameStatistics_FWD_DEFINED__ #define __IGameStatistics_FWD_DEFINED__ typedef interface IGameStatistics IGameStatistics; #endif /* __IGameStatistics_FWD_DEFINED__ */ - #ifndef __IGameStatisticsMgr_FWD_DEFINED__ #define __IGameStatisticsMgr_FWD_DEFINED__ typedef interface IGameStatisticsMgr IGameStatisticsMgr; #endif /* __IGameStatisticsMgr_FWD_DEFINED__ */ - #ifndef __IGameExplorer2_FWD_DEFINED__ #define __IGameExplorer2_FWD_DEFINED__ typedef interface IGameExplorer2 IGameExplorer2; #endif /* __IGameExplorer2_FWD_DEFINED__ */ - #ifndef __GameExplorer_FWD_DEFINED__ #define __GameExplorer_FWD_DEFINED__ @@ -78,7 +70,6 @@ typedef struct GameExplorer GameExplorer; #endif /* __GameExplorer_FWD_DEFINED__ */ - #ifndef __GameStatistics_FWD_DEFINED__ #define __GameStatistics_FWD_DEFINED__ @@ -90,7 +81,6 @@ typedef struct GameStatistics GameStatistics; #endif /* __GameStatistics_FWD_DEFINED__ */ - /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" @@ -100,7 +90,6 @@ typedef struct GameStatistics GameStatistics; extern "C"{ #endif - /* interface __MIDL_itf_gameux_0000_0000 */ /* [local] */ @@ -120,8 +109,6 @@ enum GAME_INSTALL_SCOPE GIS_ALL_USERS = 3 } GAME_INSTALL_SCOPE; - - extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0000_v0_0_s_ifspec; @@ -131,7 +118,6 @@ extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0000_v0_0_s_ifspec; /* interface IGameExplorer */ /* [unique][helpstring][uuid][object] */ - EXTERN_C const IID IID_IGameExplorer; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -209,7 +195,6 @@ EXTERN_C const IID IID_IGameExplorer; #ifdef COBJMACROS - #define IGameExplorer_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -219,7 +204,6 @@ EXTERN_C const IID IID_IGameExplorer; #define IGameExplorer_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IGameExplorer_AddGame(This,bstrGDFBinaryPath,bstrGameInstallDirectory,installScope,pguidInstanceID) \ ( (This)->lpVtbl -> AddGame(This,bstrGDFBinaryPath,bstrGameInstallDirectory,installScope,pguidInstanceID) ) @@ -234,15 +218,10 @@ EXTERN_C const IID IID_IGameExplorer; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IGameExplorer_INTERFACE_DEFINED__ */ - /* interface __MIDL_itf_gameux_0000_0001 */ /* [local] */ @@ -260,8 +239,6 @@ enum GAMESTATS_OPEN_RESULT GAMESTATS_OPEN_OPENED = 1 } GAMESTATS_OPEN_RESULT; - - extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0001_v0_0_s_ifspec; @@ -271,7 +248,6 @@ extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0001_v0_0_s_ifspec; /* interface IGameStatistics */ /* [unique][helpstring][uuid][object] */ - EXTERN_C const IID IID_IGameStatistics; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -413,7 +389,6 @@ EXTERN_C const IID IID_IGameStatistics; #ifdef COBJMACROS - #define IGameStatistics_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -423,7 +398,6 @@ EXTERN_C const IID IID_IGameStatistics; #define IGameStatistics_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IGameStatistics_GetMaxCategoryLength(This,cch) \ ( (This)->lpVtbl -> GetMaxCategoryLength(This,cch) ) @@ -462,22 +436,16 @@ EXTERN_C const IID IID_IGameStatistics; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IGameStatistics_INTERFACE_DEFINED__ */ - #ifndef __IGameStatisticsMgr_INTERFACE_DEFINED__ #define __IGameStatisticsMgr_INTERFACE_DEFINED__ /* interface IGameStatisticsMgr */ /* [unique][helpstring][uuid][object] */ - EXTERN_C const IID IID_IGameStatisticsMgr; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -539,7 +507,6 @@ EXTERN_C const IID IID_IGameStatisticsMgr; #ifdef COBJMACROS - #define IGameStatisticsMgr_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -549,7 +516,6 @@ EXTERN_C const IID IID_IGameStatisticsMgr; #define IGameStatisticsMgr_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IGameStatisticsMgr_GetGameStatistics(This,GDFBinaryPath,openType,pOpenResult,ppiStats) \ ( (This)->lpVtbl -> GetGameStatistics(This,GDFBinaryPath,openType,pOpenResult,ppiStats) ) @@ -558,22 +524,16 @@ EXTERN_C const IID IID_IGameStatisticsMgr; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IGameStatisticsMgr_INTERFACE_DEFINED__ */ - #ifndef __IGameExplorer2_INTERFACE_DEFINED__ #define __IGameExplorer2_INTERFACE_DEFINED__ /* interface IGameExplorer2 */ /* [unique][helpstring][uuid][object] */ - EXTERN_C const IID IID_IGameExplorer2; #if defined(__cplusplus) && !defined(CINTERFACE) @@ -642,7 +602,6 @@ EXTERN_C const IID IID_IGameExplorer2; #ifdef COBJMACROS - #define IGameExplorer2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) @@ -652,7 +611,6 @@ EXTERN_C const IID IID_IGameExplorer2; #define IGameExplorer2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) - #define IGameExplorer2_InstallGame(This,binaryGDFPath,installDirectory,installScope) \ ( (This)->lpVtbl -> InstallGame(This,binaryGDFPath,installDirectory,installScope) ) @@ -664,23 +622,16 @@ EXTERN_C const IID IID_IGameExplorer2; #endif /* COBJMACROS */ - #endif /* C style interface */ - - - #endif /* __IGameExplorer2_INTERFACE_DEFINED__ */ - - #ifndef __gameuxLib_LIBRARY_DEFINED__ #define __gameuxLib_LIBRARY_DEFINED__ /* library gameuxLib */ /* [helpstring][version][uuid] */ - EXTERN_C const IID LIBID_gameuxLib; EXTERN_C const CLSID CLSID_GameExplorer; @@ -706,7 +657,6 @@ GameStatistics; #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ #pragma endregion - extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0005_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_gameux_0000_0005_v0_0_s_ifspec; @@ -729,5 +679,3 @@ void __RPC_USER BSTR_UserFree64( __RPC__in unsigned lo #endif #endif - - diff --git a/gfx/include/dxsdk/pixplugin.h b/gfx/include/dxsdk/pixplugin.h index 9c249afc0a..297598b1d8 100644 --- a/gfx/include/dxsdk/pixplugin.h +++ b/gfx/include/dxsdk/pixplugin.h @@ -13,19 +13,16 @@ extern "C" { #endif - //================================================================================================== // PIX_PLUGIN_SYSTEM_VERSION - Indicates version of the plugin interface the plugin is built with. //================================================================================================== #define PIX_PLUGIN_SYSTEM_VERSION 0x101 - //================================================================================================== // PIXCOUNTERID - A unique identifier for each PIX plugin counter. //================================================================================================== typedef int PIXCOUNTERID; - //================================================================================================== // PIXCOUNTERDATATYPE - Indicates what type of data the counter produces. //================================================================================================== @@ -38,7 +35,6 @@ enum PIXCOUNTERDATATYPE PCDT_STRING, }; - //================================================================================================== // PIXPLUGININFO - This structure is filled out by PIXGetPluginInfo and passed back to PIX. //================================================================================================== @@ -53,7 +49,6 @@ struct PIXPLUGININFO int iPluginSystemVersion; // Version of PIX's plugin system this plugin was designed for }; - //================================================================================================== // PIXCOUNTERINFO - This structure is filled out by PIXGetCounterInfo and passed back to PIX // to allow PIX to determine information about the counters in the plugin. @@ -65,13 +60,11 @@ struct PIXCOUNTERINFO PIXCOUNTERDATATYPE pcdtDataType; // Data type returned by this counter }; - //================================================================================================== // PIXGetPluginInfo - This returns basic information about this plugin to PIX. //================================================================================================== BOOL WINAPI PIXGetPluginInfo( PIXPLUGININFO* pPIXPluginInfo ); - //================================================================================================== // PIXGetCounterInfo - This returns an array of PIXCOUNTERINFO structs to PIX. // These PIXCOUNTERINFOs allow PIX to enumerate the counters contained @@ -79,19 +72,16 @@ BOOL WINAPI PIXGetPluginInfo( PIXPLUGININFO* pPIXPluginInfo ); //================================================================================================== BOOL WINAPI PIXGetCounterInfo( DWORD* pdwReturnCounters, PIXCOUNTERINFO** ppCounterInfoList ); - //================================================================================================== // PIXGetCounterDesc - This is called by PIX to request a description of the indicated counter. //================================================================================================== BOOL WINAPI PIXGetCounterDesc( PIXCOUNTERID id, WCHAR** ppstrCounterDesc ); - //================================================================================================== // PIXBeginExperiment - This called by PIX once per counter when instrumentation starts. //================================================================================================== BOOL WINAPI PIXBeginExperiment( PIXCOUNTERID id, const WCHAR* pstrApplication ); - //================================================================================================== // PIXEndFrame - This is called by PIX once per counter at the end of each frame to gather the // counter value for that frame. Note that the pointer to the return data must @@ -103,13 +93,11 @@ BOOL WINAPI PIXBeginExperiment( PIXCOUNTERID id, const WCHAR* pstrApplication ); //================================================================================================== BOOL WINAPI PIXEndFrame( PIXCOUNTERID id, UINT iFrame, DWORD* pdwReturnBytes, BYTE** ppReturnData ); - //================================================================================================== // PIXEndExperiment - This is called by PIX once per counter when instrumentation ends. //================================================================================================== BOOL WINAPI PIXEndExperiment( PIXCOUNTERID id ); - #ifdef __cplusplus }; #endif @@ -117,4 +105,3 @@ BOOL WINAPI PIXEndExperiment( PIXCOUNTERID id ); //================================================================================================== // eof: PIXPlugin.h //================================================================================================== - diff --git a/gfx/include/dxsdk/rmxfguid.h b/gfx/include/dxsdk/rmxfguid.h index d3326ccc9a..5be04ddd20 100644 --- a/gfx/include/dxsdk/rmxfguid.h +++ b/gfx/include/dxsdk/rmxfguid.h @@ -220,4 +220,3 @@ DEFINE_GUID(TID_D3DRMRightHanded, 0x7f5d5ea0, 0xd53a, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); #endif /* __RMXFGUID_H_ */ - diff --git a/gfx/include/dxsdk/rpcsal.h b/gfx/include/dxsdk/rpcsal.h index 7e6c69c245..254acc867b 100644 --- a/gfx/include/dxsdk/rpcsal.h +++ b/gfx/include/dxsdk/rpcsal.h @@ -147,12 +147,10 @@ #endif #endif - #ifdef __cplusplus extern "C" { #endif // #ifdef __cplusplus - #ifndef _SAL1_2_Source_ #define _SAL1_2_Source_(Name, args, annotes) _SA_annotes3(SAL_name, #Name, "", "1.2") _Group_(annotes _SAL_nop_impl_) #endif // _SAL1_2_Source_ @@ -169,7 +167,6 @@ extern "C" { #define __RPC__in_xcount_full_string(size) _SAL1_2_Source_(__RPC__in_xcount_full_string, (size), __RPC__in_ecount_full(size) _Pre_ _Null_terminated_) #define __RPC__in_xcount_part(size, length) _SAL1_2_Source_(__RPC__in_xcount_part, (size,length), __RPC__in_ecount(length) _Pre_writable_size_(size)) - #define __RPC__deref_in _SAL1_2_Source_(__RPC__deref_in, (), __RPC__in _At_(*_Curr_, _Pre_ _Notnull_)) #define __RPC__deref_in_string _SAL1_2_Source_(__RPC__deref_in_string, (), __RPC__deref_in _At_(*_Curr_, _Pre_ _Null_terminated_)) #define __RPC__deref_in_opt _SAL1_2_Source_(__RPC__deref_in_opt, (), __RPC__in _At_(*_Curr_, _Pre_ _Maybenull_)) @@ -280,7 +277,6 @@ extern "C" { #define __RPC__deref_inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_string, (size), __RPC__deref_inout _At_(*_Curr_, _Post_ _Null_terminated_)) #define __RPC__deref_inout_xcount_full_opt_string(size) _SAL1_2_Source_(__RPC__deref_inout_xcount_full_opt_string, (size), __RPC__deref_inout_opt _At_(*_Curr_, _Pre_ _Null_terminated_ _Post_ _Null_terminated_)) - // #define __RPC_out_opt out_opt is not allowed in rpc // [in,out,unique] @@ -294,7 +290,6 @@ extern "C" { #define __RPC__deref_opt_inout_xcount_full(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full, (size), __RPC__deref_opt_inout) #define __RPC__deref_opt_inout_xcount_full_string(size) _SAL1_2_Source_(__RPC__deref_opt_inout_xcount_full_string, (size), __RPC__deref_opt_inout_string) - #define __RPC__deref_out_ecount_opt(size) _SAL1_2_Source_(__RPC__deref_out_ecount_opt, (size), _Outptr_result_buffer_maybenull_(size) _At_(*_Curr_, _Pre_maybenull_)) #define __RPC__deref_out_ecount_part_opt(size, length) _SAL1_2_Source_(__RPC__deref_out_ecount_part_opt, (size,length), _Outptr_result_buffer_to_maybenull_(size, length) _At_(*_Curr_, _Pre_maybenull_)) #define __RPC__deref_out_ecount_full_opt(size) _SAL1_2_Source_(__RPC__deref_out_ecount_full_opt, (size), __RPC__deref_out_ecount_part_opt(size, size)) @@ -323,8 +318,6 @@ extern "C" { #define __RPC__range(min,max) _SAL1_2_Source_(__RPC__range, (min,max), __range(min,max)) #define __RPC__in_range(min,max) _SAL1_2_Source_(__RPC__in_range, (min,max), _In_range_(min,max)) - #ifdef __cplusplus } #endif - diff --git a/gfx/include/dxsdk/xapo.h b/gfx/include/dxsdk/xapo.h index 83481a9a3d..159d055d14 100644 --- a/gfx/include/dxsdk/xapo.h +++ b/gfx/include/dxsdk/xapo.h @@ -103,7 +103,6 @@ interface __declspec(uuid("A410B984-9839-4819-A0BE-2856AE6B3ADB")) IXAPO; interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParameters; - #if !defined(GUID_DEFS_ONLY) // ignore rest if only GUID definitions requested #include #include @@ -124,7 +123,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete // unicode string length, including terminator, used with XAPO_REGISTRATION_PROPERTIES #define XAPO_REGISTRATION_STRING_LENGTH 256 - // XAPO property flags, used with XAPO_REGISTRATION_PROPERTIES.Flags: // Number of channels of input and output buffers must match, // applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.pFormat. @@ -178,11 +176,9 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete // in-place processing when possible. #define XAPO_FLAG_INPLACE_SUPPORTED 0x00000010 - //-----------------------------------------------------// #pragma pack(push, 1) // set packing alignment to ensure consistency across arbitrary build environments - // XAPO registration properties, describes general XAPO characteristics, used with IXAPO::GetRegistrationProperties typedef struct XAPO_REGISTRATION_PROPERTIES { CLSID clsid; // COM class ID, used with CoCreate @@ -197,7 +193,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete UINT32 MaxOutputBufferCount; // maximum number of output buffers supported for processing, must be >= MinOutputBufferCount, must match MaxInputBufferCount when XAPO_FLAG_BUFFERCOUNT_MUST_MATCH used } XAPO_REGISTRATION_PROPERTIES; - // LockForProcess buffer parameters: // Defines buffer parameters that remain constant while an XAPO is locked. // Used with IXAPO::LockForProcess. @@ -251,7 +246,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete UINT32 ValidFrameCount; // number of frames of valid data, must be within respective [0, XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount], always XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS.MaxFrameCount for CBR/user-defined XAPOs, does not affect BufferFlags } XAPO_PROCESS_BUFFER_PARAMETERS; - //-------------------------------------------------------------// // Memory allocation macros that allow one module to allocate memory and // another to free it, by guaranteeing that the same heap manager is used @@ -262,7 +256,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete #define XAPOAlloc(size) CoTaskMemAlloc(size) #define XAPOFree(p) CoTaskMemFree(p) - //-----------------------------------------------------// // IXAPO: // The only mandatory XAPO COM interface -- a thin wrapper that manages @@ -525,8 +518,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete STDMETHOD_(UINT32, CalcOutputFrames) (THIS_ UINT32 InputFrameCount) PURE; }; - - // IXAPOParameters: // Optional XAPO COM interface that allows an XAPO to use // effect-specific parameters. @@ -572,7 +563,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete STDMETHOD_(void, GetParameters) (THIS_ _Out_writes_bytes_(ParameterByteSize) void* pParameters, UINT32 ParameterByteSize) PURE; }; - //-------------------------------------------------------------// // macros to allow XAPO interfaces to be used in C code #if !defined(__cplusplus) @@ -616,7 +606,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete #define IXAPO_CalcOutputFrames(This, InputFrameCount) \ ( (This)->lpVtbl->CalcOutputFrames(This, InputFrameCount) ) - // IXAPOParameters #define IXAPOParameters_QueryInterface(This, riid, ppInterface) \ ( (This)->lpVtbl->QueryInterface(This, riid, ppInterface) ) @@ -634,7 +623,6 @@ interface __declspec(uuid("26D95C66-80F2-499A-AD54-5AE7F01C6D98")) IXAPOParamete ( (This)->lpVtbl->GetParameters(This, pParameters, ParameterByteSize) ) #endif // !defined(__cplusplus) - #pragma pack(pop) // revert packing alignment #endif // !defined(GUID_DEFS_ONLY) diff --git a/gfx/include/dxsdk/xapobase.h b/gfx/include/dxsdk/xapobase.h index a26bf77571..dfbb69da57 100644 --- a/gfx/include/dxsdk/xapobase.h +++ b/gfx/include/dxsdk/xapobase.h @@ -33,7 +33,6 @@ // default number of input and output buffers supported, applies to XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS #define XAPOBASE_DEFAULT_BUFFER_COUNT 1 - //-------------------------------------------------------------// // assertion #if !defined(XAPOASSERT) @@ -51,15 +50,12 @@ #endif #endif - //-----------------------------------------------------// #pragma pack(push, 8) // set packing alignment to ensure consistency across arbitrary build environments, and ensure synchronization variables used by Interlocked functionality are correctly aligned - // primitive types typedef float FLOAT32; // 32-bit IEEE float - //// // DESCRIPTION: // Default implementation of the IXAPO and IUnknown interfaces. @@ -75,7 +71,6 @@ private: BOOL m_fIsScalarMatrix; // TRUE if m_pfl32MatrixCoefficients is diagonal matrix with all main diagonal entries equal, i.e. m_pfnMatrixMixFunction only used for type conversion (no channel conversion), used for thru processing BOOL m_fIsLocked; // TRUE if XAPO locked via CXAPOBase.LockForProcess - protected: LONG m_lReferenceCount; // COM reference count, must be aligned for atomic operations @@ -158,7 +153,6 @@ protected: const XAPO_REGISTRATION_PROPERTIES* GetRegistrationPropertiesInternal () { return m_pRegistrationProperties; } BOOL IsLocked () { return m_fIsLocked; } - public: CXAPOBase (const XAPO_REGISTRATION_PROPERTIES* pRegistrationProperties); virtual ~CXAPOBase (); @@ -248,10 +242,6 @@ public: STDMETHOD_(UINT32, CalcOutputFrames) (UINT32 InputFrameCount) { return InputFrameCount; } }; - - - - //--------------------------------------------------------------------------// //// // DESCRIPTION: @@ -274,7 +264,6 @@ private: BOOL m_fNewerResultsReady; // TRUE if there exists new processing results not yet picked up by GetParameters(), must be aligned for atomic operations BOOL m_fProducer; // TRUE if IXAPO::Process produces data to be returned by GetParameters(), SetParameters() and ParametersChanged() disallowed - public: //// // PARAMETERS: @@ -347,6 +336,5 @@ public: void EndProcess (); }; - #pragma pack(pop) // revert packing alignment //---------------------------------<-EOF->----------------------------------// diff --git a/gfx/include/dxsdk/xapofx.h b/gfx/include/dxsdk/xapofx.h index 02f8ab0f85..25afacaf94 100644 --- a/gfx/include/dxsdk/xapofx.h +++ b/gfx/include/dxsdk/xapofx.h @@ -34,13 +34,11 @@ class __declspec(uuid("C4137916-2BE1-46FD-8599-441536F49856")) FXMasteringLimite class __declspec(uuid("7D9ACA56-CB68-4807-B632-B137352E8596")) FXReverb; class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; - #if !defined(GUID_DEFS_ONLY) // ignore rest if only GUID definitions requested #include #include #include // float bounds - // EQ parameter bounds (inclusive), used with FXEQ: #define FXEQ_MIN_FRAMERATE 22000 #define FXEQ_MAX_FRAMERATE 48000 @@ -60,7 +58,6 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; #define FXEQ_MAX_BANDWIDTH 2.0f #define FXEQ_DEFAULT_BANDWIDTH 1.0f // all bands - // Mastering limiter parameter bounds (inclusive), used with FXMasteringLimiter: #define FXMASTERINGLIMITER_MIN_RELEASE 1 #define FXMASTERINGLIMITER_MAX_RELEASE 20 @@ -70,7 +67,6 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; #define FXMASTERINGLIMITER_MAX_LOUDNESS 1800 #define FXMASTERINGLIMITER_DEFAULT_LOUDNESS 1000 - // Reverb parameter bounds (inclusive), used with FXReverb: #define FXREVERB_MIN_DIFFUSION 0.0f #define FXREVERB_MAX_DIFFUSION 1.0f @@ -80,7 +76,6 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; #define FXREVERB_MAX_ROOMSIZE 1.0f #define FXREVERB_DEFAULT_ROOMSIZE 0.6f - // Echo initialization data/parameter bounds (inclusive), used with FXEcho: #define FXECHO_MIN_WETDRYMIX 0.0f #define FXECHO_MAX_WETDRYMIX 1.0f @@ -94,11 +89,9 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; #define FXECHO_MAX_DELAY 2000.0f #define FXECHO_DEFAULT_DELAY 500.0f - //-----------------------------------------------------// #pragma pack(push, 1) // set packing alignment to ensure consistency across arbitrary build environments - // EQ parameters (4 bands), used with IXAPOParameters::SetParameters: // The EQ supports only FLOAT32 audio foramts. // The framerate must be within [22000, 48000] Hz. @@ -117,7 +110,6 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; float Bandwidth3; } FXEQ_PARAMETERS; - // Mastering limiter parameters, used with IXAPOParameters::SetParameters: // The mastering limiter supports only FLOAT32 audio formats. typedef struct FXMASTERINGLIMITER_PARAMETERS { @@ -125,7 +117,6 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; UINT32 Loudness; // loudness target (threshold) } FXMASTERINGLIMITER_PARAMETERS; - // Reverb parameters, used with IXAPOParameters::SetParameters: // The reverb supports only FLOAT32 audio formats with the following // channel configurations: @@ -136,7 +127,6 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; float RoomSize; // room size } FXREVERB_PARAMETERS; - // Echo initialization data, used with CreateFX: // Use of this structure is optional, the default MaxDelay is FXECHO_DEFAULT_DELAY. typedef struct FXECHO_INITDATA { @@ -151,7 +141,6 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; float Delay; // delay (all channels) in milliseconds, must be within [FXECHO_MIN_DELAY, FXECHO_PARAMETERS.MaxDelay] } FXECHO_PARAMETERS; - //-------------------------------------------------------------// // function storage-class attribute and calltype @@ -167,18 +156,15 @@ class __declspec(uuid("5039D740-F736-449A-84D3-A56202557B87")) FXEcho; #define FX_IMP_(type) type STDMETHODVCALLTYPE - //-------------------------------------------------------// // creates instance of requested XAPO, use Release to free instance // pInitData - [in] effect-specific initialization parameters, may be NULL if InitDataByteSize == 0 // InitDataByteSize - [in] size of pInitData in bytes, may be 0 if pInitData is NULL FX_API_(HRESULT) CreateFX (REFCLSID clsid, _Outptr_ IUnknown** pEffect, _In_reads_bytes_opt_(InitDataByteSize) const void* pInitData=NULL, UINT32 InitDataByteSize=0); - #pragma pack(pop) // revert packing alignment #endif // !defined(GUID_DEFS_ONLY) /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_TV_APP | WINAPI_PARTITION_TV_TITLE) */ /*#pragma endregion*/ //---------------------------------<-EOF->----------------------------------// - diff --git a/gfx/include/dxsdk/xdsp.h b/gfx/include/dxsdk/xdsp.h index 6ed0dc546d..7ba2b465a2 100644 --- a/gfx/include/dxsdk/xdsp.h +++ b/gfx/include/dxsdk/xdsp.h @@ -30,7 +30,6 @@ #include #endif - //-------------------------------------------------------------// // assertion #if !defined(DSPASSERT) @@ -46,13 +45,11 @@ #define ISPOWEROF2(n) ( ((n)&((n)-1)) == 0 && (n) != 0 ) #endif - //-----------------------------------------------------------// namespace XDSP { #pragma warning(push) #pragma warning(disable: 4328 4640) // disable "indirection alignment of formal parameter", "construction of local static object is not thread-safe" compile warnings - // Helper functions, used by the FFT functions. // The application need not call them directly. @@ -61,7 +58,6 @@ namespace XDSP { typedef XVECTOR& XVECTORREF; typedef const XVECTOR& XVECTORREFC; - // Parallel multiplication of four complex numbers, assuming // real and imaginary values are stored in separate vectors. __forceinline void vmulComplex (__out XVECTORREF rResult, __out XVECTORREF iResult, __in XVECTORREFC r1, __in XVECTORREFC i1, __in XVECTORREFC r2, __in XVECTORREFC i2) @@ -85,7 +81,6 @@ namespace XDSP { i1 = _mm_add_ps(vr1i2, vr2i1); // imaginary: (r1*i2 + r2*i1) } - // Radix-4 decimation-in-time FFT butterfly. // This version assumes that all four elements of the butterfly are // adjacent in a single vector. @@ -121,7 +116,6 @@ namespace XDSP { const static XVECTOR vDFT4SignBits2 = { 0.0f, 0.0f, -0.0f, -0.0f }; const static XVECTOR vDFT4SignBits3 = { 0.0f, -0.0f, -0.0f, 0.0f }; - // calculating Temp XVECTOR rTemp = _mm_add_ps( _mm_shuffle_ps(r1, r1, _MM_SHUFFLE(1, 1, 0, 0)), // [r1X| r1X|r1Y| r1Y] + _mm_xor_ps(_mm_shuffle_ps(r1, r1, _MM_SHUFFLE(3, 3, 2, 2)), vDFT4SignBits1) ); // [r1Z|-r1Z|r1W|-r1W] @@ -178,7 +172,6 @@ namespace XDSP { XVECTOR rTemp0, rTemp1, rTemp2, rTemp3, rTemp4, rTemp5, rTemp6, rTemp7; XVECTOR iTemp0, iTemp1, iTemp2, iTemp3, iTemp4, iTemp5, iTemp6, iTemp7; - // calculating Temp rTemp0 = _mm_add_ps(r0, r2); iTemp0 = _mm_add_ps(i0, i2); rTemp2 = _mm_add_ps(r1, r3); iTemp2 = _mm_add_ps(i1, i3); @@ -201,7 +194,6 @@ namespace XDSP { ButterflyDIT4_1(rTemp7, iTemp7); } - r0 = rTemp4; i0 = iTemp4; r1 = rTemp5; i1 = iTemp5; r2 = rTemp6; i2 = iTemp6; @@ -235,8 +227,6 @@ namespace XDSP { } } - - //// // DESCRIPTION: // 8-sample FFT. @@ -262,7 +252,6 @@ namespace XDSP { static XVECTOR wr2 = { -1.0f, -0.70710677f, 0.0f, 0.70710677f }; static XVECTOR wi2 = { 0.0f, 0.70710677f, 1.0f, 0.70710677f }; - for (UINT32 uIndex=0; uIndex>2); ++uIndex) { const UINT32 n = ((uIndex & uStrideInvMask) << 2) + (uIndex & uStrideMask); ButterflyDIT4_4(pReal[n], @@ -385,7 +368,6 @@ namespace XDSP { uStride, FALSE); } - if (uLength > 16*4) { FFT(pReal, pImaginary, pUnityTable+(uLength>>1), uLength>>2, uCount*4); } else if (uLength == 16*4) { @@ -423,7 +405,6 @@ inline void FFTInitializeUnityTable (__out_ecount(uLength) XVECTOR* __restrict p FLOAT32* __restrict pfUnityTable = (FLOAT32* __restrict)pUnityTable; - // initialize unity table for recursive FFT lengths: uLength, uLength/4, uLength/16... > 16 do { FLOAT32 flStep = 6.283185307f / uLength; // 2PI / FFT length @@ -442,7 +423,6 @@ inline void FFTInitializeUnityTable (__out_ecount(uLength) XVECTOR* __restrict p } while (uLength > 16); } - //// // DESCRIPTION: // The FFT functions generate output in bit reversed order. @@ -468,7 +448,6 @@ inline void FFTUnswizzle (__out_ecount((1< 1) { Deinterleave(vRealTemp, pReal, uChannelCount, uLength); } else { @@ -680,7 +645,6 @@ inline void FFTInterleaved (__inout_ecount((1<>2); u++) { @@ -747,8 +710,6 @@ inline void IFFTDeinterleaved (__inout_ecount((1<----------------------------------// - diff --git a/gfx/include/dxsdk/xma2defs.h b/gfx/include/dxsdk/xma2defs.h index 13a4306cb8..b1a9767344 100644 --- a/gfx/include/dxsdk/xma2defs.h +++ b/gfx/include/dxsdk/xma2defs.h @@ -14,7 +14,6 @@ #include // For S_OK, E_FAIL #include // Basic data types and constants for audio work - /*************************************************************************** * Overview ***************************************************************************/ @@ -70,7 +69,6 @@ // blocks, all the same size (as specified in XMA2WAVEFORMAT.BlockSizeInBytes) // except for the last one, which may be shorter. - // MULTICHANNEL AUDIO: the XMA decoder can only decode raw XMA data into either // mono or stereo PCM data. In order to encode a 6-channel file (say), the file // must be deinterleaved into 3 stereo streams that are encoded independently, @@ -94,7 +92,6 @@ // its first 15 bits; see XMAFRAME below). The GetXmaFrameBitPosition function // uses this technique. - // SEEKING IN XMA2 FILES: Here is some pseudocode to find the byte position and // subframe in an XMA2 file which will contain sample S when decoded. // @@ -128,8 +125,6 @@ // Step 1 can be performed using the GetXmaBlockContainingSample function below, // and steps 2-4 by calling GetXmaDecodePositionForSample once for each stream. - - /*************************************************************************** * XMA constants ***************************************************************************/ @@ -171,8 +166,6 @@ #define XMA_MAX_LOOPCOUNT 254u #define XMA_INFINITE_LOOP 255u - - /*************************************************************************** * XMA format structures ***************************************************************************/ @@ -210,7 +203,6 @@ typedef struct XMA2WAVEFORMATEX WORD BlockCount; // XMA blocks in file (and entries in its seek table) } XMA2WAVEFORMATEX, *PXMA2WAVEFORMATEX; - // The legacy XMA format structures are described here for reference, but they // should not be used in new content. XMAWAVEFORMAT was the structure used in // XMA version 1 files. XMA2WAVEFORMAT was used in early XMA2 files; it is not @@ -232,7 +224,6 @@ typedef struct XMA2WAVEFORMATEX #define XMA_SPEAKER_RIGHT_BACK 0x80 #endif - // Used in XMAWAVEFORMAT for per-stream data typedef struct XMASTREAMFORMAT { @@ -267,7 +258,6 @@ typedef struct XMAWAVEFORMAT // array length is in the NumStreams field. } XMAWAVEFORMAT; - // Used in XMA2WAVEFORMAT for per-stream data typedef struct XMA2STREAMFORMAT { @@ -303,8 +293,6 @@ typedef struct XMA2WAVEFORMAT #endif // #ifndef WAVE_FORMAT_XMA - - /*************************************************************************** * XMA packet structure (in big-endian form) ***************************************************************************/ @@ -327,7 +315,6 @@ typedef struct XMA2PACKET // | |_____________________ First frame starts 527 bits into packet // |________________________________ Packet contains 12 frames - // Helper functions to extract the fields above from an XMA packet. (Note that // the bitfields cannot be read directly on little-endian architectures such as // the Intel x86, as they are laid out in big-endian form.) @@ -354,8 +341,6 @@ __inline DWORD GetXmaPacketSkipCount(__in_bcount(4) const BYTE* pPacket) return (DWORD)(pPacket[3]); } - - /*************************************************************************** * XMA frame structure ***************************************************************************/ @@ -376,8 +361,6 @@ __inline DWORD GetXmaPacketSkipCount(__in_bcount(4) const BYTE* pPacket) // Special LengthInBits value that marks an invalid final frame #define XMA_FINAL_FRAME_MARKER 0x7FFF - - /*************************************************************************** * XMA helper functions ***************************************************************************/ @@ -392,7 +375,6 @@ __inline DWORD GetXmaPacketSkipCount(__in_bcount(4) const BYTE* pPacket) #endif #endif - // GetXmaBlockContainingSample: Use a given seek table to find the XMA block // containing a given decoded sample. Note that the seek table entries in an // XMA file are stored in big-endian form and may need to be converted prior @@ -430,7 +412,6 @@ __inline HRESULT GetXmaBlockContainingSample return E_FAIL; } - // GetXmaFrameLengthInBits: Reads a given frame's LengthInBits field. __inline DWORD GetXmaFrameLengthInBits @@ -459,7 +440,6 @@ __inline DWORD GetXmaFrameLengthInBits } } - // GetXmaFrameBitPosition: Calculates the bit offset of a given frame within // an XMA block or set of blocks. Returns 0 on failure. @@ -523,7 +503,6 @@ __inline DWORD GetXmaFrameBitPosition } } - // GetLastXmaFrameBitPosition: Calculates the bit offset of the last complete // frame in an XMA block or set of blocks. @@ -582,7 +561,6 @@ __inline DWORD GetLastXmaFrameBitPosition return (DWORD)(pLastPacket - pXmaData) * 8 + nFrameBitOffset; } - // GetXmaDecodePositionForSample: Obtains the information needed to make the // decoder generate audio starting at a given sample position relative to the // beginning of the given XMA block: the bit offset of the appropriate frame, @@ -619,7 +597,6 @@ __inline HRESULT GetXmaDecodePositionForSample } } - // GetXmaSampleRate: Obtains the legal XMA sample rate (24, 32, 44.1 or 48Khz) // corresponding to a generic sample rate. @@ -634,7 +611,6 @@ __inline DWORD GetXmaSampleRate(DWORD dwGeneralRate) return dwXmaRate; } - // Functions to convert between WAVEFORMATEXTENSIBLE channel masks (combinations // of the SPEAKER_xxx flags defined in audiodefs.h) and XMA channel masks (which // are limited to eight possible speaker positions: left, right, center, low @@ -672,7 +648,6 @@ __inline BYTE GetXmaChannelMaskFromStandardMask(DWORD dwStandardMask) return bXmaMask; } - // LocalizeXma2Format: Modifies a XMA2WAVEFORMATEX structure in place to comply // with the current platform's byte-ordering rules (little- or big-endian). @@ -714,5 +689,4 @@ __inline HRESULT LocalizeXma2Format(__inout XMA2WAVEFORMATEX* pXma2Format) #undef XMASWAP4BYTES } - #endif // #ifndef __XMA2DEFS_INCLUDED__ diff --git a/gfx/include/dxsdk/xnamath.h b/gfx/include/dxsdk/xnamath.h index daaba0b559..da085be63a 100644 --- a/gfx/include/dxsdk/xnamath.h +++ b/gfx/include/dxsdk/xnamath.h @@ -56,7 +56,6 @@ Abstract: #error xnamath.h only supports x86, x64, or XBox 360 targets #endif - #if defined(_XM_SSE_INTRINSICS_) #ifndef _XM_NO_INTRINSICS_ #include @@ -111,7 +110,6 @@ Abstract: #define _DECLSPEC_ALIGN_16_ #endif - #if defined(_MSC_VER) && (_MSC_VER<1500) && (_MSC_VER>=1400) #define _XM_ISVS2005_ #endif @@ -169,7 +167,6 @@ XMFINLINE FLOAT XMConvertToDegrees(FLOAT fRadians) { return fRadians * (180.0f / #define XMComparisonAllInBounds(CR) (((CR) & XM_CRMASK_CR6BOUNDS) == XM_CRMASK_CR6BOUNDS) #define XMComparisonAnyOutOfBounds(CR) (((CR) & XM_CRMASK_CR6BOUNDS) != XM_CRMASK_CR6BOUNDS) - #define XMMin(a, b) (((a) < (b)) ? (a) : (b)) #define XMMax(a, b) (((a) > (b)) ? (a) : (b)) @@ -1882,7 +1879,6 @@ typedef __declspec(align(16)) XMFLOAT4X4 XMFLOAT4X4A; #pragma warning(pop) - /**************************************************************************** * * Data conversion operations @@ -2246,7 +2242,6 @@ XMVECTOR XMVectorBaryCentricV(FXMVECTOR Position0, FXMVECTOR Position1, F * ****************************************************************************/ - BOOL XMVector2Equal(FXMVECTOR V1, FXMVECTOR V2); UINT XMVector2EqualR(FXMVECTOR V1, FXMVECTOR V2); BOOL XMVector2EqualInt(FXMVECTOR V1, FXMVECTOR V2); @@ -2312,7 +2307,6 @@ XMFLOAT2* XMVector2TransformNormalStream(_Out_bytecap_x_(sizeof(XMFLOAT2)+ * ****************************************************************************/ - BOOL XMVector3Equal(FXMVECTOR V1, FXMVECTOR V2); UINT XMVector3EqualR(FXMVECTOR V1, FXMVECTOR V2); BOOL XMVector3EqualInt(FXMVECTOR V1, FXMVECTOR V2); @@ -2935,4 +2929,3 @@ XMFINLINE XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, UINT VSLeftRotateE #pragma warning(pop) #endif // __XNAMATH_H__ - diff --git a/gfx/include/dxsdk/xnamathconvert.inl b/gfx/include/dxsdk/xnamathconvert.inl index 370d27d290..deaeacb448 100644 --- a/gfx/include/dxsdk/xnamathconvert.inl +++ b/gfx/include/dxsdk/xnamathconvert.inl @@ -5782,4 +5782,3 @@ XMFINLINE VOID XMStoreFloat4x4NC } #endif // __XNAMATHCONVERT_INL__ - diff --git a/gfx/include/dxsdk/xnamathmatrix.inl b/gfx/include/dxsdk/xnamathmatrix.inl index 7ce4c1f238..6348dc7743 100644 --- a/gfx/include/dxsdk/xnamathmatrix.inl +++ b/gfx/include/dxsdk/xnamathmatrix.inl @@ -3251,4 +3251,3 @@ XMFINLINE XMFLOAT4X4A& XMFLOAT4X4A::operator= #endif // __cplusplus #endif // __XNAMATHMATRIX_INL__ - diff --git a/gfx/include/dxsdk/xnamathmisc.inl b/gfx/include/dxsdk/xnamathmisc.inl index c937ee1d0b..8c16b59854 100644 --- a/gfx/include/dxsdk/xnamathmisc.inl +++ b/gfx/include/dxsdk/xnamathmisc.inl @@ -2461,4 +2461,3 @@ XMFINLINE FLOAT XMScalarACosEst } #endif // __XNAMATHMISC_INL__ - diff --git a/gfx/include/dxsdk/xnamathvector.inl b/gfx/include/dxsdk/xnamathvector.inl index bfea1d0003..80b846c197 100644 --- a/gfx/include/dxsdk/xnamathvector.inl +++ b/gfx/include/dxsdk/xnamathvector.inl @@ -13276,4 +13276,3 @@ XMFINLINE _XMU555& _XMU555::operator= #endif #endif // __XNAMATHVECTOR_INL__ - diff --git a/gfx/include/pixman/pixman-private.h b/gfx/include/pixman/pixman-private.h index 02c286abb7..6dd6b1eb17 100644 --- a/gfx/include/pixman/pixman-private.h +++ b/gfx/include/pixman/pixman-private.h @@ -640,7 +640,6 @@ _pixman_choose_implementation (void); pixman_bool_t _pixman_disabled (const char *name); - /* * Utilities */ diff --git a/gfx/include/vulkan/vk_platform.h b/gfx/include/vulkan/vk_platform.h index 802e77a6f3..a27dcc5fb9 100644 --- a/gfx/include/vulkan/vk_platform.h +++ b/gfx/include/vulkan/vk_platform.h @@ -16,7 +16,6 @@ ** limitations under the License. */ - #ifndef VK_PLATFORM_H_ #define VK_PLATFORM_H_ diff --git a/gfx/include/vulkan/vulkan.h b/gfx/include/vulkan/vulkan.h index f874647c10..5610f05c31 100644 --- a/gfx/include/vulkan/vulkan.h +++ b/gfx/include/vulkan/vulkan.h @@ -24,52 +24,43 @@ #include "vulkan_android.h" #endif - #ifdef VK_USE_PLATFORM_IOS_MVK #include "vulkan_ios.h" #endif - #ifdef VK_USE_PLATFORM_MACOS_MVK #include "vulkan_macos.h" #endif - #ifdef VK_USE_PLATFORM_MIR_KHR #include #include "vulkan_mir.h" #endif - #ifdef VK_USE_PLATFORM_VI_NN #include "vulkan_vi.h" #endif - #ifdef VK_USE_PLATFORM_WAYLAND_KHR #include #include "vulkan_wayland.h" #endif - #ifdef VK_USE_PLATFORM_WIN32_KHR #include #include "vulkan_win32.h" #endif - #ifdef VK_USE_PLATFORM_XCB_KHR #include #include "vulkan_xcb.h" #endif - #ifdef VK_USE_PLATFORM_XLIB_KHR #include #include "vulkan_xlib.h" #endif - #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT #include #include diff --git a/gfx/include/vulkan/vulkan_android.h b/gfx/include/vulkan/vulkan_android.h index 07aaeda28e..967ade544a 100644 --- a/gfx/include/vulkan/vulkan_android.h +++ b/gfx/include/vulkan/vulkan_android.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_KHR_android_surface 1 struct ANativeWindow; @@ -42,7 +41,6 @@ typedef struct VkAndroidSurfaceCreateInfoKHR { struct ANativeWindow* window; } VkAndroidSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES @@ -103,7 +101,6 @@ typedef struct VkExternalFormatANDROID { uint64_t externalFormat; } VkExternalFormatANDROID; - typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); diff --git a/gfx/include/vulkan/vulkan_core.h b/gfx/include/vulkan/vulkan_core.h index d088c26bab..1b65ab4310 100644 --- a/gfx/include/vulkan/vulkan_core.h +++ b/gfx/include/vulkan/vulkan_core.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_VERSION_1_0 1 #include "vk_platform.h" @@ -47,14 +46,11 @@ extern "C" { /* Version of this file */ #define VK_HEADER_VERSION 73 - #define VK_NULL_HANDLE 0 - #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; - #if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE) #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; @@ -64,7 +60,6 @@ extern "C" { #endif - typedef uint32_t VkFlags; typedef uint32_t VkBool32; typedef uint64_t VkDeviceSize; @@ -112,7 +107,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) #define VK_MAX_EXTENSION_NAME_SIZE 256 #define VK_MAX_DESCRIPTION_SIZE 256 - typedef enum VkPipelineCacheHeaderVersion { VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE, @@ -2717,7 +2711,6 @@ typedef struct VkDrawIndirectCommand { uint32_t firstInstance; } VkDrawIndirectCommand; - typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); @@ -3666,7 +3659,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) #define VK_LUID_SIZE 8 #define VK_QUEUE_FAMILY_EXTERNAL (~0U-1) - typedef enum VkPointClippingBehavior { VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0, VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1, @@ -3738,7 +3730,6 @@ typedef enum VkDescriptorUpdateTemplateType { VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkDescriptorUpdateTemplateType; - typedef enum VkSubgroupFeatureFlagBits { VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, @@ -4353,7 +4344,6 @@ typedef struct VkPhysicalDeviceShaderDrawParameterFeatures { VkBool32 shaderDrawParameters; } VkPhysicalDeviceShaderDrawParameterFeatures; - typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t* pApiVersion); typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); @@ -4537,7 +4527,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) #define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" #define VK_COLORSPACE_SRGB_NONLINEAR_KHR VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - typedef enum VkColorSpaceKHR { VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, @@ -4573,7 +4562,6 @@ typedef enum VkPresentModeKHR { VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkPresentModeKHR; - typedef enum VkSurfaceTransformFlagBitsKHR { VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, @@ -4615,7 +4603,6 @@ typedef struct VkSurfaceFormatKHR { VkColorSpaceKHR colorSpace; } VkSurfaceFormatKHR; - typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); @@ -4658,7 +4645,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) #define VK_KHR_SWAPCHAIN_SPEC_VERSION 70 #define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" - typedef enum VkSwapchainCreateFlagBitsKHR { VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001, VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002, @@ -4751,7 +4737,6 @@ typedef struct VkDeviceGroupSwapchainCreateInfoKHR { VkDeviceGroupPresentModeFlagsKHR modes; } VkDeviceGroupSwapchainCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages); @@ -4820,7 +4805,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) #define VK_KHR_DISPLAY_SPEC_VERSION 21 #define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" - typedef enum VkDisplayPlaneAlphaFlagBitsKHR { VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, @@ -4889,7 +4873,6 @@ typedef struct VkDisplaySurfaceCreateInfoKHR { VkExtent2D imageExtent; } VkDisplaySurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays); @@ -4953,7 +4936,6 @@ typedef struct VkDisplayPresentInfoKHR { VkBool32 persistent; } VkDisplayPresentInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); #ifndef VK_NO_PROTOTYPES @@ -4969,7 +4951,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR( #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge" - #define VK_KHR_multiview 1 #define VK_KHR_MULTIVIEW_SPEC_VERSION 1 #define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview" @@ -4980,8 +4961,6 @@ typedef VkPhysicalDeviceMultiviewFeatures VkPhysicalDeviceMultiviewFeaturesKHR; typedef VkPhysicalDeviceMultiviewProperties VkPhysicalDeviceMultiviewPropertiesKHR; - - #define VK_KHR_get_physical_device_properties2 1 #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" @@ -5004,7 +4983,6 @@ typedef VkSparseImageFormatProperties2 VkSparseImageFormatProperties2KHR; typedef VkPhysicalDeviceSparseImageFormatInfo2 VkPhysicalDeviceSparseImageFormatInfo2KHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); @@ -5060,7 +5038,6 @@ typedef VkMemoryAllocateFlags VkMemoryAllocateFlagsKHR; typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR; - typedef VkMemoryAllocateFlagsInfo VkMemoryAllocateFlagsInfoKHR; typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR; @@ -5075,7 +5052,6 @@ typedef VkBindBufferMemoryDeviceGroupInfo VkBindBufferMemoryDeviceGroupInfoKHR; typedef VkBindImageMemoryDeviceGroupInfo VkBindImageMemoryDeviceGroupInfoKHR; - typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHR)(VkCommandBuffer commandBuffer, uint32_t deviceMask); typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHR)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); @@ -5106,14 +5082,12 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR( #define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 #define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" - #define VK_KHR_maintenance1 1 #define VK_KHR_MAINTENANCE1_SPEC_VERSION 2 #define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR; - typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); #ifndef VK_NO_PROTOTYPES @@ -5132,7 +5106,6 @@ typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupPropertiesKHR; typedef VkDeviceGroupDeviceCreateInfo VkDeviceGroupDeviceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); #ifndef VK_NO_PROTOTYPES @@ -5155,7 +5128,6 @@ typedef VkExternalMemoryFeatureFlags VkExternalMemoryFeatureFlagsKHR; typedef VkExternalMemoryFeatureFlagBits VkExternalMemoryFeatureFlagBitsKHR; - typedef VkExternalMemoryProperties VkExternalMemoryPropertiesKHR; typedef VkPhysicalDeviceExternalImageFormatInfo VkPhysicalDeviceExternalImageFormatInfoKHR; @@ -5168,7 +5140,6 @@ typedef VkExternalBufferProperties VkExternalBufferPropertiesKHR; typedef VkPhysicalDeviceIDProperties VkPhysicalDeviceIDPropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); #ifndef VK_NO_PROTOTYPES @@ -5189,8 +5160,6 @@ typedef VkExternalMemoryBufferCreateInfo VkExternalMemoryBufferCreateInfoKHR; typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR; - - #define VK_KHR_external_memory_fd 1 #define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd" @@ -5215,7 +5184,6 @@ typedef struct VkMemoryGetFdInfoKHR { VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetFdInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdKHR)(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdPropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties); @@ -5244,12 +5212,10 @@ typedef VkExternalSemaphoreFeatureFlags VkExternalSemaphoreFeatureFlagsKHR; typedef VkExternalSemaphoreFeatureFlagBits VkExternalSemaphoreFeatureFlagBitsKHR; - typedef VkPhysicalDeviceExternalSemaphoreInfo VkPhysicalDeviceExternalSemaphoreInfoKHR; typedef VkExternalSemaphoreProperties VkExternalSemaphorePropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); #ifndef VK_NO_PROTOTYPES @@ -5267,11 +5233,8 @@ typedef VkSemaphoreImportFlags VkSemaphoreImportFlagsKHR; typedef VkSemaphoreImportFlagBits VkSemaphoreImportFlagBitsKHR; - typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR; - - #define VK_KHR_external_semaphore_fd 1 #define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd" @@ -5292,7 +5255,6 @@ typedef struct VkSemaphoreGetFdInfoKHR { VkExternalSemaphoreHandleTypeFlagBits handleType; } VkSemaphoreGetFdInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreFdKHR)(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreFdKHR)(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); @@ -5317,7 +5279,6 @@ typedef struct VkPhysicalDevicePushDescriptorPropertiesKHR { uint32_t maxPushDescriptors; } VkPhysicalDevicePushDescriptorPropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); @@ -5344,8 +5305,6 @@ VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR( typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeaturesKHR; - - #define VK_KHR_incremental_present 1 #define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 #define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" @@ -5368,26 +5327,20 @@ typedef struct VkPresentRegionsKHR { const VkPresentRegionKHR* pRegions; } VkPresentRegionsKHR; - - #define VK_KHR_descriptor_update_template 1 typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR; - #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" typedef VkDescriptorUpdateTemplateType VkDescriptorUpdateTemplateTypeKHR; - typedef VkDescriptorUpdateTemplateCreateFlags VkDescriptorUpdateTemplateCreateFlagsKHR; - typedef VkDescriptorUpdateTemplateEntry VkDescriptorUpdateTemplateEntryKHR; typedef VkDescriptorUpdateTemplateCreateInfo VkDescriptorUpdateTemplateCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); @@ -5421,7 +5374,6 @@ typedef struct VkSharedPresentSurfaceCapabilitiesKHR { VkImageUsageFlags sharedPresentSupportedUsageFlags; } VkSharedPresentSurfaceCapabilitiesKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainStatusKHR)(VkDevice device, VkSwapchainKHR swapchain); #ifndef VK_NO_PROTOTYPES @@ -5442,12 +5394,10 @@ typedef VkExternalFenceFeatureFlags VkExternalFenceFeatureFlagsKHR; typedef VkExternalFenceFeatureFlagBits VkExternalFenceFeatureFlagBitsKHR; - typedef VkPhysicalDeviceExternalFenceInfo VkPhysicalDeviceExternalFenceInfoKHR; typedef VkExternalFenceProperties VkExternalFencePropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); #ifndef VK_NO_PROTOTYPES @@ -5465,11 +5415,8 @@ typedef VkFenceImportFlags VkFenceImportFlagsKHR; typedef VkFenceImportFlagBits VkFenceImportFlagBitsKHR; - typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR; - - #define VK_KHR_external_fence_fd 1 #define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd" @@ -5490,7 +5437,6 @@ typedef struct VkFenceGetFdInfoKHR { VkExternalFenceHandleTypeFlagBits handleType; } VkFenceGetFdInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportFenceFdKHR)(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceFdKHR)(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); @@ -5513,7 +5459,6 @@ typedef VkPointClippingBehavior VkPointClippingBehaviorKHR; typedef VkTessellationDomainOrigin VkTessellationDomainOriginKHR; - typedef VkPhysicalDevicePointClippingProperties VkPhysicalDevicePointClippingPropertiesKHR; typedef VkRenderPassInputAttachmentAspectCreateInfo VkRenderPassInputAttachmentAspectCreateInfoKHR; @@ -5524,8 +5469,6 @@ typedef VkImageViewUsageCreateInfo VkImageViewUsageCreateInfoKHR; typedef VkPipelineTessellationDomainOriginStateCreateInfo VkPipelineTessellationDomainOriginStateCreateInfoKHR; - - #define VK_KHR_get_surface_capabilities2 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" @@ -5548,7 +5491,6 @@ typedef struct VkSurfaceFormat2KHR { VkSurfaceFormatKHR surfaceFormat; } VkSurfaceFormat2KHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats); @@ -5571,8 +5513,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR( typedef VkPhysicalDeviceVariablePointerFeatures VkPhysicalDeviceVariablePointerFeaturesKHR; - - #define VK_KHR_dedicated_allocation 1 #define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3 #define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation" @@ -5581,18 +5521,14 @@ typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR; typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR; - - #define VK_KHR_storage_buffer_storage_class 1 #define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1 #define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class" - #define VK_KHR_relaxed_block_layout 1 #define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1 #define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout" - #define VK_KHR_get_memory_requirements2 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2" @@ -5607,7 +5543,6 @@ typedef VkMemoryRequirements2 VkMemoryRequirements2KHR; typedef VkSparseImageMemoryRequirements2 VkSparseImageMemoryRequirements2KHR; - typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2KHR)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); @@ -5641,12 +5576,9 @@ typedef struct VkImageFormatListCreateInfoKHR { const VkFormat* pViewFormats; } VkImageFormatListCreateInfoKHR; - - #define VK_KHR_sampler_ycbcr_conversion 1 typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR; - #define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1 #define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion" @@ -5656,7 +5588,6 @@ typedef VkSamplerYcbcrRange VkSamplerYcbcrRangeKHR; typedef VkChromaLocation VkChromaLocationKHR; - typedef VkSamplerYcbcrConversionCreateInfo VkSamplerYcbcrConversionCreateInfoKHR; typedef VkSamplerYcbcrConversionInfo VkSamplerYcbcrConversionInfoKHR; @@ -5669,7 +5600,6 @@ typedef VkPhysicalDeviceSamplerYcbcrConversionFeatures VkPhysicalDeviceSamplerYc typedef VkSamplerYcbcrConversionImageFormatProperties VkSamplerYcbcrConversionImageFormatPropertiesKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversionKHR)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversionKHR)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); @@ -5694,7 +5624,6 @@ typedef VkBindBufferMemoryInfo VkBindBufferMemoryInfoKHR; typedef VkBindImageMemoryInfo VkBindImageMemoryInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); @@ -5718,7 +5647,6 @@ typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3Prope typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR; - typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); #ifndef VK_NO_PROTOTYPES @@ -5736,7 +5664,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) #define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT #define VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT - typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, @@ -5782,7 +5709,6 @@ typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugReportObjectTypeEXT; - typedef enum VkDebugReportFlagBitsEXT { VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, @@ -5811,7 +5737,6 @@ typedef struct VkDebugReportCallbackCreateInfoEXT { void* pUserData; } VkDebugReportCallbackCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage); @@ -5843,22 +5768,18 @@ VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( #define VK_NV_GLSL_SHADER_SPEC_VERSION 1 #define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader" - #define VK_EXT_depth_range_unrestricted 1 #define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1 #define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted" - #define VK_IMG_filter_cubic 1 #define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 #define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic" - #define VK_AMD_rasterization_order 1 #define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 #define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order" - typedef enum VkRasterizationOrderAMD { VK_RASTERIZATION_ORDER_STRICT_AMD = 0, VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, @@ -5874,18 +5795,14 @@ typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { VkRasterizationOrderAMD rasterizationOrder; } VkPipelineRasterizationStateRasterizationOrderAMD; - - #define VK_AMD_shader_trinary_minmax 1 #define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 #define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" - #define VK_AMD_shader_explicit_vertex_parameter 1 #define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 #define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" - #define VK_EXT_debug_marker 1 #define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 #define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker" @@ -5915,7 +5832,6 @@ typedef struct VkDebugMarkerMarkerInfoEXT { float color[4]; } VkDebugMarkerMarkerInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); @@ -5947,7 +5863,6 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT( #define VK_AMD_GCN_SHADER_SPEC_VERSION 1 #define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" - #define VK_NV_dedicated_allocation 1 #define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 #define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" @@ -5971,8 +5886,6 @@ typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { VkBuffer buffer; } VkDedicatedAllocationMemoryAllocateInfoNV; - - #define VK_AMD_draw_indirect_count 1 #define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 #define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" @@ -6004,17 +5917,14 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD( #define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 #define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" - #define VK_AMD_gpu_shader_half_float 1 #define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 #define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" - #define VK_AMD_shader_ballot 1 #define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 #define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" - #define VK_AMD_texture_gather_bias_lod 1 #define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1 #define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod" @@ -6025,13 +5935,10 @@ typedef struct VkTextureLODGatherFormatPropertiesAMD { VkBool32 supportsTextureGatherLODBiasAMD; } VkTextureLODGatherFormatPropertiesAMD; - - #define VK_AMD_shader_info 1 #define VK_AMD_SHADER_INFO_SPEC_VERSION 1 #define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info" - typedef enum VkShaderInfoTypeAMD { VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0, VK_SHADER_INFO_TYPE_BINARY_AMD = 1, @@ -6060,7 +5967,6 @@ typedef struct VkShaderStatisticsInfoAMD { uint32_t computeWorkGroupSize[3]; } VkShaderStatisticsInfoAMD; - typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInfoAMD)(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); #ifndef VK_NO_PROTOTYPES @@ -6077,17 +5983,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1 #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod" - #define VK_IMG_format_pvrtc 1 #define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 #define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" - #define VK_NV_external_memory_capabilities 1 #define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" - typedef enum VkExternalMemoryHandleTypeFlagBitsNV { VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, @@ -6112,7 +6015,6 @@ typedef struct VkExternalImageFormatPropertiesNV { VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes; } VkExternalImageFormatPropertiesNV; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); #ifndef VK_NO_PROTOTYPES @@ -6143,13 +6045,10 @@ typedef struct VkExportMemoryAllocateInfoNV { VkExternalMemoryHandleTypeFlagsNV handleTypes; } VkExportMemoryAllocateInfoNV; - - #define VK_EXT_validation_flags 1 #define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 #define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" - typedef enum VkValidationCheckEXT { VK_VALIDATION_CHECK_ALL_EXT = 0, VK_VALIDATION_CHECK_SHADERS_EXT = 1, @@ -6166,18 +6065,14 @@ typedef struct VkValidationFlagsEXT { VkValidationCheckEXT* pDisabledValidationChecks; } VkValidationFlagsEXT; - - #define VK_EXT_shader_subgroup_ballot 1 #define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 #define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" - #define VK_EXT_shader_subgroup_vote 1 #define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 #define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" - #define VK_NVX_device_generated_commands 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) @@ -6185,7 +6080,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) #define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3 #define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" - typedef enum VkIndirectCommandsTokenTypeNVX { VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1, @@ -6213,7 +6107,6 @@ typedef enum VkObjectEntryTypeNVX { VK_OBJECT_ENTRY_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF } VkObjectEntryTypeNVX; - typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX { VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, @@ -6343,7 +6236,6 @@ typedef struct VkObjectTablePushConstantEntryNVX { VkShaderStageFlags stageFlags; } VkObjectTablePushConstantEntryNVX; - typedef void (VKAPI_PTR *PFN_vkCmdProcessCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo); typedef void (VKAPI_PTR *PFN_vkCmdReserveSpaceForCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo); typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNVX)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout); @@ -6422,7 +6314,6 @@ typedef struct VkPipelineViewportWScalingStateCreateInfoNV { const VkViewportWScalingNV* pViewportWScalings; } VkPipelineViewportWScalingStateCreateInfoNV; - typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings); #ifndef VK_NO_PROTOTYPES @@ -6450,7 +6341,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT( #define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" #define VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT - typedef enum VkSurfaceCounterFlagBitsEXT { VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF @@ -6473,7 +6363,6 @@ typedef struct VkSurfaceCapabilities2EXT { VkSurfaceCounterFlagsEXT supportedSurfaceCounters; } VkSurfaceCapabilities2EXT; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities); #ifndef VK_NO_PROTOTYPES @@ -6487,7 +6376,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT( #define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 #define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control" - typedef enum VkDisplayPowerStateEXT { VK_DISPLAY_POWER_STATE_OFF_EXT = 0, VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, @@ -6538,7 +6426,6 @@ typedef struct VkSwapchainCounterCreateInfoEXT { VkSurfaceCounterFlagsEXT surfaceCounters; } VkSwapchainCounterCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); @@ -6598,7 +6485,6 @@ typedef struct VkPresentTimesInfoGOOGLE { const VkPresentTimeGOOGLE* pTimes; } VkPresentTimesInfoGOOGLE; - typedef VkResult (VKAPI_PTR *PFN_vkGetRefreshCycleDurationGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPastPresentationTimingGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings); @@ -6619,17 +6505,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE( #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" - #define VK_NV_geometry_shader_passthrough 1 #define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1 #define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough" - #define VK_NV_viewport_array2 1 #define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1 #define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2" - #define VK_NVX_multiview_per_view_attributes 1 #define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 #define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" @@ -6640,13 +6523,10 @@ typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { VkBool32 perViewPositionAllComponents; } VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; - - #define VK_NV_viewport_swizzle 1 #define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 #define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" - typedef enum VkViewportCoordinateSwizzleNV { VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, @@ -6679,13 +6559,10 @@ typedef struct VkPipelineViewportSwizzleStateCreateInfoNV { const VkViewportSwizzleNV* pViewportSwizzles; } VkPipelineViewportSwizzleStateCreateInfoNV; - - #define VK_EXT_discard_rectangles 1 #define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 #define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" - typedef enum VkDiscardRectangleModeEXT { VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, @@ -6712,7 +6589,6 @@ typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { const VkRect2D* pDiscardRectangles; } VkPipelineDiscardRectangleStateCreateInfoEXT; - typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); #ifndef VK_NO_PROTOTYPES @@ -6727,7 +6603,6 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT( #define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1 #define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization" - typedef enum VkConservativeRasterizationModeEXT { VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, @@ -6762,13 +6637,10 @@ typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT { float extraPrimitiveOverestimationSize; } VkPipelineRasterizationConservativeStateCreateInfoEXT; - - #define VK_EXT_swapchain_colorspace 1 #define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 3 #define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" - #define VK_EXT_hdr_metadata 1 #define VK_EXT_HDR_METADATA_SPEC_VERSION 1 #define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" @@ -6791,7 +6663,6 @@ typedef struct VkHdrMetadataEXT { float maxFrameAverageLightLevel; } VkHdrMetadataEXT; - typedef void (VKAPI_PTR *PFN_vkSetHdrMetadataEXT)(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata); #ifndef VK_NO_PROTOTYPES @@ -6806,13 +6677,11 @@ VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT( #define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf" - #define VK_EXT_queue_family_foreign 1 #define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1 #define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign" #define VK_QUEUE_FAMILY_FOREIGN_EXT (~0U-2) - #define VK_EXT_debug_utils 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) @@ -6895,7 +6764,6 @@ typedef struct VkDebugUtilsMessengerCreateInfoEXT { void* pUserData; } VkDebugUtilsMessengerCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectNameEXT)(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectTagEXT)(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); typedef void (VKAPI_PTR *PFN_vkQueueBeginDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); @@ -6961,7 +6829,6 @@ VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT( #define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax" - typedef enum VkSamplerReductionModeEXT { VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0, VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1, @@ -6985,28 +6852,22 @@ typedef struct VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT { VkBool32 filterMinmaxImageComponentMapping; } VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT; - - #define VK_AMD_gpu_shader_int16 1 #define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1 #define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16" - #define VK_AMD_mixed_attachment_samples 1 #define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1 #define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples" - #define VK_AMD_shader_fragment_mask 1 #define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1 #define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask" - #define VK_EXT_shader_stencil_export 1 #define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1 #define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export" - #define VK_EXT_sample_locations 1 #define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1 #define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations" @@ -7067,7 +6928,6 @@ typedef struct VkMultisamplePropertiesEXT { VkExtent2D maxSampleLocationGridSize; } VkMultisamplePropertiesEXT; - typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties); @@ -7086,7 +6946,6 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT( #define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2 #define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced" - typedef enum VkBlendOverlapEXT { VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0, VK_BLEND_OVERLAP_DISJOINT_EXT = 1, @@ -7122,8 +6981,6 @@ typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT { VkBlendOverlapEXT blendOverlap; } VkPipelineColorBlendAdvancedStateCreateInfoEXT; - - #define VK_NV_fragment_coverage_to_color 1 #define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1 #define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color" @@ -7138,13 +6995,10 @@ typedef struct VkPipelineCoverageToColorStateCreateInfoNV { uint32_t coverageToColorLocation; } VkPipelineCoverageToColorStateCreateInfoNV; - - #define VK_NV_framebuffer_mixed_samples 1 #define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1 #define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples" - typedef enum VkCoverageModulationModeNV { VK_COVERAGE_MODULATION_MODE_NONE_NV = 0, VK_COVERAGE_MODULATION_MODE_RGB_NV = 1, @@ -7168,18 +7022,14 @@ typedef struct VkPipelineCoverageModulationStateCreateInfoNV { const float* pCoverageModulationTable; } VkPipelineCoverageModulationStateCreateInfoNV; - - #define VK_NV_fill_rectangle 1 #define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1 #define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle" - #define VK_EXT_post_depth_coverage 1 #define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1 #define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage" - #define VK_EXT_validation_cache 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) @@ -7187,7 +7037,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) #define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache" #define VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT - typedef enum VkValidationCacheHeaderVersionEXT { VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, VK_VALIDATION_CACHE_HEADER_VERSION_BEGIN_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT, @@ -7212,7 +7061,6 @@ typedef struct VkShaderModuleValidationCacheCreateInfoEXT { VkValidationCacheEXT validationCache; } VkShaderModuleValidationCacheCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkCreateValidationCacheEXT)(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); typedef void (VKAPI_PTR *PFN_vkDestroyValidationCacheEXT)(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkMergeValidationCachesEXT)(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches); @@ -7247,7 +7095,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( #define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2 #define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing" - typedef enum VkDescriptorBindingFlagBitsEXT { VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = 0x00000001, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 0x00000002, @@ -7330,18 +7177,14 @@ typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupportEXT { uint32_t maxVariableDescriptorCount; } VkDescriptorSetVariableDescriptorCountLayoutSupportEXT; - - #define VK_EXT_shader_viewport_index_layer 1 #define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1 #define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer" - #define VK_EXT_global_priority 1 #define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 #define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" - typedef enum VkQueueGlobalPriorityEXT { VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256, @@ -7359,8 +7202,6 @@ typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT { VkQueueGlobalPriorityEXT globalPriority; } VkDeviceQueueGlobalPriorityCreateInfoEXT; - - #define VK_EXT_external_memory_host 1 #define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host" @@ -7384,7 +7225,6 @@ typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { VkDeviceSize minImportedHostPointerAlignment; } VkPhysicalDeviceExternalMemoryHostPropertiesEXT; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); #ifndef VK_NO_PROTOTYPES @@ -7433,8 +7273,6 @@ typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { uint32_t vgprAllocationGranularity; } VkPhysicalDeviceShaderCorePropertiesAMD; - - #define VK_EXT_vertex_attribute_divisor 1 #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 1 #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor" @@ -7457,13 +7295,10 @@ typedef struct VkPipelineVertexInputDivisorStateCreateInfoEXT { const VkVertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors; } VkPipelineVertexInputDivisorStateCreateInfoEXT; - - #define VK_NV_shader_subgroup_partitioned 1 #define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1 #define VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME "VK_NV_shader_subgroup_partitioned" - #ifdef __cplusplus } #endif diff --git a/gfx/include/vulkan/vulkan_ios.h b/gfx/include/vulkan/vulkan_ios.h index a0924816d5..2e45f4eb1a 100644 --- a/gfx/include/vulkan/vulkan_ios.h +++ b/gfx/include/vulkan/vulkan_ios.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_MVK_ios_surface 1 #define VK_MVK_IOS_SURFACE_SPEC_VERSION 2 #define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" @@ -40,7 +39,6 @@ typedef struct VkIOSSurfaceCreateInfoMVK { const void* pView; } VkIOSSurfaceCreateInfoMVK; - typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/gfx/include/vulkan/vulkan_macos.h b/gfx/include/vulkan/vulkan_macos.h index ff0b701801..049bbc95d5 100644 --- a/gfx/include/vulkan/vulkan_macos.h +++ b/gfx/include/vulkan/vulkan_macos.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_MVK_macos_surface 1 #define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2 #define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" @@ -40,7 +39,6 @@ typedef struct VkMacOSSurfaceCreateInfoMVK { const void* pView; } VkMacOSSurfaceCreateInfoMVK; - typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/gfx/include/vulkan/vulkan_mir.h b/gfx/include/vulkan/vulkan_mir.h index 7d24ed27a3..3c14619284 100644 --- a/gfx/include/vulkan/vulkan_mir.h +++ b/gfx/include/vulkan/vulkan_mir.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_KHR_mir_surface 1 #define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 #define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface" @@ -41,7 +40,6 @@ typedef struct VkMirSurfaceCreateInfoKHR { MirSurface* mirSurface; } VkMirSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection); diff --git a/gfx/include/vulkan/vulkan_vi.h b/gfx/include/vulkan/vulkan_vi.h index 015166bfc6..cd194e27da 100644 --- a/gfx/include/vulkan/vulkan_vi.h +++ b/gfx/include/vulkan/vulkan_vi.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_NN_vi_surface 1 #define VK_NN_VI_SURFACE_SPEC_VERSION 1 #define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" @@ -40,7 +39,6 @@ typedef struct VkViSurfaceCreateInfoNN { void* window; } VkViSurfaceCreateInfoNN; - typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/gfx/include/vulkan/vulkan_wayland.h b/gfx/include/vulkan/vulkan_wayland.h index 5ba0827aa3..a5b952af22 100644 --- a/gfx/include/vulkan/vulkan_wayland.h +++ b/gfx/include/vulkan/vulkan_wayland.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_KHR_wayland_surface 1 #define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 #define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" @@ -41,7 +40,6 @@ typedef struct VkWaylandSurfaceCreateInfoKHR { struct wl_surface* surface; } VkWaylandSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); diff --git a/gfx/include/vulkan/vulkan_win32.h b/gfx/include/vulkan/vulkan_win32.h index 6a85409ebe..8c248c547d 100644 --- a/gfx/include/vulkan/vulkan_win32.h +++ b/gfx/include/vulkan/vulkan_win32.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_KHR_win32_surface 1 #define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6 #define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface" @@ -41,7 +40,6 @@ typedef struct VkWin32SurfaceCreateInfoKHR { HWND hwnd; } VkWin32SurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); @@ -90,7 +88,6 @@ typedef struct VkMemoryGetWin32HandleInfoKHR { VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetWin32HandleInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); @@ -123,8 +120,6 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { const uint64_t* pReleaseKeys; } VkWin32KeyedMutexAcquireReleaseInfoKHR; - - #define VK_KHR_external_semaphore_win32 1 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32" @@ -163,7 +158,6 @@ typedef struct VkSemaphoreGetWin32HandleInfoKHR { VkExternalSemaphoreHandleTypeFlagBits handleType; } VkSemaphoreGetWin32HandleInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); @@ -207,7 +201,6 @@ typedef struct VkFenceGetWin32HandleInfoKHR { VkExternalFenceHandleTypeFlagBits handleType; } VkFenceGetWin32HandleInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); @@ -240,7 +233,6 @@ typedef struct VkExportMemoryWin32HandleInfoNV { DWORD dwAccess; } VkExportMemoryWin32HandleInfoNV; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); #ifndef VK_NO_PROTOTYPES @@ -267,8 +259,6 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { const uint64_t* pReleaseKeys; } VkWin32KeyedMutexAcquireReleaseInfoNV; - - #ifdef __cplusplus } #endif diff --git a/gfx/include/vulkan/vulkan_xcb.h b/gfx/include/vulkan/vulkan_xcb.h index ba03600602..646a9928f9 100644 --- a/gfx/include/vulkan/vulkan_xcb.h +++ b/gfx/include/vulkan/vulkan_xcb.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_KHR_xcb_surface 1 #define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 #define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface" @@ -41,7 +40,6 @@ typedef struct VkXcbSurfaceCreateInfoKHR { xcb_window_t window; } VkXcbSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); diff --git a/gfx/include/vulkan/vulkan_xlib.h b/gfx/include/vulkan/vulkan_xlib.h index e1d967e018..5ceb75de5e 100644 --- a/gfx/include/vulkan/vulkan_xlib.h +++ b/gfx/include/vulkan/vulkan_xlib.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_KHR_xlib_surface 1 #define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 #define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface" @@ -41,7 +40,6 @@ typedef struct VkXlibSurfaceCreateInfoKHR { Window window; } VkXlibSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); diff --git a/gfx/include/vulkan/vulkan_xlib_xrandr.h b/gfx/include/vulkan/vulkan_xlib_xrandr.h index 117d01799e..a79f3d1bb2 100644 --- a/gfx/include/vulkan/vulkan_xlib_xrandr.h +++ b/gfx/include/vulkan/vulkan_xlib_xrandr.h @@ -26,7 +26,6 @@ extern "C" { ** */ - #define VK_EXT_acquire_xlib_display 1 #define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 #define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" diff --git a/gfx/video_defines.h b/gfx/video_defines.h index 7633846589..1bef08c767 100644 --- a/gfx/video_defines.h +++ b/gfx/video_defines.h @@ -88,6 +88,7 @@ enum font_driver_render_api FONT_DRIVER_RENDER_D3D10_API, FONT_DRIVER_RENDER_D3D11_API, FONT_DRIVER_RENDER_D3D12_API, + FONT_DRIVER_RENDER_PS2, FONT_DRIVER_RENDER_VITA2D, FONT_DRIVER_RENDER_CTR, FONT_DRIVER_RENDER_WIIU, diff --git a/gfx/video_display_server.c b/gfx/video_display_server.c index 73dd8c92ca..f5f4f917ea 100644 --- a/gfx/video_display_server.c +++ b/gfx/video_display_server.c @@ -89,7 +89,6 @@ bool video_display_server_set_window_decorations(bool on) return false; } - bool video_display_server_set_resolution(unsigned width, unsigned height, int int_hz, float hz, int center) { diff --git a/gfx/video_driver.c b/gfx/video_driver.c index cfdf468d5d..3d29a3c182 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -119,7 +119,6 @@ #define video_driver_context_unlock() ((void)0) #endif - typedef struct video_pixel_scaler { struct scaler_ctx *scaler; @@ -148,7 +147,6 @@ static bool video_driver_crt_switching_active = false; static struct retro_system_av_info video_driver_av_info; - static enum retro_pixel_format video_driver_pix_fmt = RETRO_PIXEL_FORMAT_0RGB1555; static const void *frame_cache_data = NULL; @@ -954,7 +952,6 @@ static bool video_driver_init_internal(bool *video_is_threaded) if (!string_is_empty(settings->paths.path_softfilter_plugin)) video_driver_init_filter(video_driver_pix_fmt); - max_dim = MAX(geom->max_width, geom->max_height); scale = next_pow2(max_dim) / RARCH_SCALE_BASE; scale = MAX(scale, 1); @@ -2025,7 +2022,6 @@ bool video_driver_read_viewport(uint8_t *buffer, bool is_idle) return false; } - bool video_driver_frame_filter_alive(void) { return !!video_driver_state_filter; @@ -2058,8 +2054,13 @@ void video_driver_load_settings(config_file_t *conf) if (!conf) return; +#ifdef _XBOX CONFIG_GET_BOOL_BASE(conf, global, console.screen.gamma_correction, "gamma_correction"); +#else + CONFIG_GET_INT_BASE(conf, global, + console.screen.gamma_correction, "gamma_correction"); +#endif if (config_get_bool(conf, "flicker_filter_enable", &tmp_bool)) @@ -2086,8 +2087,13 @@ void video_driver_save_settings(config_file_t *conf) if (!conf) return; +#ifdef _XBOX config_set_bool(conf, "gamma_correction", global->console.screen.gamma_correction); +#else + config_set_int(conf, "gamma_correction", + global->console.screen.gamma_correction); +#endif config_set_bool(conf, "flicker_filter_enable", global->console.flickerfilter_enable); config_set_bool(conf, "soft_filter_enable", @@ -2425,7 +2431,6 @@ void video_driver_frame(const void *data, unsigned width, } } - if (data) frame_cache_data = data; frame_cache_width = width; @@ -3150,7 +3155,6 @@ void video_context_driver_make_current(bool release) current_video_context.make_current(release); } - bool video_context_driver_translate_aspect(gfx_ctx_aspect_t *aspect) { if (!video_context_data || !aspect) @@ -3348,8 +3352,6 @@ bool video_driver_get_all_flags(gfx_ctx_flags_t *flags, enum display_flags flag) return false; } - - bool video_context_driver_set_flags(gfx_ctx_flags_t *flags) { if (!flags) diff --git a/gfx/video_driver.h b/gfx/video_driver.h index ba380809c4..eea9ef14e4 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -509,7 +509,6 @@ typedef bool (*get_metrics_cb)(void *data, enum display_metric_types type, float *value); typedef bool (*set_resize_cb)(void*, unsigned, unsigned); - typedef struct gfx_ctx_driver { /* The opaque pointer is the underlying video driver data (e.g. gl_t for @@ -749,7 +748,6 @@ typedef struct video_poke_interface const struct retro_hw_render_interface **iface); } video_poke_interface_t; - /* msg is for showing a message on the screen * along with the video frame. */ typedef bool (*video_driver_frame_t)(void *data, @@ -832,7 +830,6 @@ typedef struct video_driver unsigned (*wrap_type_to_enum)(enum gfx_wrap_type type); } video_driver_t; - extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END]; bool video_driver_has_windowed(void); @@ -1302,7 +1299,6 @@ extern const gfx_ctx_driver_t switch_ctx; extern const gfx_ctx_driver_t orbis_ctx; extern const gfx_ctx_driver_t gfx_ctx_null; - extern const shader_backend_t gl_glsl_backend; extern const shader_backend_t gl_cg_backend; extern const shader_backend_t shader_null_backend; diff --git a/gfx/video_filter.c b/gfx/video_filter.c index bb76dbcba5..5e4fcb8dc4 100644 --- a/gfx/video_filter.c +++ b/gfx/video_filter.c @@ -557,4 +557,3 @@ void rarch_softfilter_process(rarch_softfilter_t *filt, filt->packets[i].work(filt->impl_data, filt->packets[i].thread_data); #endif } - diff --git a/gfx/video_filters/2xbr.c b/gfx/video_filters/2xbr.c index ef978ee741..83f347bb46 100644 --- a/gfx/video_filters/2xbr.c +++ b/gfx/video_filters/2xbr.c @@ -278,7 +278,6 @@ static void twoxbr_generic_destroy(void *data) ((((src & pg_blue_mask) - \ (dst & pg_blue_mask))) >>3))) ) - #define ALPHA_BLEND_8888_32_W(dst, src) \ dst = ( \ (pg_red_mask & ((dst & pg_red_mask) + \ @@ -292,7 +291,6 @@ static void twoxbr_generic_destroy(void *data) (dst & pg_blue_mask))) >>3))) ) +\ pg_alpha_mask - #define ALPHA_BLEND_64_W(dst, src) \ dst = ( \ (pg_red_mask & ((dst & pg_red_mask) + \ @@ -318,7 +316,6 @@ static void twoxbr_generic_destroy(void *data) (dst & pg_blue_mask))) >>2))) ) +\ pg_alpha_mask - #define ALPHA_BLEND_192_W(dst, src) \ dst = ( \ (pg_red_mask & ((dst & pg_red_mask) + \ @@ -331,7 +328,6 @@ static void twoxbr_generic_destroy(void *data) ((((src & pg_blue_mask) - \ (dst & pg_blue_mask)) * 192) >>8))) ) - #define ALPHA_BLEND_8888_192_W(dst, src) \ dst = ( \ (pg_red_mask & ((dst & pg_red_mask) + \ @@ -370,13 +366,11 @@ static void twoxbr_generic_destroy(void *data) (dst & pg_blue_mask)) * 224) >>8))) ) +\ pg_alpha_mask - #define LEFT_UP_2_2X(N3, N2, N1, PIXEL)\ ALPHA_BLEND_224_W(E[N3], PIXEL); \ ALPHA_BLEND_64_W( E[N2], PIXEL); \ E[N1] = E[N2]; \ - #define LEFT_2_2X(N3, N2, PIXEL)\ ALPHA_BLEND_192_W(E[N3], PIXEL); \ ALPHA_BLEND_64_W( E[N2], PIXEL); \ @@ -388,13 +382,11 @@ static void twoxbr_generic_destroy(void *data) #define DIA_2X(N3, PIXEL)\ ALPHA_BLEND_128_W(E[N3], PIXEL); \ - #define LEFT_UP_2_8888_2X(N3, N2, N1, PIXEL)\ ALPHA_BLEND_8888_224_W(E[N3], PIXEL); \ ALPHA_BLEND_8888_64_W( E[N2], PIXEL); \ E[N1] = E[N2]; \ - #define LEFT_2_8888_2X(N3, N2, PIXEL)\ ALPHA_BLEND_8888_192_W(E[N3], PIXEL); \ ALPHA_BLEND_8888_64_W( E[N2], PIXEL); \ @@ -406,15 +398,12 @@ static void twoxbr_generic_destroy(void *data) #define DIA_8888_2X(N3, PIXEL)\ ALPHA_BLEND_128_W(E[N3], PIXEL); \ - #define df(Z, A, B)\ abs(Z->RGBtoYUV[A] - Z->RGBtoYUV[B])\ #define eq(Z, A, B)\ (df(Z, A, B) < 155)\ - - float df8(uint32_t A, uint32_t B, uint32_t pg_red_mask, uint32_t pg_green_mask, uint32_t pg_blue_mask) { @@ -461,7 +450,6 @@ int eq8(uint32_t A, uint32_t B, return ((48 >= y) && (7 >= u) && (6 >= v)) ? 1 : 0; } - #define FILTRO_RGB565(Z, PE, _PI, PH, PF, PG, PC, PD, PB, PA, G5, C4, G0, D0, C1, B1, F4, I4, H5, I5, A0, A1, N0, N1, N2, N3, pg_red_mask, pg_green_mask, pg_blue_mask) \ ex = (PE!=PH && PE!=PF); \ if ( ex )\ @@ -531,7 +519,6 @@ int eq8(uint32_t A, uint32_t B, }\ }\ - #ifndef twoxbr_function #define twoxbr_function(FILTRO, Z) \ E[0] = E[1] = E[2] = E[3] = PE;\ @@ -547,7 +534,6 @@ int eq8(uint32_t A, uint32_t B, out += 2 #endif - static void twoxbr_generic_xrgb8888(void *data, unsigned width, unsigned height, int first, int last, uint32_t *src, unsigned src_stride, uint32_t *dst, unsigned dst_stride) diff --git a/gfx/video_filters/Makefile b/gfx/video_filters/Makefile index 3a1a3e6b8f..de2df86955 100644 --- a/gfx/video_filters/Makefile +++ b/gfx/video_filters/Makefile @@ -64,7 +64,6 @@ asflags := $(ASFLAGS) -fPIC $(extra_flags) objects := flags += -std=c99 - ifeq (1,$(use_neon)) ASMFLAGS := -INEON/asm asflags += -mfpu=neon diff --git a/gfx/video_filters/blargg_ntsc_snes.c b/gfx/video_filters/blargg_ntsc_snes.c index 334885981e..131ea3161d 100644 --- a/gfx/video_filters/blargg_ntsc_snes.c +++ b/gfx/video_filters/blargg_ntsc_snes.c @@ -54,7 +54,6 @@ struct filter_data int burst_toggle; }; - static unsigned blargg_ntsc_snes_generic_input_fmts(void) { return SOFTFILTER_FMT_RGB565; @@ -143,7 +142,6 @@ static void *blargg_ntsc_snes_generic_create(const struct softfilter_config *con return filt; } - static void blargg_ntsc_snes_generic_output(void *data, unsigned *out_width, unsigned *out_height, unsigned width, unsigned height) diff --git a/gfx/video_filters/epx.c b/gfx/video_filters/epx.c index 0256f80ca6..63bf788fa8 100644 --- a/gfx/video_filters/epx.c +++ b/gfx/video_filters/epx.c @@ -210,7 +210,6 @@ static void epx_work_cb_rgb565(void *data, void *thread_data) (unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565)); } - static void epx_generic_packets(void *data, struct softfilter_work_packet *packets, void *output, size_t output_stride, diff --git a/gfx/video_filters/phosphor2x.c b/gfx/video_filters/phosphor2x.c index 8ba64afe2a..3fc84906c3 100644 --- a/gfx/video_filters/phosphor2x.c +++ b/gfx/video_filters/phosphor2x.c @@ -58,7 +58,6 @@ struct filter_data float scan_range_565[64]; }; - #define clamp8(x) ((x) > 255 ? 255 : ((x < 0) ? 0 : (uint32_t)x)) #define clamp6(x) ((x) > 63 ? 63 : ((x < 0) ? 0 : (uint32_t)x)) diff --git a/gfx/video_filters/snes_ntsc/snes_ntsc.h b/gfx/video_filters/snes_ntsc/snes_ntsc.h index d9aa710e27..a8e728a237 100644 --- a/gfx/video_filters/snes_ntsc/snes_ntsc.h +++ b/gfx/video_filters/snes_ntsc/snes_ntsc.h @@ -68,7 +68,6 @@ value. */ #define SNES_NTSC_IN_WIDTH( out_width ) \ (((out_width) / snes_ntsc_out_chunk - 1) * snes_ntsc_in_chunk + 1) - /* Interface for user-defined custom blitters */ enum { snes_ntsc_in_chunk = 3 }; /* number of input pixels read per chunk */ @@ -129,7 +128,6 @@ statement in a block (unless you're using C++). */ SNES_NTSC_RGB_OUT_( rgb_out, (bits), 0 );\ } - /* private */ enum { snes_ntsc_entry_size = 128 }; enum { snes_ntsc_palette_size = 0x2000 }; diff --git a/gfx/video_filters/softfilter.h b/gfx/video_filters/softfilter.h index 99cd10eedc..7d39cb0c4f 100644 --- a/gfx/video_filters/softfilter.h +++ b/gfx/video_filters/softfilter.h @@ -186,4 +186,3 @@ struct softfilter_implementation #endif #endif - diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c index 6151618f15..7572b298b1 100644 --- a/gfx/video_shader_parse.c +++ b/gfx/video_shader_parse.c @@ -126,7 +126,7 @@ static bool video_shader_parse_pass(config_file_t *conf, char scale_type_y[64]; char frame_count_mod[64]; size_t path_size = PATH_MAX_LENGTH * sizeof(char); - char *tmp_str = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + char *tmp_str = (char*)malloc(path_size); char *tmp_path = NULL; struct gfx_fbo_scale *scale = NULL; bool tmp_bool = false; @@ -443,7 +443,11 @@ bool video_shader_resolve_current_parameters(config_file_t *conf, if (!conf) return false; - parameters = (char*)malloc(4096 * sizeof(char)); + parameters = (char*)malloc(param_size); + + if (!parameters) + return false; + parameters[0] = '\0'; /* Read in parameters which override the defaults. */ @@ -526,7 +530,7 @@ bool video_shader_resolve_parameters(config_file_t *conf, if (!file) continue; - line = (char*)malloc(4096 * sizeof(char)); + line = (char*)malloc(line_size); line[0] = '\0'; /* even though the pass is set in the loop too, not all passes have parameters */ @@ -690,6 +694,10 @@ static bool video_shader_parse_imports(config_file_t *conf, } tmp_str = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + + if (!tmp_str) + goto error; + tmp_str[0] = '\0'; if (config_get_path(conf, "import_script", tmp_str, path_size)) strlcpy(shader->script_path, tmp_str, sizeof(shader->script_path)); @@ -961,112 +969,122 @@ void video_shader_write_conf_cgp(config_file_t *conf, for (i = 0; i < shader->passes; i++) { char key[64]; - size_t tmp_size = PATH_MAX_LENGTH * sizeof(char); - char *tmp = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + size_t tmp_size = PATH_MAX_LENGTH * sizeof(char); + char *tmp = (char*)malloc(tmp_size); const struct video_shader_pass *pass = &shader->pass[i]; - key[0] = '\0'; - - snprintf(key, sizeof(key), "shader%u", i); - strlcpy(tmp, pass->source.path, tmp_size); - - if (!path_is_absolute(tmp)) - path_resolve_realpath(tmp, tmp_size); - config_set_string(conf, key, tmp); - - free(tmp); - - if (pass->filter != RARCH_FILTER_UNSPEC) + if (tmp) { - snprintf(key, sizeof(key), "filter_linear%u", i); - config_set_bool(conf, key, pass->filter == RARCH_FILTER_LINEAR); + key[0] = '\0'; + + snprintf(key, sizeof(key), "shader%u", i); + strlcpy(tmp, pass->source.path, tmp_size); + + if (!path_is_absolute(tmp)) + path_resolve_realpath(tmp, tmp_size); + config_set_string(conf, key, tmp); + + free(tmp); + + if (pass->filter != RARCH_FILTER_UNSPEC) + { + snprintf(key, sizeof(key), "filter_linear%u", i); + config_set_bool(conf, key, pass->filter == RARCH_FILTER_LINEAR); + } + + snprintf(key, sizeof(key), "wrap_mode%u", i); + config_set_string(conf, key, wrap_mode_to_str(pass->wrap)); + + if (pass->frame_count_mod) + { + snprintf(key, sizeof(key), "frame_count_mod%u", i); + config_set_int(conf, key, pass->frame_count_mod); + } + + snprintf(key, sizeof(key), "mipmap_input%u", i); + config_set_bool(conf, key, pass->mipmap); + + snprintf(key, sizeof(key), "alias%u", i); + config_set_string(conf, key, pass->alias); + + shader_write_fbo(conf, &pass->fbo, i); } - - snprintf(key, sizeof(key), "wrap_mode%u", i); - config_set_string(conf, key, wrap_mode_to_str(pass->wrap)); - - if (pass->frame_count_mod) - { - snprintf(key, sizeof(key), "frame_count_mod%u", i); - config_set_int(conf, key, pass->frame_count_mod); - } - - snprintf(key, sizeof(key), "mipmap_input%u", i); - config_set_bool(conf, key, pass->mipmap); - - snprintf(key, sizeof(key), "alias%u", i); - config_set_string(conf, key, pass->alias); - - shader_write_fbo(conf, &pass->fbo, i); } if (shader->num_parameters) { size_t param_size = 4096 * sizeof(char); - char *parameters = (char*)malloc(4096 * sizeof(char)); + char *parameters = (char*)malloc(param_size); - parameters[0] = '\0'; - - strlcpy(parameters, shader->parameters[0].id, param_size); - - for (i = 1; i < shader->num_parameters; i++) + if (parameters) { - /* O(n^2), but number of parameters is very limited. */ - strlcat(parameters, ";", param_size); - strlcat(parameters, shader->parameters[i].id, param_size); + parameters[0] = '\0'; + + strlcpy(parameters, shader->parameters[0].id, param_size); + + for (i = 1; i < shader->num_parameters; i++) + { + /* O(n^2), but number of parameters is very limited. */ + strlcat(parameters, ";", param_size); + strlcat(parameters, shader->parameters[i].id, param_size); + } + + config_set_string(conf, "parameters", parameters); + + for (i = 0; i < shader->num_parameters; i++) + config_set_float(conf, shader->parameters[i].id, + shader->parameters[i].current); + free(parameters); } - - config_set_string(conf, "parameters", parameters); - - for (i = 0; i < shader->num_parameters; i++) - config_set_float(conf, shader->parameters[i].id, - shader->parameters[i].current); - free(parameters); } if (shader->luts) { size_t tex_size = 4096 * sizeof(char); - char *textures = (char*)malloc(4096 * sizeof(char)); + char *textures = (char*)malloc(tex_size); - textures[0] = '\0'; - - strlcpy(textures, shader->lut[0].id, tex_size); - for (i = 1; i < shader->luts; i++) + if (textures) { - /* O(n^2), but number of textures is very limited. */ - strlcat(textures, ";", tex_size); - strlcat(textures, shader->lut[i].id, tex_size); - } + textures[0] = '\0'; - config_set_string(conf, "textures", textures); + strlcpy(textures, shader->lut[0].id, tex_size); - free(textures); - - for (i = 0; i < shader->luts; i++) - { - char key[64]; - - key[0] = '\0'; - - config_set_string(conf, shader->lut[i].id, shader->lut[i].path); - - if (shader->lut[i].filter != RARCH_FILTER_UNSPEC) + for (i = 1; i < shader->luts; i++) { - snprintf(key, sizeof(key), "%s_linear", shader->lut[i].id); - config_set_bool(conf, key, - shader->lut[i].filter == RARCH_FILTER_LINEAR); + /* O(n^2), but number of textures is very limited. */ + strlcat(textures, ";", tex_size); + strlcat(textures, shader->lut[i].id, tex_size); } - snprintf(key, sizeof(key), - "%s_wrap_mode", shader->lut[i].id); - config_set_string(conf, key, - wrap_mode_to_str(shader->lut[i].wrap)); + config_set_string(conf, "textures", textures); - snprintf(key, sizeof(key), - "%s_mipmap", shader->lut[i].id); - config_set_bool(conf, key, - shader->lut[i].mipmap); + free(textures); + + for (i = 0; i < shader->luts; i++) + { + char key[64]; + + key[0] = '\0'; + + config_set_string(conf, shader->lut[i].id, shader->lut[i].path); + + if (shader->lut[i].filter != RARCH_FILTER_UNSPEC) + { + snprintf(key, sizeof(key), "%s_linear", shader->lut[i].id); + config_set_bool(conf, key, + shader->lut[i].filter == RARCH_FILTER_LINEAR); + } + + snprintf(key, sizeof(key), + "%s_wrap_mode", shader->lut[i].id); + config_set_string(conf, key, + wrap_mode_to_str(shader->lut[i].wrap)); + + snprintf(key, sizeof(key), + "%s_mipmap", shader->lut[i].id); + config_set_bool(conf, key, + shader->lut[i].mipmap); + } } } @@ -1078,23 +1096,26 @@ void video_shader_write_conf_cgp(config_file_t *conf, if (shader->variables) { size_t var_tmp = 4096 * sizeof(char); - char *variables = (char*)malloc(4096 * sizeof(char)); + char *variables = (char*)malloc(var_tmp); - variables[0] = '\0'; - - strlcpy(variables, shader->variable[0].id, var_tmp); - - for (i = 1; i < shader->variables; i++) + if (variables) { - strlcat(variables, ";", var_tmp); - strlcat(variables, shader->variable[i].id, var_tmp); + variables[0] = '\0'; + + strlcpy(variables, shader->variable[0].id, var_tmp); + + for (i = 1; i < shader->variables; i++) + { + strlcat(variables, ";", var_tmp); + strlcat(variables, shader->variable[i].id, var_tmp); + } + + config_set_string(conf, "imports", variables); + + for (i = 0; i < shader->variables; i++) + shader_write_variable(conf, &shader->variable[i]); + free(variables); } - - config_set_string(conf, "imports", variables); - - for (i = 0; i < shader->variables; i++) - shader_write_variable(conf, &shader->variable[i]); - free(variables); } } @@ -1309,7 +1330,10 @@ void video_shader_resolve_relative(struct video_shader *shader, { unsigned i; size_t tmp_path_size = 4096 * sizeof(char); - char *tmp_path = (char*)malloc(4096 * sizeof(char)); + char *tmp_path = (char*)malloc(tmp_path_size); + + if (!tmp_path) + return; tmp_path[0] = '\0'; diff --git a/gfx/video_shader_parse.h b/gfx/video_shader_parse.h index 15d228a44f..39189992a4 100644 --- a/gfx/video_shader_parse.h +++ b/gfx/video_shader_parse.h @@ -46,7 +46,6 @@ RETRO_BEGIN_DECLS #define GFX_MAX_FRAME_HISTORY 128 #endif - enum rarch_shader_type { RARCH_SHADER_NONE = 0, diff --git a/gfx/video_state_tracker.c b/gfx/video_state_tracker.c index a36a50f8fb..cb57728135 100644 --- a/gfx/video_state_tracker.c +++ b/gfx/video_state_tracker.c @@ -288,7 +288,6 @@ unsigned state_tracker_get_uniform(state_tracker_t *tracker, state_tracker_update_input(&tracker->input_state[0], &tracker->input_state[1]); - for (i = 0; i < elems; i++) state_tracker_update_element( &uniforms[i], &tracker->info[i], frame_count); diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 7f3b2a2c0e..1093deae0a 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -430,24 +430,28 @@ static bool video_thread_handle_packet( break; case CMD_OVERLAY_LOAD: - - if (thr->overlay && thr->overlay->load) - ret = thr->overlay->load(thr->driver_data, - pkt.data.image.data, - pkt.data.image.num); - - pkt.data.b = ret; - thr->alpha_mods = pkt.data.image.num; - thr->alpha_mod = (float*)realloc(thr->alpha_mod, - thr->alpha_mods * sizeof(float)); - - for (i = 0; i < thr->alpha_mods; i++) { - /* Avoid temporary garbage data. */ - thr->alpha_mod[i] = 1.0f; - } + float *tmp_alpha_mod = NULL; - video_thread_reply(thr, &pkt); + if (thr->overlay && thr->overlay->load) + ret = thr->overlay->load(thr->driver_data, + pkt.data.image.data, + pkt.data.image.num); + + pkt.data.b = ret; + thr->alpha_mods = pkt.data.image.num; + tmp_alpha_mod = (float*)realloc(thr->alpha_mod, + thr->alpha_mods * sizeof(float)); + + if (tmp_alpha_mod) + thr->alpha_mod = tmp_alpha_mod; + + /* Avoid temporary garbage data. */ + for (i = 0; i < thr->alpha_mods; i++) + thr->alpha_mod[i] = 1.0f; + + video_thread_reply(thr, &pkt); + } break; case CMD_OVERLAY_TEX_GEOM: @@ -845,7 +849,7 @@ static bool video_thread_set_shader(void *data, } static void video_thread_set_viewport(void *data, unsigned width, - unsigned height, bool force_full, bool allow_rotate) + unsigned height, bool force_full, bool video_allow_rotate) { thread_video_t *thr = (thread_video_t*)data; if (!thr) @@ -855,7 +859,7 @@ static void video_thread_set_viewport(void *data, unsigned width, if (thr->driver && thr->driver->set_viewport) thr->driver->set_viewport(thr->driver_data, width, height, - force_full, allow_rotate); + force_full, video_allow_rotate); slock_unlock(thr->lock); } @@ -1052,7 +1056,7 @@ static void video_thread_get_overlay_interface(void *data, #endif static void thread_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) + bool video_fullscreen) { thread_video_t *thr = (thread_video_t*)data; thread_packet_t pkt = { CMD_POKE_SET_VIDEO_MODE }; @@ -1062,7 +1066,7 @@ static void thread_set_video_mode(void *data, unsigned width, unsigned height, pkt.data.new_mode.width = width; pkt.data.new_mode.height = height; - pkt.data.new_mode.fullscreen = fullscreen; + pkt.data.new_mode.fullscreen = video_fullscreen; video_thread_send_and_wait_user_to_thread(thr, &pkt); } @@ -1131,12 +1135,11 @@ static void thread_set_aspect_ratio(void *data, unsigned aspectratio_idx) static void thread_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha) { - size_t required; thread_video_t *thr = (thread_video_t*)data; + size_t required = width * height * + (rgb32 ? sizeof(uint32_t) : sizeof(uint16_t)); slock_lock(thr->frame.lock); - required = width * height * - (rgb32 ? sizeof(uint32_t) : sizeof(uint16_t)); if (required > thr->texture.frame_cap) { @@ -1163,7 +1166,7 @@ static void thread_set_texture_enable(void *data, bool state, bool full_screen) return; slock_lock(thr->frame.lock); - thr->texture.enable = state; + thr->texture.enable = state; thr->texture.full_screen = full_screen; slock_unlock(thr->frame.lock); } @@ -1400,7 +1403,7 @@ static void video_thread_send_and_wait(thread_video_t *thr, } bool video_thread_font_init(const void **font_driver, void **font_handle, - void *data, const char *font_path, float font_size, + void *data, const char *font_path, float video_font_size, enum font_driver_render_api api, custom_font_command_method_t func, bool is_threaded) { @@ -1416,7 +1419,7 @@ bool video_thread_font_init(const void **font_driver, void **font_handle, pkt.data.font_init.font_handle = font_handle; pkt.data.font_init.video_data = data; pkt.data.font_init.font_path = font_path; - pkt.data.font_init.font_size = font_size; + pkt.data.font_init.font_size = video_font_size; pkt.data.font_init.is_threaded = is_threaded; pkt.data.font_init.api = api; diff --git a/griffin/griffin.c b/griffin/griffin.c index b101226120..d4ebac5a2b 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -230,7 +230,6 @@ VIDEO CONTEXT #include "../gfx/drivers_context/cgl_ctx.c" #endif - #if defined(HAVE_VIVANTE_FBDEV) #include "../gfx/drivers_context/vivante_fbdev_ctx.c" #endif @@ -498,6 +497,10 @@ FONTS #include "../gfx/drivers_font/xdk1_xfonts.c" #endif +#if defined(PS2) +#include "../gfx/drivers_font/ps2_font.c" +#endif + #if defined(VITA) #include "../gfx/drivers_font/vita2d_font.c" #endif @@ -569,6 +572,9 @@ INPUT #elif defined(SN_TARGET_PSP2) || defined(PSP) || defined(VITA) #include "../input/drivers/psp_input.c" #include "../input/drivers_joypad/psp_joypad.c" +#elif defined(ORBIS) +#include "../input/drivers/ps4_input.c" +#include "../input/drivers_joypad/ps4_joypad.c" #elif defined(PS2) #include "../input/drivers/ps2_input.c" #include "../input/drivers_joypad/ps2_joypad.c" @@ -770,10 +776,10 @@ AUDIO #include "../audio/drivers/wiiu_audio.c" #elif defined(EMSCRIPTEN) #include "../audio/drivers/rwebaudio.c" -#elif defined(PSP) || defined(VITA) +#elif defined(PSP) || defined(VITA) || defined(ORBIS) #include "../audio/drivers/psp_audio.c" #elif defined(PS2) -// #include "../audio/drivers/ps2_audio.c" +#include "../audio/drivers/ps2_audio.c" #elif defined(_3DS) #include "../audio/drivers/ctr_csnd_audio.c" #include "../audio/drivers/ctr_dsp_audio.c" @@ -927,6 +933,7 @@ FILE #include "../libretro-common/file/nbio/nbio_linux.c" #include "../libretro-common/file/nbio/nbio_unixmmap.c" #include "../libretro-common/file/nbio/nbio_windowsmmap.c" +#include "../libretro-common/file/nbio/nbio_orbis.c" #include "../libretro-common/file/nbio/nbio_intf.c" /*============================================================ @@ -950,10 +957,14 @@ FRONTEND #include "../frontend/frontend_driver.c" -#if defined(_WIN32) && !defined(_XBOX) +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) #include "../frontend/drivers/platform_win32.c" #endif +#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +#include "../frontend/drivers/platform_uwp.c" +#endif + #ifdef _XBOX #include "../frontend/drivers/platform_xdk.c" #endif @@ -1022,7 +1033,6 @@ GIT #include "../version_git.c" #endif - /*============================================================ RETROARCH ============================================================ */ @@ -1111,11 +1121,14 @@ THREAD #include "../audio/audio_thread_wrapper.c" #endif +#define JSON_STATIC 1 /* must come before netplay_room_parse and jsonsax_full */ +/* needed for both playlists and netplay lobbies */ +#include "../libretro-common/formats/json/jsonsax_full.c" + /*============================================================ NETPLAY ============================================================ */ #ifdef HAVE_NETWORKING -#define JSON_STATIC 1 /* must come before netplay_room_parse and jsonsax_full */ #include "../network/netplay/netplay_delta.c" #include "../network/netplay/netplay_frontend.c" #include "../network/netplay/netplay_handshake.c" @@ -1130,7 +1143,6 @@ NETPLAY #include "../libretro-common/net/net_socket.c" #include "../libretro-common/net/net_http.c" #include "../libretro-common/net/net_natt.c" -#include "../libretro-common/formats/json/jsonsax_full.c" #if !defined(HAVE_SOCKET_LEGACY) && !defined(__wiiu__) #include "../libretro-common/net/net_ifinfo.c" #endif @@ -1270,7 +1282,6 @@ MENU #endif - #ifdef HAVE_RGUI #include "../menu/drivers/rgui.c" #endif @@ -1550,3 +1561,7 @@ SSL #endif #endif #endif + +#ifdef HAVE_EASTEREGG +#include "../cores/libretro-gong/gong.c" +#endif diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index fd3673afa0..717231a9d8 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -36,6 +36,9 @@ UI #ifndef __APPLE__ #define HAVE_MAIN /* also requires defining in frontend.c */ #endif + +#undef mkdir + #include "../ui/drivers/ui_qt.cpp" #include "../ui/drivers/qt/ui_qt_window.cpp" @@ -43,14 +46,14 @@ UI #include "../ui/drivers/qt/ui_qt_browser_window.cpp" #include "../ui/drivers/qt/ui_qt_msg_window.cpp" #include "../ui/drivers/qt/ui_qt_application.cpp" -#include "../ui/drivers/qt/flowlayout.cpp" +#include "../ui/drivers/qt/gridview.cpp" #include "../ui/drivers/qt/shaderparamsdialog.cpp" #include "../ui/drivers/qt/coreoptionsdialog.cpp" #include "../ui/drivers/qt/filedropwidget.cpp" #include "../ui/drivers/qt/coreinfodialog.cpp" #include "../ui/drivers/qt/playlistentrydialog.cpp" #include "../ui/drivers/qt/viewoptionsdialog.cpp" -#include "../ui/drivers/qt/playlist.cpp" +#include "../ui/drivers/qt/qt_playlist.cpp" #include "../ui/drivers/qt/updateretroarch.cpp" #include "../ui/drivers/qt/thumbnaildownload.cpp" #include "../ui/drivers/qt/thumbnailpackdownload.cpp" @@ -59,7 +62,7 @@ UI #include "../ui/drivers/qt/moc_coreinfodialog.cpp" #include "../ui/drivers/qt/moc_coreoptionsdialog.cpp" #include "../ui/drivers/qt/moc_filedropwidget.cpp" -#include "../ui/drivers/qt/moc_flowlayout.cpp" +#include "../ui/drivers/qt/moc_gridview.cpp" #include "../ui/drivers/qt/moc_playlistentrydialog.cpp" #include "../ui/drivers/qt/moc_shaderparamsdialog.cpp" #include "../ui/drivers/qt/moc_ui_qt_load_core_window.cpp" diff --git a/input/common/hid/device_wiiu_gca.c b/input/common/hid/device_wiiu_gca.c index 73e58681fb..b5198367b5 100644 --- a/input/common/hid/device_wiiu_gca.c +++ b/input/common/hid/device_wiiu_gca.c @@ -44,7 +44,6 @@ typedef struct gca_pad_data int16_t analog_state[3][2]; // analog state } gca_pad_t; - static void update_pad_state(wiiu_gca_instance_t *instance); static void unregister_pad(wiiu_gca_instance_t *instance, int port); @@ -279,7 +278,6 @@ static void update_analog_state(gca_pad_t *pad) } } - /** * The USB packet provides a 9-byte data packet for each pad. * @@ -302,8 +300,6 @@ static void wiiu_gca_packet_handler(void *data, uint8_t *packet, uint16_t size) update_analog_state(pad); } - - static void wiiu_gca_set_rumble(void *data, enum retro_rumble_effect effect, uint16_t strength) { (void)data; diff --git a/input/common/input_common.c b/input/common/input_common.c index 4f6e656363..aadc93275b 100644 --- a/input/common/input_common.c +++ b/input/common/input_common.c @@ -74,5 +74,3 @@ int16_t gamepad_get_axis_value(int16_t state[3][2], axis_data *data) return clamp_axis(value, data->is_negative); } - - diff --git a/input/common/linux_common.c b/input/common/linux_common.c index 0d35611db1..9754fa7005 100644 --- a/input/common/linux_common.c +++ b/input/common/linux_common.c @@ -71,7 +71,6 @@ bool linux_terminal_init(void) if (tcsetattr(0, TCSAFLUSH, &newTerm) < 0) return false; - return true; } diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 3e0339e9a0..47a1c3fa42 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -471,7 +471,6 @@ static void engine_handle_dpad_getaxisvalue(android_input_t *android, } #endif - static bool android_input_init_handle(void) { #ifdef HAVE_DYNAMIC diff --git a/input/drivers/cocoa_input.c b/input/drivers/cocoa_input.c index fa8454a6d7..b5dba8df36 100644 --- a/input/drivers/cocoa_input.c +++ b/input/drivers/cocoa_input.c @@ -136,7 +136,6 @@ int32_t cocoa_input_find_any_axis(uint32_t port) return 0; } - static void *cocoa_input_init(const char *joypad_driver) { cocoa_input_data_t *apple = (cocoa_input_data_t*)calloc(1, sizeof(*apple)); diff --git a/input/drivers/dinput.c b/input/drivers/dinput.c index 2d97f02495..aa80219e8e 100644 --- a/input/drivers/dinput.c +++ b/input/drivers/dinput.c @@ -98,8 +98,6 @@ void dinput_destroy_context(void) IDirectInput8_Release(g_dinput_ctx); g_dinput_ctx = NULL; - - CoUninitialize(); } bool dinput_init_context(void) @@ -107,12 +105,6 @@ bool dinput_init_context(void) if (g_dinput_ctx) return true; - if (FAILED(CoInitialize(NULL))) - { - RARCH_ERR("[DINPUT]: Failed to initialize the COM interface\n"); - return false; - } - /* Who said we shouldn't have same call signature in a COM API? <_< */ #ifdef __cplusplus if (!(SUCCEEDED(DirectInput8Create( @@ -131,12 +123,9 @@ bool dinput_init_context(void) error: RARCH_ERR("[DINPUT]: Failed to initialize DirectInput.\n"); - CoUninitialize(); return false; } - - static void *dinput_init(const char *joypad_driver) { struct dinput_input *di = NULL; @@ -246,7 +235,6 @@ static void dinput_poll(void *data) di->mouse_rel_x = mouse_state.lX; di->mouse_rel_y = mouse_state.lY; - if (!mouse_state.rgbButtons[0]) unset_doubleclick_on_titlebar(); if (doubleclick_on_titlebar_pressed()) @@ -764,9 +752,9 @@ static void dinput_clear_pointers(struct dinput_input *di) } } -bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lParam) +bool dinput_handle_message(void *data, UINT message, WPARAM wParam, LPARAM lParam) { - struct dinput_input *di = (struct dinput_input *)dinput; + struct dinput_input *di = (struct dinput_input *)data; /* WM_POINTERDOWN : Arrives for each new touch event * with a new ID - add to list. * WM_POINTERUP : Arrives once the pointer is no diff --git a/input/drivers/nullinput.c b/input/drivers/nullinput.c index e449e1d7fa..7de6d63867 100644 --- a/input/drivers/nullinput.c +++ b/input/drivers/nullinput.c @@ -87,7 +87,6 @@ static bool nullinput_keyboard_mapping_is_blocked(void *data) return false; } - input_driver_t input_null = { nullinput_input_init, nullinput_input_poll, diff --git a/input/drivers/ps3_input.c b/input/drivers/ps3_input.c index 7d8fee8b83..fead6eefc8 100644 --- a/input/drivers/ps3_input.c +++ b/input/drivers/ps3_input.c @@ -164,7 +164,6 @@ static void ps3_input_free_input(void *data) free(data); } - static void* ps3_input_init(const char *joypad_driver) { ps3_input_t *ps3 = (ps3_input_t*)calloc(1, sizeof(*ps3)); diff --git a/input/drivers/ps4_input.c b/input/drivers/ps4_input.c new file mode 100644 index 0000000000..a6a1e0b25b --- /dev/null +++ b/input/drivers/ps4_input.c @@ -0,0 +1,155 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include + +#include +#include +#include + +#include "../input_driver.h" + +/* TODO/FIXME - + * fix game focus toggle */ + +typedef struct ps4_input +{ + bool blocked; + const input_device_driver_t *joypad; +} ps4_input_t; + +static void ps4_input_poll(void *data) +{ + ps4_input_t *ps4 = (ps4_input_t*)data; + + if (ps4 && ps4->joypad) + ps4->joypad->poll(); +} + +static int16_t ps4_input_state(void *data, + rarch_joypad_info_t joypad_info, + const struct retro_keybind **binds, + unsigned port, unsigned device, + unsigned idx, unsigned id) +{ + ps4_input_t *ps4 = (ps4_input_t*)data; + + switch (device) + { + case RETRO_DEVICE_JOYPAD: + return input_joypad_pressed(ps4->joypad, joypad_info, port, binds[port], id); + case RETRO_DEVICE_ANALOG: + if (binds[port]) + return input_joypad_analog(ps4->joypad, joypad_info, port, idx, id, binds[port]); + break; + } + + return 0; +} + +static void ps4_input_free_input(void *data) +{ + ps4_input_t *ps4 = (ps4_input_t*)data; + + if (ps4 && ps4->joypad) + ps4->joypad->destroy(); + + free(data); +} + +static void* ps4_input_initialize(const char *joypad_driver) +{ + ps4_input_t *ps4 = (ps4_input_t*)calloc(1, sizeof(*ps4)); + if (!ps4) + return NULL; + + ps4->joypad = input_joypad_init_driver(joypad_driver, ps4); + + return ps4; +} + +static uint64_t ps4_input_get_capabilities(void *data) +{ + (void)data; + + return (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG); +} + +static const input_device_driver_t *ps4_input_get_joypad_driver(void *data) +{ + ps4_input_t *ps4 = (ps4_input_t*)data; + if (ps4) + return ps4->joypad; + return NULL; +} + +static void ps4_input_grab_mouse(void *data, bool state) +{ + (void)data; + (void)state; +} + +static bool ps4_input_set_rumble(void *data, unsigned port, + enum retro_rumble_effect effect, uint16_t strength) +{ + ps4_input_t *ps4 = (ps4_input_t*)data; + + if (ps4 && ps4->joypad) + return input_joypad_set_rumble(ps4->joypad, + port, effect, strength); + return false; +} + +static bool ps4_input_keyboard_mapping_is_blocked(void *data) +{ + ps4_input_t *ps4 = (ps4_input_t*)data; + if (!ps4) + return false; + return ps4->blocked; +} + +static void ps4_input_keyboard_mapping_set_block(void *data, bool value) +{ + ps4_input_t *ps4 = (ps4_input_t*)data; + if (!ps4) + return; + ps4->blocked = value; +} + +input_driver_t input_ps4 = { + ps4_input_initialize, + ps4_input_poll, + ps4_input_state, + ps4_input_free_input, + NULL, + NULL, + ps4_input_get_capabilities, + "ps4", + ps4_input_grab_mouse, + NULL, + ps4_input_set_rumble, + ps4_input_get_joypad_driver, + NULL, + ps4_input_keyboard_mapping_is_blocked, + ps4_input_keyboard_mapping_set_block, +}; diff --git a/input/drivers/qnx_input.c b/input/drivers/qnx_input.c index 276a1f3ca2..19d21e78a6 100644 --- a/input/drivers/qnx_input.c +++ b/input/drivers/qnx_input.c @@ -307,7 +307,6 @@ static void qnx_handle_device(qnx_input_t *qnx, RARCH_LOG("\tAnalog Count: %d\n", controller->analogCount); } - /* Find currently connected gamepads. */ static void qnx_discover_controllers(qnx_input_t *qnx) { diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c index 455c54a1b9..f4e24ea512 100644 --- a/input/drivers/udev_input.c +++ b/input/drivers/udev_input.c @@ -134,7 +134,6 @@ struct udev_input struct udev *udev; struct udev_monitor *monitor; - const input_device_driver_t *joypad; int fd; @@ -225,7 +224,7 @@ static udev_input_mouse_t *udev_get_mouse(struct udev_input *udev, unsigned port settings_t *settings = config_get_ptr(); udev_input_mouse_t *mouse = NULL; - if (port >= MAX_USERS) + if (port >= MAX_USERS || !video_driver_cb_has_focus()) return NULL; for (i = 0; i < udev->num_devices; ++i) diff --git a/input/drivers/uwp_input.c b/input/drivers/uwp_input.c index 4c2f53af19..66c029d1c9 100644 --- a/input/drivers/uwp_input.c +++ b/input/drivers/uwp_input.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2018 - Krzysztof Haładyn + * Copyright (C) 2018-2019 - Krzysztof Haładyn * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -45,38 +45,6 @@ static void uwp_input_poll(void *data) uwp_input_next_frame(); } -static int16_t uwp_input_state(void *data, - rarch_joypad_info_t joypad_info, - const struct retro_keybind **binds, - unsigned port, unsigned device, - unsigned index, unsigned id) -{ - uwp_input_t *uwp = (uwp_input_t*)data; - - switch (device) - { - case RETRO_DEVICE_JOYPAD: - return input_joypad_pressed(uwp->joypad, joypad_info, port, binds[port], id); - case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(uwp->joypad, joypad_info, port, index, id, binds[port]); - break; - - case RETRO_DEVICE_KEYBOARD: - return (id < RETROK_LAST) && uwp_keyboard_pressed(id); - - case RETRO_DEVICE_MOUSE: - case RARCH_DEVICE_MOUSE_SCREEN: - return uwp_mouse_state(port, id, device == RARCH_DEVICE_MOUSE_SCREEN); - - case RETRO_DEVICE_POINTER: - case RARCH_DEVICE_POINTER_SCREEN: - return uwp_pointer_state(index, id, device == RARCH_DEVICE_POINTER_SCREEN); - } - - return 0; -} - static void uwp_input_free_input(void *data) { uwp_input_t *uwp = (uwp_input_t*)data; @@ -155,6 +123,93 @@ static void uwp_keyboard_mapping_set_block(void *data, bool value) uwp->blocked = value; } +static bool uwp_pressed_joypad(uwp_input_t *uwp, + rarch_joypad_info_t joypad_info, + const struct retro_keybind *binds, + unsigned port, unsigned id) +{ + const struct retro_keybind *bind = &binds[id]; + + /* First, process the keyboard bindings */ + if ((bind->key < RETROK_LAST) && uwp_keyboard_pressed(bind->key)) + if ((id == RARCH_GAME_FOCUS_TOGGLE) || !uwp->blocked) + return true; + + /* Then, process the joypad bindings */ + if (binds && binds[id].valid) + { + if (uwp_mouse_state(port, bind->mbutton, false)) + return true; + if (input_joypad_pressed(uwp->joypad, joypad_info, port, binds, id)) + return true; + } + + return false; +} + +static int16_t uwp_pressed_analog(uwp_input_t *uwp, + rarch_joypad_info_t joypad_info, + const struct retro_keybind *binds, + unsigned port, unsigned idx, unsigned id) +{ + const struct retro_keybind *bind_minus, *bind_plus; + int16_t pressed_minus = 0, pressed_plus = 0, pressed_keyboard; + unsigned id_minus = 0, id_plus = 0; + + /* First, process the keyboard bindings */ + input_conv_analog_id_to_bind_id(idx, id, &id_minus, &id_plus); + + bind_minus = &binds[id_minus]; + bind_plus = &binds[id_plus]; + + if (!bind_minus->valid || !bind_plus->valid) + return 0; + + if ((bind_minus->key < RETROK_LAST) && uwp_keyboard_pressed(bind_minus->key)) + pressed_minus = -0x7fff; + if ((bind_plus->key < RETROK_LAST) && uwp_keyboard_pressed(bind_plus->key)) + pressed_plus = 0x7fff; + + pressed_keyboard = pressed_plus + pressed_minus; + if (pressed_keyboard != 0) + return pressed_keyboard; + + /* Then, process the joypad bindings */ + return input_joypad_analog(uwp->joypad, joypad_info, port, idx, id, binds); +} + +static int16_t uwp_input_state(void *data, + rarch_joypad_info_t joypad_info, + const struct retro_keybind **binds, + unsigned port, unsigned device, + unsigned index, unsigned id) +{ + uwp_input_t *uwp = (uwp_input_t*)data; + + switch (device) + { + case RETRO_DEVICE_JOYPAD: + if (id < RARCH_BIND_LIST_END) + return uwp_pressed_joypad(uwp, joypad_info, binds[port], port, id); + case RETRO_DEVICE_ANALOG: + if (binds[port]) + return uwp_pressed_analog(uwp, joypad_info, binds[port], port, index, id); + + case RETRO_DEVICE_KEYBOARD: + return (id < RETROK_LAST) && uwp_keyboard_pressed(id); + + case RETRO_DEVICE_MOUSE: + case RARCH_DEVICE_MOUSE_SCREEN: + return uwp_mouse_state(port, id, device == RARCH_DEVICE_MOUSE_SCREEN); + + case RETRO_DEVICE_POINTER: + case RARCH_DEVICE_POINTER_SCREEN: + return uwp_pointer_state(index, id, device == RARCH_DEVICE_POINTER_SCREEN); + } + + return 0; +} + input_driver_t input_uwp = { uwp_input_init, uwp_input_poll, diff --git a/input/drivers/wayland_input.c b/input/drivers/wayland_input.c index 88b7169d1d..e9f8c63c7b 100644 --- a/input/drivers/wayland_input.c +++ b/input/drivers/wayland_input.c @@ -50,7 +50,6 @@ /* TODO/FIXME - * fix game focus toggle */ - /* Forward declaration */ void flush_wayland_fd(void *data); @@ -282,9 +281,6 @@ static int16_t input_wl_touch_state(input_ctx_wayland_data_t *wl, return 0; } - - - static int16_t input_wl_state(void *data, rarch_joypad_info_t joypad_info, const struct retro_keybind **binds, @@ -426,4 +422,3 @@ input_driver_t input_wayland = { input_wl_keyboard_mapping_is_blocked, input_wl_keyboard_mapping_set_block, }; - diff --git a/input/drivers/wiiu_input.c b/input/drivers/wiiu_input.c index ba00ed971a..fae110f2f7 100644 --- a/input/drivers/wiiu_input.c +++ b/input/drivers/wiiu_input.c @@ -71,7 +71,6 @@ void kb_key_callback(KBDKeyEvent *key) if (code < RETROK_LAST) keyboardState[code] = pressed; - if (key->modifier & KBD_WIIU_SHIFT) mod |= RETROKMOD_SHIFT; diff --git a/input/drivers/winraw_input.c b/input/drivers/winraw_input.c index 35d40d6ad3..cd7521c879 100644 --- a/input/drivers/winraw_input.c +++ b/input/drivers/winraw_input.c @@ -133,14 +133,16 @@ static bool winraw_set_keyboard_input(HWND window) static void winraw_log_mice_info(winraw_mouse_t *mice, unsigned mouse_cnt) { - UINT r; unsigned i; char name[256]; UINT name_size = sizeof(name); + name[0] = '\0'; + for (i = 0; i < mouse_cnt; ++i) { - r = GetRawInputDeviceInfoA(mice[i].hnd, RIDI_DEVICENAME, name, &name_size); + UINT r = GetRawInputDeviceInfoA(mice[i].hnd, RIDI_DEVICENAME, + name, &name_size); if (r == (UINT)-1 || r == 0) name[0] = '\0'; RARCH_LOG("[WINRAW]: Mouse #%u %s.\n", i, name); diff --git a/input/drivers/x11_input.c b/input/drivers/x11_input.c index 466c94b2e3..77cd53438d 100644 --- a/input/drivers/x11_input.c +++ b/input/drivers/x11_input.c @@ -452,7 +452,6 @@ static void x_input_poll_mouse(x11_input_t *x11) } } - static void x_input_poll(void *data) { x11_input_t *x11 = (x11_input_t*)data; diff --git a/input/drivers_hid/btstack_hid.c b/input/drivers_hid/btstack_hid.c index cf7e1cf6c9..f690a26a80 100644 --- a/input/drivers_hid/btstack_hid.c +++ b/input/drivers_hid/btstack_hid.c @@ -459,7 +459,6 @@ extern const hci_cmd_t rfcomm_persistent_channel_for_service; /* linked_list.h */ - void linked_item_set_user(linked_item_t *item, void *user_data); void * linked_item_get_user(linked_item_t *item); @@ -478,8 +477,6 @@ void test_linked_list(void); /* run_loop.h */ - - /* Set timer based on current time in milliseconds. */ void run_loop_set_timer(timer_source_t *a, uint32_t timeout_in_ms); @@ -526,7 +523,6 @@ uint32_t embedded_get_ticks(void); /* Connection handle type. */ - /* helper for BT little endian format. */ #define READ_BT_16( buffer, pos) ( ((uint16_t) buffer[pos]) | (((uint16_t)buffer[pos+1]) << 8)) #define READ_BT_24( buffer, pos) ( ((uint32_t) buffer[pos]) | (((uint32_t)buffer[pos+1]) << 8) | (((uint32_t)buffer[pos+2]) << 16)) @@ -592,7 +588,6 @@ uint8_t crc8_calc(uint8_t *data, uint16_t len); /* UNIX domain socket for BTstack. */ #define BTSTACK_UNIX "/tmp/BTstack" - /* Optional * * If called before bt_open, TCP socket is used @@ -975,7 +970,6 @@ static struct btstack_hid_adapter *btpad_find_connection_for( return 0; } - static void btpad_queue_reset(void) { insert_position = 0; @@ -983,7 +977,6 @@ static void btpad_queue_reset(void) can_run = 1; } - static void btpad_queue_btstack_set_power_mode( struct btpad_queue_command *cmd, uint8_t on) { @@ -997,8 +990,6 @@ static void btpad_queue_btstack_set_power_mode( btpad_queue_process(); } - - static void btpad_set_inquiry_state(bool on) { inquiry_off = !on; @@ -1348,8 +1339,6 @@ static void btstack_set_poweron(bool on) } } - - static bool btstack_hid_joypad_query(void *data, unsigned pad) { return pad < MAX_USERS; diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c index 2f0a8da0fe..9a52f08f7e 100644 --- a/input/drivers_hid/iohidmanager_hid.c +++ b/input/drivers_hid/iohidmanager_hid.c @@ -545,9 +545,6 @@ static void iohidmanager_hid_device_get_product_string( CFStringGetCString(ref, buf, len, kCFStringEncodingUTF8); } - - - static void iohidmanager_hid_device_add_autodetect(unsigned idx, const char *device_name, const char *driver_name, uint16_t dev_vid, uint16_t dev_pid) @@ -877,7 +874,6 @@ static void iohidmanager_hid_device_add_device( tmpButtons = next; } - iohidmanager_hid_device_add_autodetect(adapter->slot, adapter->name, iohidmanager_hid.ident, dev_vid, dev_pid); @@ -967,7 +963,6 @@ static int iohidmanager_hid_manager_init(iohidmanager_hid_t *hid) return 0; } - static int iohidmanager_hid_manager_free(iohidmanager_hid_t *hid) { if (!hid || !hid->ptr) @@ -1059,7 +1054,6 @@ static int iohidmanager_hid_manager_set_device_matching( } free(device_array); - #if !(defined(__ppc__) || defined(__ppc64__)) /* register call back to dynamically add device plugged when retroarch is * running diff --git a/input/drivers_hid/libusb_hid.c b/input/drivers_hid/libusb_hid.c index b7622b92c1..4f564df244 100644 --- a/input/drivers_hid/libusb_hid.c +++ b/input/drivers_hid/libusb_hid.c @@ -428,7 +428,6 @@ static int libusb_hid_hotplug_callback(struct libusb_context *ctx, return 0; } - static bool libusb_hid_joypad_query(void *data, unsigned pad) { return pad < MAX_USERS; @@ -639,7 +638,6 @@ error: return NULL; } - static void libusb_hid_poll(void *data) { (void)data; diff --git a/input/drivers_hid/wiiu_hid.c b/input/drivers_hid/wiiu_hid.c index ca15e41249..16fbd9354a 100644 --- a/input/drivers_hid/wiiu_hid.c +++ b/input/drivers_hid/wiiu_hid.c @@ -240,7 +240,6 @@ static int32_t wiiu_hid_read(void *data, void *buffer, size_t size) return result; } - static void start_polling_thread(wiiu_hid_t *hid) { OSThreadAttributes attributes = OS_THREAD_ATTRIB_AFFINITY_CPU2; @@ -285,7 +284,6 @@ error: return; } - static void stop_polling_thread(wiiu_hid_t *hid) { int thread_result = 0; @@ -328,7 +326,6 @@ static void log_device(HIDDevice *device) RARCH_LOG(" max_packet_size_tx: %d\n", device->max_packet_size_tx); } - static uint8_t try_init_driver(wiiu_adapter_t *adapter) { adapter->driver_handle = adapter->driver->init(adapter); @@ -460,7 +457,6 @@ static void wiiu_hid_detach(wiiu_hid_t *hid, wiiu_attach_event *event) adapter->connected = false; } - static void wiiu_hid_attach(wiiu_hid_t *hid, wiiu_attach_event *event) { wiiu_adapter_t *adapter = new_adapter(event); @@ -798,7 +794,6 @@ static void delete_attach_event(wiiu_attach_event *event) free(event); } - void *alloc_zeroed(size_t alignment, size_t size) { void *result = memalign(alignment, size); @@ -808,7 +803,6 @@ void *alloc_zeroed(size_t alignment, size_t size) return result; } - hid_driver_t wiiu_hid = { wiiu_hid_init, wiiu_hid_joypad_query, @@ -826,4 +820,3 @@ hid_driver_t wiiu_hid = { wiiu_hid_set_protocol, wiiu_hid_read, }; - diff --git a/input/drivers_joypad/android_joypad.c b/input/drivers_joypad/android_joypad.c index a818406092..fa1b8e3596 100644 --- a/input/drivers_joypad/android_joypad.c +++ b/input/drivers_joypad/android_joypad.c @@ -94,7 +94,6 @@ static bool android_joypad_query_pad(unsigned pad) return (pad < MAX_USERS); } - static void android_joypad_destroy(void) { unsigned i, j; diff --git a/input/drivers_joypad/ctr_joypad.c b/input/drivers_joypad/ctr_joypad.c index 1bfd559cd2..6bf24ab9cc 100644 --- a/input/drivers_joypad/ctr_joypad.c +++ b/input/drivers_joypad/ctr_joypad.c @@ -185,7 +185,6 @@ static bool ctr_joypad_query_pad(unsigned pad) return pad < MAX_USERS && pad_state; } - static void ctr_joypad_destroy(void) { } diff --git a/input/drivers_joypad/dinput_joypad.c b/input/drivers_joypad/dinput_joypad.c index b5e3d31d22..c58a5591f8 100644 --- a/input/drivers_joypad/dinput_joypad.c +++ b/input/drivers_joypad/dinput_joypad.c @@ -36,7 +36,7 @@ #include "../../verbosity.h" #include "dinput_joypad.h" -struct dinput_joypad +struct dinput_joypad_data { LPDIRECTINPUTDEVICE8 joypad; DIJOYSTATE2 joy_state; @@ -48,7 +48,7 @@ struct dinput_joypad DIEFFECT rumble_props; }; -static struct dinput_joypad g_pads[MAX_USERS]; +static struct dinput_joypad_data g_pads[MAX_USERS]; static unsigned g_joypad_cnt; static unsigned g_last_xinput_pad_idx; @@ -130,7 +130,7 @@ static void dinput_joypad_destroy(void) dinput_destroy_context(); } -static void dinput_create_rumble_effects(struct dinput_joypad *pad) +static void dinput_create_rumble_effects(struct dinput_joypad_data *pad) { DIENVELOPE dienv; DICONSTANTFORCE dicf; @@ -160,15 +160,27 @@ static void dinput_create_rumble_effects(struct dinput_joypad *pad) pad->rumble_props.rgdwAxes = &axis; pad->rumble_props.rglDirection = &direction; +#ifdef __cplusplus + if (IDirectInputDevice8_CreateEffect(pad->joypad, GUID_ConstantForce, + &pad->rumble_props, &pad->rumble_iface[0], NULL) != DI_OK) + RARCH_WARN("[DINPUT]: Strong rumble unavailable.\n"); +#else if (IDirectInputDevice8_CreateEffect(pad->joypad, &GUID_ConstantForce, &pad->rumble_props, &pad->rumble_iface[0], NULL) != DI_OK) RARCH_WARN("[DINPUT]: Strong rumble unavailable.\n"); +#endif axis = DIJOFS_Y; +#ifdef __cplusplus + if (IDirectInputDevice8_CreateEffect(pad->joypad, GUID_ConstantForce, + &pad->rumble_props, &pad->rumble_iface[1], NULL) != DI_OK) + RARCH_WARN("[DINPUT]: Weak rumble unavailable.\n"); +#else if (IDirectInputDevice8_CreateEffect(pad->joypad, &GUID_ConstantForce, &pad->rumble_props, &pad->rumble_iface[1], NULL) != DI_OK) RARCH_WARN("[DINPUT]: Weak rumble unavailable.\n"); +#endif } static BOOL CALLBACK enum_axes_cb( @@ -408,8 +420,8 @@ static bool dinput_joypad_init(void *data) static bool dinput_joypad_button(unsigned port_num, uint16_t joykey) { - unsigned hat_dir = 0; - const struct dinput_joypad *pad = &g_pads[port_num]; + unsigned hat_dir = 0; + const struct dinput_joypad_data *pad = &g_pads[port_num]; if (!pad || !pad->joypad) return false; @@ -461,11 +473,11 @@ static bool dinput_joypad_button(unsigned port_num, uint16_t joykey) static int16_t dinput_joypad_axis(unsigned port_num, uint32_t joyaxis) { - const struct dinput_joypad *pad = NULL; - int val = 0; - int axis = -1; - bool is_neg = false; - bool is_pos = false; + const struct dinput_joypad_data *pad = NULL; + int val = 0; + int axis = -1; + bool is_neg = false; + bool is_pos = false; if (joyaxis == AXIS_NONE) return 0; @@ -526,8 +538,8 @@ static void dinput_joypad_poll(void) unsigned i; for (i = 0; i < MAX_USERS; i++) { - struct dinput_joypad *pad = &g_pads[i]; - bool polled = g_xinput_pad_indexes[i] < 0; + struct dinput_joypad_data *pad = &g_pads[i]; + bool polled = g_xinput_pad_indexes[i] < 0; if (!pad || !pad->joypad || !polled) continue; diff --git a/input/drivers_joypad/linuxraw_joypad.c b/input/drivers_joypad/linuxraw_joypad.c index b87a6e7bd0..8a209aa5a7 100644 --- a/input/drivers_joypad/linuxraw_joypad.c +++ b/input/drivers_joypad/linuxraw_joypad.c @@ -371,7 +371,6 @@ static bool linuxraw_joypad_query_pad(unsigned pad) return pad < MAX_USERS && linuxraw_pads[pad].fd >= 0; } - input_device_driver_t linuxraw_joypad = { linuxraw_joypad_init, linuxraw_joypad_query_pad, diff --git a/input/drivers_joypad/null_joypad.c b/input/drivers_joypad/null_joypad.c index d41198a8bf..1c4ad06956 100644 --- a/input/drivers_joypad/null_joypad.c +++ b/input/drivers_joypad/null_joypad.c @@ -56,7 +56,6 @@ static bool null_joypad_query_pad(unsigned pad) return true; } - static void null_joypad_destroy(void) { } diff --git a/input/drivers_joypad/ps2_joypad.c b/input/drivers_joypad/ps2_joypad.c index 35d05cf3e9..8ba07273c6 100644 --- a/input/drivers_joypad/ps2_joypad.c +++ b/input/drivers_joypad/ps2_joypad.c @@ -21,17 +21,14 @@ #include "libpad.h" -#define PS2_MAX_PADS 1 +#define PS2_MAX_PADS 2 +#define PS2_PAD_SLOT 0 /* Always zero if not using multitap */ -/* - * Global var's - */ -// pad_dma_buf is provided by the user, one buf for each pad -// contains the pad's current state -static char padBuf[256] __attribute__((aligned(64))); +static unsigned char padBuf[2][256] ALIGNED(64); static uint64_t pad_state[PS2_MAX_PADS]; +extern uint64_t lifecycle_state; static const char *ps2_joypad_name(unsigned pad) { @@ -40,41 +37,32 @@ static const char *ps2_joypad_name(unsigned pad) static bool ps2_joypad_init(void *data) { - unsigned i; - unsigned players_count = PS2_MAX_PADS; + unsigned ret, port; + bool init = true; - for (i = 0; i < players_count; i++) - { - bool auto_configure = input_autoconfigure_connect( ps2_joypad_name(i), + printf("PortMax: %d\n", padGetPortMax()); + printf("SlotMax: %d\n", padGetSlotMax(port)); + + for (port = 0; port < PS2_MAX_PADS; port++) { + bool auto_configure = input_autoconfigure_connect( ps2_joypad_name(port), NULL, ps2_joypad.ident, - i, + port, 0, 0); if (!auto_configure) { - input_config_set_device_name(i, ps2_joypad_name(i)); + input_config_set_device_name(port, ps2_joypad_name(port)); } - padInit(i); - - int ret; - int port, slot; - - port = 0; // 0 -> Connector 1, 1 -> Connector 2 - slot = 0; // Always zero if not using multitap - - printf("PortMax: %d\n", padGetPortMax()); - printf("SlotMax: %d\n", padGetSlotMax(port)); - - - if((ret = padPortOpen(port, slot, padBuf)) == 0) { + /* Port 0 -> Connector 1, Port 1 -> Connector 2 */ + if((ret = padPortOpen(port, PS2_PAD_SLOT, padBuf[port])) == 0) { printf("padOpenPort failed: %d\n", ret); + init = false; + break; } - - } - return true; + return init; } static bool ps2_joypad_button(unsigned port_num, uint16_t joykey) @@ -98,38 +86,34 @@ static int16_t ps2_joypad_axis(unsigned port_num, uint32_t joyaxis) static void ps2_joypad_poll(void) { unsigned player; - unsigned players_count = PS2_MAX_PADS; struct padButtonStatus buttons; - for (player = 0; player < players_count; player++) - { - unsigned j, k; - unsigned i = player; - unsigned p = player; - - int ret = padRead(player, player, &buttons); // port, slot, buttons - if (ret != 0) - { - int32_t state_tmp = 0xffff ^ buttons.btns; + for (player = 0; player < PS2_MAX_PADS; player++) { + int state = padGetState(player, PS2_PAD_SLOT); + if (state == PAD_STATE_STABLE) { + int ret = padRead(player, PS2_PAD_SLOT, &buttons); /* port, slot, buttons */ + if (ret != 0) { + int32_t state_tmp = 0xffff ^ buttons.btns; + pad_state[player] = 0; - pad_state[i] = 0; - - pad_state[i] |= (state_tmp & PAD_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; - pad_state[i] |= (state_tmp & PAD_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; - pad_state[i] |= (state_tmp & PAD_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; - pad_state[i] |= (state_tmp & PAD_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; - pad_state[i] |= (state_tmp & PAD_START) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; - pad_state[i] |= (state_tmp & PAD_SELECT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; - pad_state[i] |= (state_tmp & PAD_TRIANGLE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; - pad_state[i] |= (state_tmp & PAD_SQUARE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; - pad_state[i] |= (state_tmp & PAD_CROSS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; - pad_state[i] |= (state_tmp & PAD_CIRCLE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; - pad_state[i] |= (state_tmp & PAD_R1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; - pad_state[i] |= (state_tmp & PAD_L1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; - pad_state[i] |= (state_tmp & PAD_R2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; - pad_state[i] |= (state_tmp & PAD_L2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; - pad_state[i] |= (state_tmp & PAD_R3) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; - pad_state[i] |= (state_tmp & PAD_L3) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; + pad_state[player] |= (state_tmp & PAD_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; + pad_state[player] |= (state_tmp & PAD_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; + pad_state[player] |= (state_tmp & PAD_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; + pad_state[player] |= (state_tmp & PAD_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; + pad_state[player] |= (state_tmp & PAD_START) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; + pad_state[player] |= (state_tmp & PAD_SELECT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; + pad_state[player] |= (state_tmp & PAD_TRIANGLE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; + pad_state[player] |= (state_tmp & PAD_SQUARE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; + pad_state[player] |= (state_tmp & PAD_CROSS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; + pad_state[player] |= (state_tmp & PAD_CIRCLE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; + pad_state[player] |= (state_tmp & PAD_R1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; + pad_state[player] |= (state_tmp & PAD_L1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; + pad_state[player] |= (state_tmp & PAD_R2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; + pad_state[player] |= (state_tmp & PAD_L2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; + pad_state[player] |= (state_tmp & PAD_R3) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; + pad_state[player] |= (state_tmp & PAD_L3) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; + + } } } @@ -146,9 +130,12 @@ static bool ps2_joypad_rumble(unsigned pad, return false; } - static void ps2_joypad_destroy(void) { + unsigned port; + for (port = 0; port < PS2_MAX_PADS; port++) { + padPortClose(port, PS2_PAD_SLOT); + } } input_device_driver_t ps2_joypad = { diff --git a/input/drivers_joypad/ps3_joypad.c b/input/drivers_joypad/ps3_joypad.c index 0088f6d256..79d8748776 100644 --- a/input/drivers_joypad/ps3_joypad.c +++ b/input/drivers_joypad/ps3_joypad.c @@ -266,7 +266,6 @@ static void ps3_joypad_destroy(void) cellPadEnd(); } - input_device_driver_t ps3_joypad = { ps3_joypad_init, ps3_joypad_query_pad, diff --git a/input/drivers_joypad/ps4_joypad.c b/input/drivers_joypad/ps4_joypad.c new file mode 100644 index 0000000000..d9a65c88a2 --- /dev/null +++ b/input/drivers_joypad/ps4_joypad.c @@ -0,0 +1,223 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2013-2014 - CatalystG + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include + +#include "../input_driver.h" + +#include "../../tasks/tasks_internal.h" + +#include +#include + +#define PS4_MAX_ORBISPADS 16 +#define SCE_USER_SERVICE_MAX_LOGIN_USERS 16 +#define SCE_USER_SERVICE_USER_ID_INVALID 0xFFFFFFFF +#define SCE_ORBISPAD_ERROR_ALREADY_OPENED 0x80920004 + +#define ORBISPAD_L3 0x00000002 +#define ORBISPAD_R3 0x00000004 +#define ORBISPAD_OPTIONS 0x00000008 +#define ORBISPAD_UP 0x00000010 +#define ORBISPAD_RIGHT 0x00000020 +#define ORBISPAD_DOWN 0x00000040 +#define ORBISPAD_LEFT 0x00000080 +#define ORBISPAD_L2 0x00000100 +#define ORBISPAD_R2 0x00000200 +#define ORBISPAD_L1 0x00000400 +#define ORBISPAD_R1 0x00000800 +#define ORBISPAD_TRIANGLE 0x00001000 +#define ORBISPAD_CIRCLE 0x00002000 +#define ORBISPAD_CROSS 0x00004000 +#define ORBISPAD_SQUARE 0x00008000 +#define ORBISPAD_TOUCH_PAD 0x00100000 +#define ORBISPAD_INTERCEPTED 0x80000000 + +typedef struct SceUserServiceLoginUserIdList { + int32_t userId[SCE_USER_SERVICE_MAX_LOGIN_USERS]; +} SceUserServiceLoginUserIdList; + +int sceUserServiceGetLoginUserIdList(SceUserServiceLoginUserIdList* userIdList); + +/* + * Global var's + */ +typedef struct +{ + SceUserServiceUserId userId; + int handle; + bool connected; +} ds_joypad_state; + +static ds_joypad_state ds_joypad_states[PS4_MAX_ORBISPADS]; +static uint64_t pad_state[PS4_MAX_ORBISPADS]; +static int16_t analog_state[PS4_MAX_ORBISPADS][2][2]; +static int16_t num_players = 0; + + +static const char *ps4_joypad_name(unsigned pad) +{ + return "PS4 Controller"; +} + +static bool ps4_joypad_init(void *data) +{ + num_players = 0; + + scePadInit(); + + SceUserServiceLoginUserIdList userIdList; + + int result = sceUserServiceGetLoginUserIdList(&userIdList); + RARCH_LOG("sceUserServiceGetLoginUserIdList %x ", result); + if (result == 0) + { + + for (int i = 0; i < SCE_USER_SERVICE_MAX_LOGIN_USERS; i++) + { + SceUserServiceUserId userId = userIdList.userId[i]; + RARCH_LOG("USER %d ID %x\n", i, userId); + if (userId != SCE_USER_SERVICE_USER_ID_INVALID) + { + int index = 0; + + while(index < num_players){ + ds_joypad_states[index].userId = userId; + index++; + } + + if (index == num_players) + { + ds_joypad_states[num_players].handle = scePadOpen(userId, 0, 0, NULL); + RARCH_LOG("USER %x HANDLE %x\n", userId, ds_joypad_states[num_players].handle); + if (ds_joypad_states[num_players].handle > 0){ + ds_joypad_states[num_players].connected = true; + ds_joypad_states[num_players].userId = userId; + RARCH_LOG("NEW PAD: num_players %x \n", num_players); + + bool auto_configure = input_autoconfigure_connect( ps4_joypad_name(num_players), + NULL, + ps4_joypad.ident, + num_players, + 0, + 0); + if (!auto_configure) { + input_config_set_device_name(num_players, ps4_joypad_name(num_players)); + } + num_players++; + } + } + } + + } + + } + + return true; +} + +static bool ps4_joypad_button(unsigned port_num, uint16_t joykey) +{ + if (port_num >= PS4_MAX_ORBISPADS) + return false; + return (pad_state[port_num] & (UINT64_C(1) << joykey)); +} + +static void ps4_joypad_get_buttons(unsigned port_num, input_bits_t *state) +{ + if (port_num < PS4_MAX_ORBISPADS) + { + BITS_COPY16_PTR( state, pad_state[port_num] ); + } + else + BIT256_CLEAR_ALL_PTR(state); +} + +static int16_t ps4_joypad_axis(unsigned port_num, uint32_t joyaxis) +{ + return 0; +} + +static void ps4_joypad_poll(void) +{ + unsigned player; + unsigned players_count = num_players; + ScePadData buttons; + + for (player = 0; player < players_count; player++) + { + unsigned j, k; + unsigned i = player; + unsigned p = player; + + int ret = scePadReadState(ds_joypad_states[player].handle,&buttons); + if (ret == 0) + { + int32_t state_tmp = buttons.buttons; + pad_state[i] = 0; + + pad_state[i] |= (state_tmp & ORBISPAD_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_OPTIONS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_TOUCH_PAD) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_TRIANGLE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_SQUARE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_CROSS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_CIRCLE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_R1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_L1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_R2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_L2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_R3) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; + pad_state[i] |= (state_tmp & ORBISPAD_L3) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; + } + } + +} + +static bool ps4_joypad_query_pad(unsigned pad) +{ + return pad < PS4_MAX_ORBISPADS && pad_state[pad]; +} + +static bool ps4_joypad_rumble(unsigned pad, + enum retro_rumble_effect effect, uint16_t strength) +{ + return false; +} + + +static void ps4_joypad_destroy(void) +{ +} + +input_device_driver_t ps4_joypad = { + ps4_joypad_init, + ps4_joypad_query_pad, + ps4_joypad_destroy, + ps4_joypad_button, + ps4_joypad_get_buttons, + ps4_joypad_axis, + ps4_joypad_poll, + ps4_joypad_rumble, + ps4_joypad_name, + "ps4", +}; diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index 309a8a0f3c..6bba2eba92 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -375,7 +375,6 @@ static bool psp_joypad_rumble(unsigned pad, #endif } - static void psp_joypad_destroy(void) { } diff --git a/input/drivers_joypad/qnx_joypad.c b/input/drivers_joypad/qnx_joypad.c index 7279779e1e..ece4871971 100644 --- a/input/drivers_joypad/qnx_joypad.c +++ b/input/drivers_joypad/qnx_joypad.c @@ -120,7 +120,6 @@ static bool qnx_joypad_query_pad(unsigned pad) return (pad < MAX_USERS); } - static void qnx_joypad_destroy(void) { } diff --git a/input/drivers_joypad/rwebpad_joypad.c b/input/drivers_joypad/rwebpad_joypad.c index 4278afb757..3159bf69a5 100644 --- a/input/drivers_joypad/rwebpad_joypad.c +++ b/input/drivers_joypad/rwebpad_joypad.c @@ -47,7 +47,6 @@ static EM_BOOL rwebpad_gamepad_cb(int event_type, pid = 1; } - if (event_type == EMSCRIPTEN_EVENT_GAMEPADCONNECTED) { if(!input_autoconfigure_connect( @@ -199,7 +198,6 @@ static bool rwebpad_joypad_query_pad(unsigned pad) return false; } - static void rwebpad_joypad_destroy(void) { } diff --git a/input/drivers_joypad/switch_joypad.c b/input/drivers_joypad/switch_joypad.c index b92397779b..c40745af31 100644 --- a/input/drivers_joypad/switch_joypad.c +++ b/input/drivers_joypad/switch_joypad.c @@ -17,7 +17,6 @@ #include "../../command.h" #include "string.h" - #ifdef HAVE_LIBNX #ifndef MAX_PADS diff --git a/input/drivers_joypad/udev_joypad.c b/input/drivers_joypad/udev_joypad.c index 6146e1e552..27fe3f5654 100644 --- a/input/drivers_joypad/udev_joypad.c +++ b/input/drivers_joypad/udev_joypad.c @@ -118,7 +118,6 @@ static int udev_find_vacant_pad(void) return -1; } - static int udev_open_joystick(const char *path) { unsigned long evbit[NBITS(EV_MAX)] = {0}; @@ -544,8 +543,8 @@ static void udev_joypad_poll(void) /* Used for sorting devnodes to appear in the correct order */ static int sort_devnodes(const void *a, const void *b) { - const struct joypad_udev_entry *aa = a; - const struct joypad_udev_entry *bb = b; + const struct joypad_udev_entry *aa = (const struct joypad_udev_entry*)a; + const struct joypad_udev_entry *bb = (const struct joypad_udev_entry*)b; return strcmp(aa->devnode, bb->devnode); } diff --git a/input/drivers_joypad/wiiu/wpad_driver.c b/input/drivers_joypad/wiiu/wpad_driver.c index 3f008342c7..82ced41e99 100644 --- a/input/drivers_joypad/wiiu/wpad_driver.c +++ b/input/drivers_joypad/wiiu/wpad_driver.c @@ -51,7 +51,6 @@ static int16_t scale_touchpad(int16_t from_min, int16_t from_max, return (((value - from_min) * to_range) / from_range) + to_min; } - static void get_calibrated_point(VPADTouchData *point, struct video_viewport *viewport, VPADStatus *vpad) { VPADTouchData calibrated720p = {0}; @@ -154,7 +153,6 @@ static void update_touch_state(int16_t state[3][2], uint64_t *buttons, VPADStatu state[WIIU_DEVICE_INDEX_TOUCHPAD][RETRO_DEVICE_ID_ANALOG_Y]); #endif - if (!touch_clamped) *buttons |= VPAD_BUTTON_TOUCH; else @@ -167,7 +165,6 @@ static void check_panic_button(uint32_t held_buttons) command_event(CMD_EVENT_QUIT, NULL); } - static void wpad_poll(void) { VPADStatus vpad; diff --git a/input/drivers_joypad/wiiu_joypad.c b/input/drivers_joypad/wiiu_joypad.c index 12151519ef..69acd5605c 100644 --- a/input/drivers_joypad/wiiu_joypad.c +++ b/input/drivers_joypad/wiiu_joypad.c @@ -21,7 +21,6 @@ static input_device_driver_t *pad_drivers[MAX_USERS]; extern pad_connection_listener_t wiiu_pad_connection_listener; - static bool ready = false; static bool wiiu_joypad_init(void *data); diff --git a/input/drivers_joypad/xinput_joypad.c b/input/drivers_joypad/xinput_joypad.c index 8bf4d26594..727a3d4a64 100644 --- a/input/drivers_joypad/xinput_joypad.c +++ b/input/drivers_joypad/xinput_joypad.c @@ -42,9 +42,6 @@ #ifdef HAVE_DINPUT #include "dinput_joypad.h" -#else -int g_xinput_pad_indexes[MAX_USERS]; -bool g_xinput_block_pads; #endif #if defined(__WINRT__) @@ -104,6 +101,7 @@ typedef struct #define ERROR_DEVICE_NOT_CONNECTED 1167 #endif +#ifdef HAVE_DINPUT /* Due to 360 pads showing up under both XInput and DirectInput, * and since we are going to have to pass through unhandled * joypad numbers to DirectInput, a slightly ugly @@ -114,6 +112,7 @@ typedef struct */ extern int g_xinput_pad_indexes[MAX_USERS]; extern bool g_xinput_block_pads; +#endif #ifdef HAVE_DYNAMIC /* For xinput1_n.dll */ @@ -142,7 +141,11 @@ static xinput_joypad_state g_xinput_states[4]; static INLINE int pad_index_to_xuser_index(unsigned pad) { +#ifdef HAVE_DINPUT return g_xinput_pad_indexes[pad]; +#else + return pad < MAX_PADS && g_xinput_states[pad].connected ? pad : -1; +#endif } /* Generic "XInput" instead of "Xbox 360", because there are @@ -178,6 +181,9 @@ const char *xinput_joypad_name(unsigned pad) return XBOX_ONE_CONTROLLER_NAMES[xuser]; #endif + if (xuser < 0) + return NULL; + return XBOX_CONTROLLER_NAMES[xuser]; } @@ -296,9 +302,10 @@ static bool xinput_joypad_init(void *data) RARCH_LOG("[XInput]: Pads connected: %d\n", g_xinput_states[0].connected + g_xinput_states[1].connected + g_xinput_states[2].connected + g_xinput_states[3].connected); - g_xinput_block_pads = true; #ifdef HAVE_DINPUT + g_xinput_block_pads = true; + /* We're going to have to be buddies with dinput if we want to be able * to use XInput and non-XInput controllers together. */ if (!dinput_joypad.init(data)) @@ -372,9 +379,9 @@ static void xinput_joypad_destroy(void) #ifdef HAVE_DINPUT dinput_joypad.destroy(); -#endif g_xinput_block_pads = false; +#endif } /* Buttons are provided by XInput as bits of a uint16. diff --git a/input/include/GameController/GCController.h b/input/include/GameController/GCController.h index 7a7980338e..246ca6ad1c 100644 --- a/input/include/GameController/GCController.h +++ b/input/include/GameController/GCController.h @@ -158,4 +158,3 @@ GAMECONTROLLER_EXPORT + (void)stopWirelessControllerDiscovery; @end - diff --git a/input/include/hid_driver.h b/input/include/hid_driver.h index 02b6529f63..81c9f7cd94 100644 --- a/input/include/hid_driver.h +++ b/input/include/hid_driver.h @@ -71,8 +71,6 @@ struct hid_driver #define HID_MAX_SLOT() hid_instance.max_slot #define HID_PAD_CONNECTION_PTR(slot) &(hid_instance.pad_list[(slot)]) - - struct hid_driver_instance { hid_driver_t *os_driver; void *os_driver_data; diff --git a/input/input_autodetect_builtin.c b/input/input_autodetect_builtin.c index 2af73db8b6..7cda7ca0e8 100644 --- a/input/input_autodetect_builtin.c +++ b/input/input_autodetect_builtin.c @@ -303,7 +303,6 @@ DECL_AXIS_EX(r_x_minus, -3, "R Analog left") \ DECL_AXIS_EX(r_y_plus, +2, "R Analog up") \ DECL_AXIS_EX(r_y_minus, -2, "R Analog down") - #define WIIUINPUT_GAMEPAD_DEFAULT_BINDS \ DECL_BTN_EX(menu_toggle, 1, "Home") \ DECL_BTN_EX(select, 2, "-") \ @@ -660,6 +659,9 @@ const char* const input_builtin_autoconfs[] = DECL_AUTOCONF_DEVICE("QNX Controller", "qnx", QNX_DEFAULT_BINDS), DECL_AUTOCONF_DEVICE("DS4 Controller", "qnx", QNX_DUALSHOCK_BINDS), #endif +#if defined(ORBIS) + DECL_AUTOCONF_DEVICE("PS4 Controller", "ps4", PS3INPUT_DEFAULT_BINDS), +#endif #if defined(VITA) || defined(SN_TARGET_PSP2) DECL_AUTOCONF_DEVICE("Vita Controller", "vita", PSPINPUT_DEFAULT_BINDS), DECL_AUTOCONF_DEVICE("DS3 Controller", "vita", PSPINPUT_DEFAULT_BINDS), diff --git a/input/input_driver.c b/input/input_driver.c index 709fac324b..47c831c728 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -80,6 +80,9 @@ void fire_connection_listener(unsigned port, input_device_driver_t *driver) } static const input_driver_t *input_drivers[] = { +#ifdef ORBIS + &input_ps4, +#endif #ifdef __CELLOS_LV2__ &input_ps3, #endif @@ -164,6 +167,9 @@ static input_device_driver_t *joypad_drivers[] = { #ifdef _XBOX &xdk_joypad, #endif +#if defined(ORBIS) + &ps4_joypad, +#endif #if defined(PSP) || defined(VITA) &psp_joypad, #endif @@ -252,7 +258,6 @@ struct input_bind_map uint8_t retro_key; }; - static const uint8_t buttons[] = { RETRO_DEVICE_ID_JOYPAD_R, RETRO_DEVICE_ID_JOYPAD_L, @@ -365,7 +370,6 @@ const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL] = { DECLARE_META_BIND(2, streaming_toggle, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE), }; - typedef struct turbo_buttons turbo_buttons_t; /* Turbo support. */ @@ -586,7 +590,6 @@ float input_sensor_get_input(unsigned port, unsigned id) return 0.0f; } - /** * input_poll: * @@ -608,8 +611,6 @@ void input_poll(void) if (input_driver_block_libretro_input) return; - - for (i = 0; i < max_users; i++) { if (libretro_input_binds[i][RARCH_TURBO_ENABLE].valid) @@ -746,8 +747,6 @@ int16_t input_state(unsigned port, unsigned device, input_mapper_state(input_driver_mapper, &res, port, device, idx, id); - - /* Don't allow turbo for D-pad. */ if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP || id > RETRO_DEVICE_ID_JOYPAD_RIGHT)) @@ -965,7 +964,7 @@ void input_menu_keys_pressed(void *data, input_bits_t *p_new_state) for (port = 0; port < port_max; port++) { - uint64_t joykey = 0; + uint16_t joykey = 0; uint32_t joyaxis = 0; const struct retro_keybind *mtkey = &input_config_binds[port][i]; @@ -983,7 +982,7 @@ void input_menu_keys_pressed(void *data, input_bits_t *p_new_state) if (sec) { - if ((uint16_t)joykey == NO_BTN || !sec->button(joypad_info.joy_idx, (uint16_t)joykey)) + if (joykey == NO_BTN || !sec->button(joypad_info.joy_idx, joykey)) { int16_t axis = sec->axis(joypad_info.joy_idx, joyaxis); float scaled_axis = (float)abs(axis) / 0x8000; @@ -995,7 +994,7 @@ void input_menu_keys_pressed(void *data, input_bits_t *p_new_state) if (!bit_pressed && first) { - if ((uint16_t)joykey == NO_BTN || !first->button(joypad_info.joy_idx, (uint16_t)joykey)) + if (joykey == NO_BTN || !first->button(joypad_info.joy_idx, joykey)) { int16_t axis = first->axis(joypad_info.joy_idx, joyaxis); float scaled_axis = (float)abs(axis) / 0x8000; @@ -1388,15 +1387,15 @@ bool input_driver_owns_driver(void) bool input_driver_init_command(void) { #ifdef HAVE_COMMAND - settings_t *settings = config_get_ptr(); - bool stdin_cmd_enable = settings->bools.stdin_cmd_enable; - bool network_cmd_enable = settings->bools.network_cmd_enable; - bool grab_stdin = input_driver_grab_stdin(); + settings_t *settings = config_get_ptr(); + bool input_stdin_cmd_enable = settings->bools.stdin_cmd_enable; + bool input_network_cmd_enable = settings->bools.network_cmd_enable; + bool grab_stdin = input_driver_grab_stdin(); - if (!stdin_cmd_enable && !network_cmd_enable) + if (!input_stdin_cmd_enable && !input_network_cmd_enable) return false; - if (stdin_cmd_enable && grab_stdin) + if (input_stdin_cmd_enable && grab_stdin) { RARCH_WARN("stdin command interface is desired, but input driver has already claimed stdin.\n" "Cannot use this command interface.\n"); @@ -1406,8 +1405,8 @@ bool input_driver_init_command(void) if (command_network_new( input_driver_command, - stdin_cmd_enable && !grab_stdin, - network_cmd_enable, + input_stdin_cmd_enable && !grab_stdin, + input_network_cmd_enable, settings->uints.network_cmd_port)) return true; @@ -1478,7 +1477,6 @@ bool input_driver_init_mapper(void) return false; } - bool input_driver_grab_mouse(void) { if (!current_input || !current_input->grab_mouse) @@ -1718,12 +1716,12 @@ int16_t input_joypad_analog(const input_device_driver_t *drv, /* If the result is zero, it's got a digital button attached to it */ if ( res == 0 ) { - uint64_t key = bind->joykey; + uint16_t key = bind->joykey; if ( key == NO_BTN ) key = joypad_info.auto_binds[ ident ].joykey; - if ( drv->button(joypad_info.joy_idx, (uint16_t)key)) + if ( drv->button(joypad_info.joy_idx, key)) res = 0x7fff; } } @@ -1769,17 +1767,17 @@ int16_t input_joypad_analog(const input_device_driver_t *drv, { int16_t digital_left = 0; int16_t digital_right = 0; - uint64_t key_minus = bind_minus->joykey; - uint64_t key_plus = bind_plus->joykey; + uint16_t key_minus = bind_minus->joykey; + uint16_t key_plus = bind_plus->joykey; if (key_minus == NO_BTN) key_minus = joypad_info.auto_binds[ident_minus].joykey; if (key_plus == NO_BTN) key_plus = joypad_info.auto_binds[ident_plus].joykey; - if (drv->button(joypad_info.joy_idx, (uint16_t)key_minus)) + if (drv->button(joypad_info.joy_idx, key_minus)) digital_left = -0x7fff; - if (drv->button(joypad_info.joy_idx, (uint16_t)key_plus)) + if (drv->button(joypad_info.joy_idx, key_plus)) digital_right = 0x7fff; return digital_right + digital_left; diff --git a/input/input_driver.h b/input/input_driver.h index 11fcc415b8..1fd67f1e96 100644 --- a/input/input_driver.h +++ b/input/input_driver.h @@ -101,11 +101,11 @@ struct retro_keybind /* Joypad key. Joypad POV (hats) * are embedded into this key as well. */ - uint64_t joykey; + uint16_t joykey; /* Default key binding value - * for resetting bind to default */ - uint64_t def_joykey; + uint16_t def_joykey; /* Joypad axis. Negative and positive axes * are embedded into this variable. */ @@ -491,9 +491,9 @@ static INLINE bool input_joypad_pressed( unsigned key) { /* Auto-binds are per joypad, not per user. */ - uint64_t joykey = (binds[key].joykey != NO_BTN) + const uint64_t joykey = (binds[key].joykey != NO_BTN) ? binds[key].joykey : joypad_info.auto_binds[key].joykey; - uint32_t joyaxis = (binds[key].joyaxis != AXIS_NONE) + const uint32_t joyaxis = (binds[key].joyaxis != AXIS_NONE) ? binds[key].joyaxis : joypad_info.auto_binds[key].joyaxis; if ((uint16_t)joykey != NO_BTN && drv->button(joypad_info.joy_idx, (uint16_t)joykey)) @@ -701,7 +701,6 @@ bool input_keyboard_line_append(const char *word); const char **input_keyboard_start_line(void *userdata, input_keyboard_line_complete_t cb); - bool input_keyboard_ctl(enum rarch_input_keyboard_ctl_state state, void *data); extern struct retro_keybind input_config_binds[MAX_USERS][RARCH_BIND_LIST_END]; @@ -805,6 +804,7 @@ extern input_device_driver_t parport_joypad; extern input_device_driver_t udev_joypad; extern input_device_driver_t xinput_joypad; extern input_device_driver_t sdl_joypad; +extern input_device_driver_t ps4_joypad; extern input_device_driver_t ps3_joypad; extern input_device_driver_t psp_joypad; extern input_device_driver_t ps2_joypad; @@ -825,6 +825,7 @@ extern input_driver_t input_android; extern input_driver_t input_sdl; extern input_driver_t input_dinput; extern input_driver_t input_x; +extern input_driver_t input_ps4; extern input_driver_t input_ps3; extern input_driver_t input_psp; extern input_driver_t input_ps2; diff --git a/input/input_mapper.c b/input/input_mapper.c index b6b386a656..b6c7440e54 100644 --- a/input/input_mapper.c +++ b/input/input_mapper.c @@ -15,7 +15,6 @@ * If not, see . */ - #include #include #include diff --git a/input/input_remapping.c b/input/input_remapping.c index bd43985eb1..d435d1088a 100644 --- a/input/input_remapping.c +++ b/input/input_remapping.c @@ -245,7 +245,7 @@ bool input_remapping_save_file(const char *path) config_set_int(conf, s1, settings->uints.input_analog_dpad_mode[i]); } - ret = config_file_write(conf, remap_file); + ret = config_file_write(conf, remap_file, true); config_file_free(conf); free(remap_file); diff --git a/input/input_remote.c b/input/input_remote.c index d74529c7d2..bd1b7f0028 100644 --- a/input/input_remote.c +++ b/input/input_remote.c @@ -14,7 +14,6 @@ * If not, see . */ - #include #include #include diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index 8fa2330b82..ef0fd5921a 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -7,8 +7,9 @@ MSG_HASH( "Unknown compiler" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Device disconnected from port" @@ -145,6 +146,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Adjusts menu screen appearance settings." diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 66a7eca707..97e543affc 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -35,8 +35,9 @@ MSG_HASH( "未知的编译器" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "设备已从端口上断开" @@ -133,6 +134,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "调整菜单屏幕相关的设置。" diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index b314f009b8..05ff2c10f7 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -7,8 +7,9 @@ MSG_HASH( "未知的編譯器" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "設備已從連接口上移開" @@ -105,6 +106,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "使用模擬器硬體渲染私人內容時可避免硬體在各frames時的狀態改變." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "調整選單顯示的相關設定。" @@ -985,6 +990,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, /* TODO/FIXME - updat "選單文件瀏覽器") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "選單線性過濾") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "Horizontal Animation") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "選單") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 214f52dbf3..f690ec327d 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -35,8 +35,9 @@ MSG_HASH( "Unbekannter Compiler" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Gerät von Anschluss getrennt" @@ -133,6 +134,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Gibt Hardware-gerenderten Cores einen eigenen privaten Kontext. Vermeidet, dass der Hardware-Status zwischen den Frames geschätzt werden muss." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Legt die Einstellungen für das Aussehen des Menübildschirms fest." diff --git a/intl/msg_hash_el.h b/intl/msg_hash_el.h index a6c9cbb4e7..fae4ab9b95 100644 --- a/intl/msg_hash_el.h +++ b/intl/msg_hash_el.h @@ -146,6 +146,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Προσαρμόζει τις εμφανισιακές ρυθμίσεις της οθόνης του μενού." diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 9fe65dfbe6..f26d9f4c96 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -7,8 +7,9 @@ MSG_HASH( "Unknown compiler" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Device disconnected from port" @@ -45,6 +46,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Adjusts settings related to the appearance of the menu screen." diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index 686d0662bb..cbbb73f97e 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -173,6 +173,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Dar a los núcleos renderizados por hardware un contexto privado. Evita tener que asumir cambios en el estado del hardware entre cuadros" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Ajusta la apariencia del menú" @@ -7907,4 +7911,4 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_HOLD_START, "Mantener Start (2 segundos)" - ) \ No newline at end of file + ) diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 37ac633783..ec9d2803c9 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -7,8 +7,9 @@ MSG_HASH( "Compilateur inconnu" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Périphérique déconnecté du port" @@ -105,6 +106,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Donne aux cœurs bénéficiant de l'accélération graphique leur propre contexte. Évite d'avoir à supposer des changements d'état matériel entre deux images." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Ajuster les réglages et l'apparence du menu." @@ -989,6 +994,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Réglages") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "Filtre linéaire pour le menu") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "Horizontal Animation") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Appearance") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index e7668d494b..68ccd330e7 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -7,8 +7,9 @@ MSG_HASH( "Compilatore sconosciuto" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Nativo" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Dispositivo disconnesso dalla porta" @@ -105,6 +106,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Fornisce i core hardware nel proprio contesto privato. Evita di assumere cambiamenti di stato hardware tra i fotogrammi." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Abilita l'animazione orizzontale per il menu. Questo avrà un impatto sulle prestazioni." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Regola le impostazioni relative all'aspetto della schermata del menu." @@ -135,7 +140,7 @@ MSG_HASH( ) MSG_HASH( MSG_CONNECTING_TO_NETPLAY_HOST, - "Connessione al host del netplay" + "Connessione all'host del netplay" ) MSG_HASH( MSG_CONNECTING_TO_PORT, @@ -559,17 +564,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DATABASE_SELECTION, MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_ENTRY, "Rimuovi") MSG_HASH(MENU_ENUM_LABEL_VALUE_FAVORITES, - "Avvia da directory") + "Avvia da cartella") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT, - "") + "") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, "") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, "") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND, - "Directory non trovata.") + "Cartella non trovata.") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS, - "Directory") + "Cartella") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS, "Stato del ciclo nel vassoio del disco") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 109939b0f0..5b1f980024 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -12,8 +12,9 @@ MSG_HASH( "不明なコンパイラ" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "デバイスがポートから切断されました" @@ -150,6 +151,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "メニューの外観に関係する設定を変更します。" diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index b94ce77dc2..4d6d3cc5f6 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -7,8 +7,9 @@ MSG_HASH( "알 수 없는 컴파일러" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "장치가 포트에서 연결 해제 되었습니다" @@ -105,6 +106,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "하드웨어 렌더링된 코어에 고유의 컨텍스트를 부여. 프레임간 하드웨어 상태가 변경된 것으로 가정하지 않도록 함." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "화면 표시 설정을 조정합니다." @@ -970,6 +975,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "설정") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "메뉴 선형 필터") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "Horizontal Animation") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "메뉴") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 775daf9f0b..aef8983686 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -651,6 +651,8 @@ MSG_HASH(MENU_ENUM_LABEL_MAIN_MENU, "main_menu") MSG_HASH(MENU_ENUM_LABEL_MANAGEMENT, "database_settings") +MSG_HASH(MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME, + "rgui_menu_color_theme") MSG_HASH(MENU_ENUM_LABEL_OZONE_MENU_COLOR_THEME, "ozone_menu_color_theme") MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME, @@ -1763,3 +1765,5 @@ MSG_HASH(MENU_ENUM_LABEL_NO_FAVORITES_AVAILABLE, "no_favorites") MSG_HASH(MENU_ENUM_LABEL_VIDEO_3DS_LCD_BOTTOM, "video_3ds_lcd_bottom") +MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT, + "playlist_use_old_format") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 1426e3b5f9..17677a9825 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -7,8 +7,9 @@ MSG_HASH( "Onbekende compiler" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Apparaat ontkoppeld van port" @@ -45,6 +46,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Adjusts settings related to the appearance of the menu screen." @@ -905,6 +910,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Instellingen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "Menu Linear Filter") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "Horizontal Animation") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Uiterlijk") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index 86d03816a9..59853c16d0 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -7,8 +7,9 @@ MSG_HASH( "Nieznany kompilator" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Urządzenie zostało odłączone od portu" @@ -145,6 +146,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Nadaj rdzeniom sprzętowym własny prywatny kontekst. Unikaj konieczności przejmowania zmian stanu sprzętu pomiędzy klatkami." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Dostosuj ustawienia wyglądu ekranu menu." diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 3bb3c1a358..b4f3bd8b5e 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -7,7 +7,7 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE, "Faz um Overclock ou underclock na CPU do Switch" ) - MSG_HASH( +MSG_HASH( MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL, "Brilho da tela" ) @@ -59,7 +59,11 @@ MSG_HASH( ) MSG_HASH( MSG_PUBLIC_ADDRESS, - "Endereço público" + "Sucesso no Mapeamento de Portas" + ) +MSG_HASH( + MSG_UPNP_FAILED, + "Falha no Mapeamento de Portas" ) MSG_HASH( MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, @@ -129,6 +133,10 @@ MSG_HASH( MSG_NETPLAY_ENTER_PASSWORD, "Digite a senha do servidor de jogo em rede:" ) +MSG_HASH( + MSG_DISCORD_CONNECTION_REQUEST, + "Deseja permitir a conexão do usuário:" + ) MSG_HASH( MSG_NETPLAY_INCORRECT_PASSWORD, "Senha incorreta" @@ -173,6 +181,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Dar aos núcleos renderizados por hardware seu próprio contexto privado. Evita ter que assumir mudanças de estado de hardware entre quadros." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Habilitar a animação horizontal para o menu. Isso terá um impacto no desempenho." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Ajusta as configurações de aparência da tela de menu." @@ -673,6 +685,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_LIST, "Carregar Núcleo" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, + "Instalar ou Restaurar um Núcleo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR, + "Falha na instalação do núcleo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS, + "Instalação do núcleo bem-sucedida" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_OPTIONS, "Opções" @@ -845,6 +869,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "Mostrar Taxa de Quadros" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, + "Incluir Detalhes da Memória" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE, "Controlar Velocidade Máxima de Execução" @@ -1297,10 +1325,17 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, "Alternar pausa" ) +#ifdef HAVE_LAKKA +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, + "Reiniciar o RetroArch" + ) +#else MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Sair do RetroArch" ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "Reiniciar jogo" @@ -1935,11 +1970,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE, - "Online" + "On-line" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, - "Atualizador Online" + "Atualizador On-line" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS, @@ -2049,10 +2084,17 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MIDI_SETTINGS, "MIDI" ) +#ifdef HAVE_LAKKA +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, + "Reiniciar o RetroArch" + ) +#else MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, "Sair do RetroArch" ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, "Analógico suportado" @@ -2954,7 +2996,159 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TITLE_COLOR, - "Cor do título do menu" + "Cor de título do menu personalizado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BG_DARK_COLOR, + "Cor escura do fundo do menu personalizado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BG_LIGHT_COLOR, + "Cor clara do fundo do menu personalizado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BORDER_DARK_COLOR, + "Cor escura da borda do menu personalizado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BORDER_LIGHT_COLOR, + "Cor clara da borda do menu personalizado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME, + "Tema da Cor do Menu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM, + "Personalizada" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED, + "Vermelho Clássico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE, + "Laranja Clássico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW, + "Amarelo Clássico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN, + "Verde Clássico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE, + "Azul Clássico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET, + "Violeta Clássico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY, + "Cinza Clássico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED, + "Vermelho Legado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE, + "Roxo Escuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE, + "Azul Meia Noite" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GOLDEN, + "Dourado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE, + "Azul Elétrico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN, + "Verde Maçã" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED, + "Vermelho Vulcânico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON, + "Lagoa" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_BROGRAMMER, + "Brogrammer" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA, + "Drácula" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS, + "Fio De Fada" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI, + "IU Plana" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK, + "Gruvbox Escuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT, + "Gruvbox Claro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL, + "Hackeando o Kernel" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NORD, + "Nord" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NOVA, + "Nova" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK, + "Escuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_PALENIGHT, + "Noite Pálida" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK, + "Escuro Solarizado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT, + "Claro Solarizado" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK, + "Escuro Tango" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT, + "Claro Tango" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ZENBURN, + "Fogo Zen" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ANTI_ZENBURN, + "Anti-Fogo Zen" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TRUE, @@ -3208,6 +3402,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SCALE, "Escala em Janela" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, + "Threads de Gravação" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER, "Escala em Inteiros" @@ -3226,7 +3424,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS, - "Pré-visualizar Parâmetros de Shader" + "Parâmetros de Shader" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, @@ -3518,7 +3716,8 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, - "Habilita ou desabilita Estado de Jogo, Trapaças, Rebobinamento, Avanço Rápido, Pausa e Câmera Lenta para todos os jogos." + "Habilita ou desabilita Estado de Jogo, Trapaças, Rebobinamento, Avanço Rápido, Pausa e Câmera Lenta.\n" + "Alternar essa configuração em tempo de execução reinicia o seu jogo." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, @@ -3628,6 +3827,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_FPS_SHOW, "Exibe a taxa atual de quadros por segundo na tela." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAMECOUNT_SHOW, + "Exibe a contagem atual de quadros na tela." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MEMORY_SHOW, + "Inclui o uso de memória atual/total na tela com FPS/Quadros." + ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, "Ajusta as configurações das teclas de atalho." @@ -4870,6 +5077,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_LIST, "Selecione qual núcleo utilizar." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_START_CORE, + "Iniciar o núcleo sem conteúdo." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, + "Instalar um núcleo do atualizador on-line." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, + "Instalar ou restaurar um núcleo do diretório de downloads." + ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST, "Selecione qual conteúdo iniciar." @@ -4882,17 +5101,28 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, "Exibe informações específicas do dispositivo." ) +#ifdef HAVE_LAKKA +MSG_HASH( + MENU_ENUM_SUBLABEL_QUIT_RETROARCH, + "Rainicia o programa." + ) +#else MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_RETROARCH, "Sai do programa." ) +#endif MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, "Define a largura personalizada para a janela de exibição. Deixado em 0 a janela irá dimensionar o mais largo possível." ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, - "Define a altura personalizada para a janela de exibição. Deixado em 0 a janela irá dimensionar o mais alto possível." + "Definir a altura personalizada para a janela de exibição." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION, + "Lembre-se do tamanho e posição da janela, permitindo que isso tenha precedência sobre a Escala em Janela." ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X, @@ -4997,11 +5227,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_TOGGLE, "Aplicar a trapaça imediatamente após alternância." -) + ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_LOAD, "Aplicar trapaças automaticamente quando o jogo for carregado." -) + ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, "O número de vezes que a trapaça será aplicada.\n" @@ -5010,7 +5240,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, "Após cada 'Número de Iterações', o Endereço de Memória será aumentado pelo número de vezes do 'Tamanho da Pesquisa da Memória'." -) + ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, "Após cada Número de Iterações, o Valor será aumentado por esse valor." @@ -5903,11 +6133,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_ONLINE_UPDATER, - "Exibir Atualizador Online" + "Exibir Atualizador On-line" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER, - "Exibir/ocultar a opção 'Atualizador Online'." + "Exibir/ocultar a opção 'Atualizador On-line'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, @@ -6069,14 +6299,25 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, "Exibir/ocultar a opção 'Ajuda'." ) +#ifdef HAVE_LAKKA MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, "Exibir Sair do RetroArch" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, - "Exibir/ocultar a opção 'Sair do RetroArch'." + "Exibir/ocultar a opção 'Reiniciar o RetroArch'." ) +#else +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Exibir Sair do RetroArch" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Exibir/ocultar a opção 'Saiir do RetroArch'." + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, "Exibir Reiniciar" @@ -6135,27 +6376,27 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING, - "Show Start Recording" + "Exibir Iniciar Gravação" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING, - "Show/hide the 'Start Recording' option." + "Exibir/ocultar a opção 'Iniciar Gravação'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING, - "Show Start Streaming" + "Exibir Iniciar Transmissão" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING, - "Show/hide the 'Start Streaming' option." + "Exibir/ocultar a opção 'Iniciar Transmissão'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, - "Show Reset Core Association" + "Exibir Redefinir Associação do Núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, - "Show/hide the 'Reset Core Association' option." + "Exibir/ocultar a opção 'Redefinir Associação do Núcleo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, @@ -6615,8 +6856,8 @@ MSG_HASH( "Verificação Terminada.

\n" "Para que o conteúdo seja verificado corretamente, você deve em ordem:\n" "
  • ter um núcleo compatível já baixado
  • \n" - "
  • ter os \"Arquivos de Informação de Núcleo\" atualizados via Atualizador Online
  • \n" - "
  • ter a \"Base de Dados\" atualizada via Atualizador Online
  • \n" + "
  • ter os \"Arquivos de Informação de Núcleo\" atualizados via Atualizador On-line
  • \n" + "
  • ter a \"Base de Dados\" atualizada via Atualizador On-line
  • \n" "
  • reiniciar o RetroArch caso alguma das situações acima tenha sido feita
\n" "E finalmente, o conteúdo deve corresponder as bases de dados existentes aqui. Se ainda não estiver funcionando, considere enviar um relatório de erro." ) @@ -6691,7 +6932,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SUGGEST_LOADED_CORE_FIRST, - "Sugerir Primeiro Núcleo Carregado" + "Sugerir Primeiro Núcleo Carregado:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ZOOM, @@ -6816,7 +7057,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_SUBLABEL_DISCORD_ALLOW, "Habilitar ou desabilitar o suporte ao Discord.\n" - "Não funcionará com a versão do navegador, apenas o cliente nativo de desktop." + "OBS: Não funcionará com a versão do navegador, apenas o cliente nativo de desktop." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIDI_INPUT, @@ -6949,15 +7190,15 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, "Número de Iterações" -) + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, "Aumento de Valor em Cada Iteração" -) + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, "Aumento de Endereço em Cada Iteração" -) + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_AFTER, "Adicionar Nova Trapaça Depois Desta" @@ -7444,7 +7685,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CONFIRM_DELETE_PLAYLIST_ITEM, - "Tem certeza de que deseja excluir o item? \"%1\"?" + "Tem certeza de que deseja excluir o item \"%1\"?" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CANNOT_ADD_TO_ALL_PLAYLISTS, @@ -7570,6 +7811,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_STARTUP_PLAYLIST, "Iniciar na lista de reprodução:" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE, + "Tipo de visualização de miniatura de ícones:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT, + "Limite de cache de miniaturas:" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS, "Baixar Todas as Miniaturas" @@ -7608,7 +7857,8 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "O V-Sync é ativado até o desempenho ficar abaixo da taxa de atualização desejada. Pode minimizar as travadas quando o desempenho cai abaixo do tempo real e pode ser mais eficiente em termos energéticos." + "O V-Sync é ativado até o desempenho ficar abaixo da taxa de atualização desejada.\n" + "Pode minimizar as travadas quando o desempenho cai abaixo do tempo real e pode ser mais eficiente em termos energéticos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS, @@ -7804,7 +8054,13 @@ MSG_HASH( ) MSG_HASH( MSG_MISSING_ASSETS, - "Aviso: Recursos ausentes, use o Atualizador Online se disponível" + "Aviso: Recursos ausentes, use o Atualizador On-line se disponível" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION, + "Lembrar Tamanho e Posição da Janela" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_START, + "Segurar Start (2 segundos)" ) -MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION, - "Remember Window Position and Size") diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 84b8e21efc..929abe53d6 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -7,8 +7,9 @@ MSG_HASH( "Compilador desconhecido" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Dispositivo desconectado da porta" @@ -105,6 +106,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Dê aos núcleos renderizados por hardware o seu próprio contexto privado. Evita ter que assumir mudanças de estado de hardware entre frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "ajusta as definições de aparência no ecrã do menu." @@ -970,6 +975,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Definições") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "Filtro linear do menu") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "Horizontal Animation") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Aparência") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 7fdb5e26d8..e531e1964e 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -12,8 +12,9 @@ MSG_HASH( "Неизвестный компилятор" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Устройство отключено от порта" @@ -110,6 +111,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Предоставьте аппаратно-рендерированным ядрам собственный контекст. Избегайте принятия изменений состояния оборудования между кадрами." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Настройка параметров, относящихся к внешнему виду экрана меню." @@ -993,6 +998,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Настройки") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "Линейный фильтр меню") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "Horizontal Animation") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Меню") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 666954acb2..0615dca690 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -133,6 +133,10 @@ MSG_HASH( MSG_NETPLAY_ENTER_PASSWORD, "Enter netplay server password:" ) +MSG_HASH( + MSG_DISCORD_CONNECTION_REQUEST, + "Do you want to allow connection from user:" + ) MSG_HASH( MSG_NETPLAY_INCORRECT_PASSWORD, "Incorrect password" @@ -177,6 +181,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Adjusts menu screen appearance settings." @@ -839,11 +847,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ENTRY_HOVER_COLOR, - "Menu entry hover color" + "Custom menu entry hover color" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ENTRY_NORMAL_COLOR, - "Menu entry normal color" + "Custom menu entry normal color" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FALSE, @@ -2992,23 +3000,159 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TITLE_COLOR, - "Menu title color" + "Custom menu title color" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BG_DARK_COLOR, - "Menu background dark color" + "Custom menu background dark color" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BG_LIGHT_COLOR, - "Menu background light color" + "Custom menu background light color" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BORDER_DARK_COLOR, - "Menu border dark color" + "Custom menu border dark color" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BORDER_LIGHT_COLOR, - "Menu border light color" + "Custom menu border light color" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME, + "Menu Color Theme" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM, + "Custom" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED, + "Classic Red" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE, + "Classic Orange" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW, + "Classic Yellow" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN, + "Classic Green" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE, + "Classic Blue" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET, + "Classic Violet" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY, + "Classic Grey" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED, + "Legacy Red" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE, + "Dark Purple" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE, + "Midnight Blue" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GOLDEN, + "Golden" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE, + "Electric Blue" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN, + "Apple Green" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED, + "Volcanic Red" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON, + "Lagoon" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_BROGRAMMER, + "Brogrammer" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA, + "Dracula" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS, + "Fairy Floss" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI, + "Flat UI" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK, + "Gruvbox Dark" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT, + "Gruvbox Light" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL, + "Hacking the Kernel" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NORD, + "Nord" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NOVA, + "Nova" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK, + "One Dark" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_PALENIGHT, + "Palenight" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK, + "Solarized Dark" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT, + "Solarized Light" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK, + "Tango Dark" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT, + "Tango Light" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ZENBURN, + "Zenburn" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ANTI_ZENBURN, + "Anti-Zenburn" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TRUE, @@ -6710,6 +6854,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_LOG, "Log" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ITEMS_COUNT, + "%1 items" + ) #ifdef HAVE_QT MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_SCAN_FINISHED, @@ -7671,6 +7819,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_STARTUP_PLAYLIST, "Start on playlist:" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE, + "Icon view thumbnail type:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT, + "Thumbnail cache limit:" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS, "Download All Thumbnails" @@ -7915,4 +8071,8 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_HOLD_START, "Hold Start (2 seconds)" - ) \ No newline at end of file + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, + "Save playlists using old format" + ) diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 33f84b7482..a7bb34ce4c 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -7,8 +7,9 @@ MSG_HASH( "Unknown compiler" ) MSG_HASH( - MSG_NATIVE, - "Native") + MSG_NATIVE, + "Native" + ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, "Device disconnected from port" @@ -105,6 +106,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, + "Enable horizontal animation for the menu. This will have a performance hit." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, "Điều chỉnh thiết lập related to the appearance of the menu screen." @@ -991,6 +996,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Settings") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "Menu Linear Filter") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, + "Horizontal Animation") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Appearance") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, diff --git a/led/drivers/led_null.c b/led/drivers/led_null.c index 3f178a1389..1d95ce3bc6 100644 --- a/led/drivers/led_null.c +++ b/led/drivers/led_null.c @@ -15,14 +15,13 @@ #include "../led_driver.h" #include "../../verbosity.h" -static void null_init(void) { } -static void null_free(void) { } -static void null_set(int led, int state) { } +static void null_led_init(void) { } +static void null_led_free(void) { } +static void null_led_set(int led, int state) { } const led_driver_t null_led_driver = { - null_init, - null_free, - null_set, + null_led_init, + null_led_free, + null_led_set, "null" }; - diff --git a/led/led_driver.h b/led/led_driver.h index 916ee95306..d275a1a079 100644 --- a/led/led_driver.h +++ b/led/led_driver.h @@ -35,7 +35,6 @@ typedef struct led_driver const char *ident; } led_driver_t; - bool led_driver_init(void); void led_driver_free(void); diff --git a/libretro-common/audio/audio_mixer.c b/libretro-common/audio/audio_mixer.c index 3b66d0b1f2..f0022f957a 100644 --- a/libretro-common/audio/audio_mixer.c +++ b/libretro-common/audio/audio_mixer.c @@ -52,7 +52,6 @@ #include #endif - #ifdef HAVE_DR_MP3 #define DR_MP3_IMPLEMENTATION #include @@ -178,17 +177,18 @@ struct audio_mixer_voice #ifdef HAVE_IBXM struct { - unsigned position; - unsigned samples; - unsigned buf_samples; - int* buffer; - struct replay* stream; + unsigned position; + unsigned samples; + unsigned buf_samples; + int* buffer; + struct replay* stream; + struct module* module; } mod; #endif } types; }; -static struct audio_mixer_voice s_voices[AUDIO_MIXER_MAX_VOICES]; +static struct audio_mixer_voice s_voices[AUDIO_MIXER_MAX_VOICES] = {0}; static unsigned s_rate = 0; #ifdef HAVE_THREADS @@ -402,7 +402,6 @@ audio_mixer_sound_t* audio_mixer_load_ogg(void *buffer, int32_t size) #endif } - audio_mixer_sound_t* audio_mixer_load_flac(void *buffer, int32_t size) { #ifdef HAVE_DR_FLAC @@ -556,6 +555,14 @@ static bool audio_mixer_play_ogg( goto error; } + /* "system" menu sounds may reuse the same voice without freeing anything first, so do that here if needed */ + if (voice->types.ogg.buffer) + memalign_free(voice->types.ogg.buffer); + if (voice->types.ogg.stream) + stb_vorbis_close(voice->types.ogg.stream); + if (voice->types.ogg.resampler && voice->types.ogg.resampler_data) + voice->types.ogg.resampler->free(voice->types.ogg.resampler_data); + voice->types.ogg.resampler = resamp; voice->types.ogg.resampler_data = resampler_data; voice->types.ogg.buffer = (float*)ogg_buffer; @@ -598,7 +605,12 @@ static bool audio_mixer_play_mod( goto error; } - replay = new_replay( module, s_rate, 1); + if (voice->types.mod.module) + dispose_module(voice->types.mod.module); + + voice->types.mod.module = module; + + replay = new_replay(module, s_rate, 1); if (!replay) { @@ -623,11 +635,16 @@ static bool audio_mixer_play_mod( goto error; } + if (voice->types.mod.buffer) + memalign_free(voice->types.mod.buffer); + if (voice->types.mod.stream) + dispose_replay(voice->types.mod.stream); + voice->types.mod.buffer = (int*)mod_buffer; voice->types.mod.buf_samples = buf_samples; voice->types.mod.stream = replay; voice->types.mod.position = 0; - voice->types.mod.samples = 0; /* samples; */ + voice->types.mod.samples = 0; /* samples; */ return true; @@ -641,7 +658,6 @@ error: } #endif - #ifdef HAVE_DR_FLAC static bool audio_mixer_play_flac( audio_mixer_sound_t* sound, @@ -680,6 +696,13 @@ static bool audio_mixer_play_flac( goto error; } + if (voice->types.flac.buffer) + memalign_free(voice->types.flac.buffer); + if (voice->types.flac.stream) + drflac_close(voice->types.flac.stream); + if (voice->types.flac.resampler && voice->types.flac.resampler_data) + voice->types.flac.resampler->free(voice->types.flac.resampler_data); + voice->types.flac.resampler = resamp; voice->types.flac.resampler_data = resampler_data; voice->types.flac.buffer = (float*)flac_buffer; @@ -709,9 +732,19 @@ static bool audio_mixer_play_mp3( void *mp3_buffer = NULL; void *resampler_data = NULL; const retro_resampler_t* resamp = NULL; - bool res =drmp3_init_memory(&voice->types.mp3.stream,(const unsigned char*)sound->types.mp3.data,sound->types.mp3.size,NULL); + bool res; + + if (voice->types.mp3.stream.pData) + { + drmp3_uninit(&voice->types.mp3.stream); + memset(&voice->types.mp3.stream, 0, sizeof(voice->types.mp3.stream)); + } + + res = drmp3_init_memory(&voice->types.mp3.stream, (const unsigned char*)sound->types.mp3.data, sound->types.mp3.size, NULL); + if (!res) return false; + if (voice->types.mp3.stream.sampleRate != s_rate) { ratio = (double)s_rate / (double)(voice->types.mp3.stream.sampleRate); @@ -732,6 +765,12 @@ static bool audio_mixer_play_mp3( goto error; } + /* "system" menu sounds may reuse the same voice without freeing anything first, so do that here if needed */ + if (voice->types.mp3.buffer) + memalign_free(voice->types.mp3.buffer); + if (voice->types.mp3.resampler && voice->types.mp3.resampler_data) + voice->types.mp3.resampler->free(voice->types.mp3.resampler_data); + voice->types.mp3.resampler = resamp; voice->types.mp3.resampler_data = resampler_data; voice->types.mp3.buffer = (float*)mp3_buffer; @@ -748,7 +787,6 @@ error: } #endif - audio_mixer_voice_t* audio_mixer_play(audio_mixer_sound_t* sound, bool repeat, float volume, audio_mixer_stop_cb_t stop_cb) { diff --git a/libretro-common/audio/dsp_filters/BassBoost.dsp b/libretro-common/audio/dsp_filters/BassBoost.dsp index db9890526d..e903e24f32 100644 --- a/libretro-common/audio/dsp_filters/BassBoost.dsp +++ b/libretro-common/audio/dsp_filters/BassBoost.dsp @@ -9,4 +9,3 @@ iir_frequency = 200.0 # Avoids clipping. panning_left_mix = "0.3 0.0" panning_right_mix = "0.0 0.3" - diff --git a/libretro-common/audio/dsp_filters/HighShelfDampen.dsp b/libretro-common/audio/dsp_filters/HighShelfDampen.dsp index 5768f36d7e..e5a36283c7 100644 --- a/libretro-common/audio/dsp_filters/HighShelfDampen.dsp +++ b/libretro-common/audio/dsp_filters/HighShelfDampen.dsp @@ -4,4 +4,3 @@ filter0 = iir iir_gain = -12.0 iir_type = HSH iir_frequency = 8000.0 - diff --git a/libretro-common/audio/dsp_filters/IIR.dsp b/libretro-common/audio/dsp_filters/IIR.dsp index bfeecb2a0f..ecad4cfc5b 100644 --- a/libretro-common/audio/dsp_filters/IIR.dsp +++ b/libretro-common/audio/dsp_filters/IIR.dsp @@ -20,4 +20,3 @@ filter0 = iir # LSH: Low-shelf # HSH: High-shelf # RIAA_CD: CD de-emphasis - diff --git a/libretro-common/audio/dsp_filters/Panning.dsp b/libretro-common/audio/dsp_filters/Panning.dsp index 411345fca9..5b38f62bea 100644 --- a/libretro-common/audio/dsp_filters/Panning.dsp +++ b/libretro-common/audio/dsp_filters/Panning.dsp @@ -20,4 +20,3 @@ panning_right_mix = "0.0 1.0" # Mono on one speaker: # panning_left_mix = "0.5 0.5" # panning_right_mix = "0.0 0.0" - diff --git a/libretro-common/audio/dsp_filters/Phaser.dsp b/libretro-common/audio/dsp_filters/Phaser.dsp index 80b209deaa..effd48f65d 100644 --- a/libretro-common/audio/dsp_filters/Phaser.dsp +++ b/libretro-common/audio/dsp_filters/Phaser.dsp @@ -8,4 +8,3 @@ filter0 = phaser # phaser_depth = 0.4 # phaser_dry_wet = 0.5 # phaser_stages = 2 - diff --git a/libretro-common/audio/dsp_filters/Reverb.dsp b/libretro-common/audio/dsp_filters/Reverb.dsp index 0f0d53f4a8..d4af139b02 100644 --- a/libretro-common/audio/dsp_filters/Reverb.dsp +++ b/libretro-common/audio/dsp_filters/Reverb.dsp @@ -7,4 +7,3 @@ filter0 = reverb # reverb_damping = 0.8 # reverb_roomwidth = 0.56 # reverb_roomsize = 0.56 - diff --git a/libretro-common/audio/dsp_filters/Tremolo.dsp b/libretro-common/audio/dsp_filters/Tremolo.dsp index 50523333ac..90abdd7386 100644 --- a/libretro-common/audio/dsp_filters/Tremolo.dsp +++ b/libretro-common/audio/dsp_filters/Tremolo.dsp @@ -4,4 +4,3 @@ filter0 = tremolo # Defaults. #tremolo_frequency = 4.0 #tremolo_depth = 0.9 - diff --git a/libretro-common/audio/dsp_filters/Vibrato.dsp b/libretro-common/audio/dsp_filters/Vibrato.dsp index b1ea8e1107..0ad42a44f0 100644 --- a/libretro-common/audio/dsp_filters/Vibrato.dsp +++ b/libretro-common/audio/dsp_filters/Vibrato.dsp @@ -4,4 +4,3 @@ filter0 = vibrato # Defaults. #vibrato_frequency = 5.0 #vibrato_depth = 0.5 - diff --git a/libretro-common/audio/dsp_filters/WahWah.dsp b/libretro-common/audio/dsp_filters/WahWah.dsp index 4d5bceb094..41adb2f277 100644 --- a/libretro-common/audio/dsp_filters/WahWah.dsp +++ b/libretro-common/audio/dsp_filters/WahWah.dsp @@ -7,4 +7,3 @@ filter0 = wahwah # wahwah_freq_offset = 0.3 # wahwah_depth = 0.7 # wahwah_resonance = 2.5 - diff --git a/libretro-common/audio/dsp_filters/chorus.c b/libretro-common/audio/dsp_filters/chorus.c index 54d9aa715a..60ae02bcb5 100644 --- a/libretro-common/audio/dsp_filters/chorus.c +++ b/libretro-common/audio/dsp_filters/chorus.c @@ -158,4 +158,3 @@ dspfilter_get_implementation(dspfilter_simd_mask_t mask) } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/crystalizer.c b/libretro-common/audio/dsp_filters/crystalizer.c index c0e253c7e3..b83842c027 100644 --- a/libretro-common/audio/dsp_filters/crystalizer.c +++ b/libretro-common/audio/dsp_filters/crystalizer.c @@ -20,7 +20,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #include #include #include @@ -88,6 +87,4 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si return &delta_plug; } - #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/echo.c b/libretro-common/audio/dsp_filters/echo.c index 4b0c6cccfc..491c2e6de9 100644 --- a/libretro-common/audio/dsp_filters/echo.c +++ b/libretro-common/audio/dsp_filters/echo.c @@ -157,7 +157,6 @@ error: return NULL; } - static const struct dspfilter_implementation echo_plug = { echo_init, echo_process, @@ -179,4 +178,3 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/eq.c b/libretro-common/audio/dsp_filters/eq.c index a3defe77e1..ac911231e4 100644 --- a/libretro-common/audio/dsp_filters/eq.c +++ b/libretro-common/audio/dsp_filters/eq.c @@ -271,7 +271,6 @@ static void *eq_init(const struct dspfilter_info *info, if (!eq) return NULL; - config->get_float(userdata, "window_beta", &beta, 4.0f); config->get_int(userdata, "block_size_log2", &size_log2, 8); @@ -349,4 +348,3 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/fft/fft.c b/libretro-common/audio/dsp_filters/fft/fft.c index 7bafefad1e..1457069cdd 100644 --- a/libretro-common/audio/dsp_filters/fft/fft.c +++ b/libretro-common/audio/dsp_filters/fft/fft.c @@ -202,4 +202,3 @@ void fft_process_inverse(fft_t *fft, resolve_float(out, fft->interleave_buffer, samples, 1.0f / samples, step); } - diff --git a/libretro-common/audio/dsp_filters/fft/fft.h b/libretro-common/audio/dsp_filters/fft/fft.h index e5bcdf7176..75b1c258ca 100644 --- a/libretro-common/audio/dsp_filters/fft/fft.h +++ b/libretro-common/audio/dsp_filters/fft/fft.h @@ -41,6 +41,4 @@ void fft_process_forward(fft_t *fft, void fft_process_inverse(fft_t *fft, float *out, const fft_complex_t *in, unsigned step); - #endif - diff --git a/libretro-common/audio/dsp_filters/iir.c b/libretro-common/audio/dsp_filters/iir.c index 748d0b8c1e..cb4d078d48 100644 --- a/libretro-common/audio/dsp_filters/iir.c +++ b/libretro-common/audio/dsp_filters/iir.c @@ -261,7 +261,6 @@ static void iir_filter_init(struct iir_data *iir, a1 = a[1]; a2 = a[2]; - /* Normalise to 0dB at 1kHz (Thanks to Glenn Davis) */ y = 2.0 * M_PI * 1000.0 / sample_rate; b_re = b0 + b1 * cos(-y) + b2 * cos(-2.0 * y); @@ -369,4 +368,3 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/panning.c b/libretro-common/audio/dsp_filters/panning.c index da1cbc3d10..c1259be83e 100644 --- a/libretro-common/audio/dsp_filters/panning.c +++ b/libretro-common/audio/dsp_filters/panning.c @@ -109,4 +109,3 @@ dspfilter_get_implementation(dspfilter_simd_mask_t mask) } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/phaser.c b/libretro-common/audio/dsp_filters/phaser.c index 7c165e1cdf..edc48a990e 100644 --- a/libretro-common/audio/dsp_filters/phaser.c +++ b/libretro-common/audio/dsp_filters/phaser.c @@ -143,4 +143,3 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/reverb.c b/libretro-common/audio/dsp_filters/reverb.c index d1a770fd34..c91e2be3c5 100644 --- a/libretro-common/audio/dsp_filters/reverb.c +++ b/libretro-common/audio/dsp_filters/reverb.c @@ -60,7 +60,6 @@ static INLINE float comb_process(struct comb *c, float input) return output; } - static INLINE float allpass_process(struct allpass *a, float input) { float bufout = a->buffer[a->bufidx]; @@ -315,5 +314,3 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si } #undef dspfilter_get_implementation - - diff --git a/libretro-common/audio/dsp_filters/tremolo.c b/libretro-common/audio/dsp_filters/tremolo.c index 38b535742c..b717c6588f 100644 --- a/libretro-common/audio/dsp_filters/tremolo.c +++ b/libretro-common/audio/dsp_filters/tremolo.c @@ -130,4 +130,3 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/vibrato.c b/libretro-common/audio/dsp_filters/vibrato.c index 6e79d2f0fb..9a5d3432ba 100644 --- a/libretro-common/audio/dsp_filters/vibrato.c +++ b/libretro-common/audio/dsp_filters/vibrato.c @@ -30,7 +30,6 @@ #define sqr(a) ((a) * (a)) - const float BASE_DELAY_SEC = 0.002; // 2 ms const float VIBRATO_FREQUENCY_DEFAULT_HZ = 2; const float VIBRATO_FREQUENCY_MAX_HZ = 14; @@ -166,4 +165,3 @@ const struct dspfilter_implementation *dspfilter_get_implementation(dspfilter_si } #undef dspfilter_get_implementation - diff --git a/libretro-common/audio/dsp_filters/wahwah.c b/libretro-common/audio/dsp_filters/wahwah.c index f4e8133520..eca269f47c 100644 --- a/libretro-common/audio/dsp_filters/wahwah.c +++ b/libretro-common/audio/dsp_filters/wahwah.c @@ -145,4 +145,3 @@ dspfilter_get_implementation(dspfilter_simd_mask_t mask) } #undef dspfilter_get_implementation - diff --git a/libretro-common/features/features_cpu.c b/libretro-common/features/features_cpu.c index 51234c1878..b5fca018e8 100644 --- a/libretro-common/features/features_cpu.c +++ b/libretro-common/features/features_cpu.c @@ -68,7 +68,6 @@ #if defined(PS2) #include #include -#include #endif #if defined(__PSL1GHT__) @@ -128,7 +127,6 @@ static int ra_clock_gettime(int clk_ik, struct timespec *t) #define ra_clock_gettime clock_gettime #endif - #ifdef EMSCRIPTEN #include #endif @@ -191,7 +189,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void) #elif defined(VITA) sceRtcGetCurrentTick((SceRtcTick*)&time_ticks); #elif defined(PS2) - time_ticks = SDL_GetTicks()*294912; // 294,912MHZ / 1000 msecs + time_ticks = clock()*294912; // 294,912MHZ / 1000 msecs #elif defined(_3DS) time_ticks = svcGetSystemTick(); #elif defined(WIIU) @@ -200,6 +198,8 @@ retro_perf_tick_t cpu_features_get_perf_counter(void) struct timeval tv; gettimeofday(&tv,NULL); time_ticks = (1000000 * tv.tv_sec + tv.tv_usec); +#elif defined(HAVE_LIBNX) + time_ticks = armGetSystemTick(); #endif return time_ticks; @@ -241,7 +241,7 @@ retro_time_t cpu_features_get_time_usec(void) #elif defined(EMSCRIPTEN) return emscripten_get_now() * 1000; #elif defined(PS2) - return SDL_GetTicks()*1000; + return clock()*1000; #elif defined(__mips__) || defined(DJGPP) struct timeval tv; gettimeofday(&tv,NULL); @@ -708,7 +708,6 @@ uint64_t cpu_features_get(void) cpu |= RETRO_SIMD_MMXEXT; } - if (flags[3] & (1 << 26)) cpu |= RETRO_SIMD_SSE2; @@ -733,7 +732,6 @@ uint64_t cpu_features_get(void) if (flags[2] & (1 << 25)) cpu |= RETRO_SIMD_AES; - /* Must only perform xgetbv check if we have * AVX CPU support (guaranteed to have at least i686). */ if (((flags[2] & avx_flags) == avx_flags) diff --git a/libretro-common/file/archive_file.c b/libretro-common/file/archive_file.c index 675145432a..ca55e5d093 100644 --- a/libretro-common/file/archive_file.c +++ b/libretro-common/file/archive_file.c @@ -20,7 +20,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #include #include #include @@ -497,7 +496,6 @@ static bool file_archive_walk(const char *file, const char *valid_exts, int file_archive_parse_file_progress(file_archive_transfer_t *state) { - /* FIXME: this estimate is worse than before */ ptrdiff_t delta = 0; if (!state || state->archive_size == 0) @@ -505,7 +503,10 @@ int file_archive_parse_file_progress(file_archive_transfer_t *state) delta = state->directory - state->data; - return (int)(delta * 100 / state->archive_size); + if (!state->start_delta) + state->start_delta = delta; + + return (int)(((delta - state->start_delta) * 100) / (state->archive_size - state->start_delta)); } /** diff --git a/libretro-common/file/archive_file_zlib.c b/libretro-common/file/archive_file_zlib.c index 293deb9f3a..07fec55fd4 100644 --- a/libretro-common/file/archive_file_zlib.c +++ b/libretro-common/file/archive_file_zlib.c @@ -240,7 +240,7 @@ static int zip_file_read( const char *needle, void **buf, const char *optional_outfile) { - file_archive_transfer_t zlib = {ARCHIVE_TRANSFER_NONE, 0, NULL, NULL, NULL, NULL, NULL, NULL }; + file_archive_transfer_t zlib = {0}; struct archive_extract_userdata userdata = {{0}}; bool returnerr = true; int ret = 0; diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c index fcf95de2e9..b92acfd0e5 100644 --- a/libretro-common/file/config_file.c +++ b/libretro-common/file/config_file.c @@ -34,7 +34,10 @@ #elif defined(_XBOX) #include #endif - +#ifdef ORBIS +#include +#include +#endif #include #include #include @@ -413,10 +416,10 @@ static config_file_t *config_file_new_internal( if (!path || !*path) return conf; - +#if !defined(ORBIS) if (path_is_directory(path)) goto error; - +#endif conf->path = strdup(path); if (!conf->path) goto error; @@ -544,7 +547,6 @@ bool config_append_file(config_file_t *conf, const char *path) return true; } - config_file_t *config_file_new_from_string(const char *from_string) { size_t i; @@ -976,11 +978,20 @@ void config_set_bool(config_file_t *conf, const char *key, bool val) config_set_string(conf, key, val ? "true" : "false"); } -bool config_file_write(config_file_t *conf, const char *path) +bool config_file_write(config_file_t *conf, const char *path, bool sort) { if (!string_is_empty(path)) { void* buf = NULL; +#ifdef ORBIS + int fd = orbisOpen(path,O_RDWR|O_CREAT,0644); + RARCH_LOG("[Config]config_file_write orbisOpen path=%s fd=%d\n", path, fd); + if (fd < 0) + return false; + config_file_dump_orbis(conf,fd); + orbisClose(fd); + RARCH_LOG("[Config]config_file_write orbisClose path=%s fd=%d\n", path, fd); +#else FILE *file = (FILE*)fopen_utf8(path, "wb"); if (!file) return false; @@ -991,19 +1002,49 @@ bool config_file_write(config_file_t *conf, const char *path) setvbuf(file, (char*)buf, _IOFBF, 0x4000); #endif - config_file_dump(conf, file); + config_file_dump(conf, file, sort); if (file != stdout) fclose(file); free(buf); +#endif } else - config_file_dump(conf, stdout); + config_file_dump(conf, stdout, sort); return true; } -void config_file_dump(config_file_t *conf, FILE *file) +#ifdef ORBIS +void config_file_dump_orbis(config_file_t *conf, int fd) +{ + struct config_entry_list *list = NULL; + struct config_include_list *includes = conf->includes; + while (includes) + { + char cad[256]; + sprintf(cad,"#include %s\n", includes->path); + orbisWrite(fd,cad,strlen(cad)); + includes = includes->next; + } + + list = merge_sort_linked_list((struct config_entry_list*)conf->entries, config_sort_compare_func); + conf->entries = list; + + while (list) + { + if (!list->readonly && list->key) + { + char newlist[256]; + sprintf(newlist,"%s = %s\n", list->key, list->value); + orbisWrite(fd,newlist,strlen(newlist)); + } + list = list->next; + } +} +#endif + +void config_file_dump(config_file_t *conf, FILE *file, bool sort) { struct config_entry_list *list = NULL; struct config_include_list *includes = conf->includes; @@ -1014,7 +1055,11 @@ void config_file_dump(config_file_t *conf, FILE *file) includes = includes->next; } - list = merge_sort_linked_list((struct config_entry_list*)conf->entries, config_sort_compare_func); + if (sort) + list = merge_sort_linked_list((struct config_entry_list*)conf->entries, config_sort_compare_func); + else + list = (struct config_entry_list*)conf->entries; + conf->entries = list; while (list) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index a69f49decb..27f96f34bb 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2018 The RetroArch team +/* Copyright (C) 2010-2019 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_path.c). @@ -32,7 +32,10 @@ #include #include #include +#define VFS_FRONTEND +#include +/* TODO: There are probably some unnecessary things on this huge include list now but I'm too afraid to touch it */ #ifdef __APPLE__ #include #endif @@ -75,6 +78,11 @@ #include #endif +#if defined(ORBIS) +#include +#include +#include +#endif #if defined(PSP) #include #endif @@ -111,115 +119,37 @@ #endif -enum stat_mode +static retro_vfs_stat_t path_stat_cb = NULL; +static retro_vfs_mkdir_t path_mkdir_cb = NULL; + +void path_vfs_init(const struct retro_vfs_interface_info* vfs_info) { - IS_DIRECTORY = 0, - IS_CHARACTER_SPECIAL, - IS_VALID -}; + const struct retro_vfs_interface* vfs_iface; -static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) + path_stat_cb = NULL; + path_mkdir_cb = NULL; + + vfs_iface = vfs_info->iface; + + if (vfs_info->required_interface_version < PATH_REQUIRED_VFS_VERSION || !vfs_iface) + return; + + path_stat_cb = vfs_iface->stat; + path_mkdir_cb = vfs_iface->mkdir; +} + +static int path_stat(const char *path, int32_t *size) { -#if defined(VITA) || defined(PSP) - SceIoStat buf; - char *tmp = strdup(path); - size_t len = strlen(tmp); - if (tmp[len-1] == '/') - tmp[len-1]='\0'; + if (path_stat_cb != NULL) + return path_stat_cb(path, size); + return retro_vfs_stat_impl(path, size); +} - if (sceIoGetstat(tmp, &buf) < 0) - { - free(tmp); - return false; - } - free(tmp); -#elif defined(PS2) - iox_stat_t buf; - char *tmp = strdup(path); - size_t len = strlen(tmp); - if (tmp[len-1] == '/') - tmp[len-1]='\0'; - - if (fileXioGetStat(tmp, &buf) < 0) - { - free(tmp); - return false; - } - free(tmp); -#elif defined(__CELLOS_LV2__) - CellFsStat buf; - if (cellFsStat(path, &buf) < 0) - return false; -#elif defined(_WIN32) - struct _stat buf; - char *path_local; - wchar_t *path_wide; - DWORD file_info; - - if (!path || !*path) - return false; - - (void)path_wide; - (void)path_local; - (void)file_info; - -#if defined(LEGACY_WIN32) - path_local = utf8_to_local_string_alloc(path); - file_info = GetFileAttributes(path_local); - - _stat(path_local, &buf); - - if (path_local) - free(path_local); -#else - path_wide = utf8_to_utf16_string_alloc(path); - file_info = GetFileAttributesW(path_wide); - - _wstat(path_wide, &buf); - - if (path_wide) - free(path_wide); -#endif - - if (file_info == INVALID_FILE_ATTRIBUTES) - return false; -#else - struct stat buf; - if (stat(path, &buf) < 0) - return false; -#endif - - if (size) -#if defined(PS2) - *size = (int32_t)buf.size; -#else - *size = (int32_t)buf.st_size; -#endif - switch (mode) - { - case IS_DIRECTORY: -#if defined(VITA) || defined(PSP) - return FIO_S_ISDIR(buf.st_mode); -#elif defined(PS2) - return FIO_S_ISDIR(buf.mode); -#elif defined(__CELLOS_LV2__) - return ((buf.st_mode & S_IFMT) == S_IFDIR); -#elif defined(_WIN32) - return (file_info & FILE_ATTRIBUTE_DIRECTORY); -#else - return S_ISDIR(buf.st_mode); -#endif - case IS_CHARACTER_SPECIAL: -#if defined(VITA) || defined(PSP) || defined(PS2) || defined(__CELLOS_LV2__) || defined(_WIN32) - return false; -#else - return S_ISCHR(buf.st_mode); -#endif - case IS_VALID: - return true; - } - - return false; +static int path_mkdir_norecurse(const char *dir) +{ + if (path_mkdir_cb != NULL) + return path_mkdir_cb(dir); + return retro_vfs_mkdir_impl(dir); } /** @@ -232,39 +162,40 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) */ bool path_is_directory(const char *path) { - return path_stat(path, IS_DIRECTORY, NULL); +#ifdef ORBIS + /* TODO: This should be moved to the VFS module */ + int dfd; + if (!path) + return false; + dfd = orbisDopen(path); + if (dfd < 0) + return false; + orbisDclose(dfd); + return true; +#else + return (path_stat(path, NULL) & RETRO_VFS_STAT_IS_DIRECTORY) != 0; +#endif } bool path_is_character_special(const char *path) { - return path_stat(path, IS_CHARACTER_SPECIAL, NULL); + return (path_stat(path, NULL) & RETRO_VFS_STAT_IS_CHARACTER_SPECIAL) != 0; } bool path_is_valid(const char *path) { - return path_stat(path, IS_VALID, NULL); + return (path_stat(path, NULL) & RETRO_VFS_STAT_IS_VALID) != 0; } int32_t path_get_size(const char *path) { int32_t filesize = 0; - if (path_stat(path, IS_VALID, &filesize)) + if (path_stat(path, &filesize) != 0) return filesize; return -1; } -static bool path_mkdir_error(int ret) -{ -#if defined(VITA) - return (ret == SCE_ERROR_ERRNO_EEXIST); -#elif defined(PSP) || defined(PS2) || defined(_3DS) || defined(WIIU) || defined(SWITCH) - return (ret == -1); -#else - return (ret < 0 && errno == EEXIST); -#endif -} - /** * path_mkdir: * @dir : directory @@ -310,33 +241,10 @@ bool path_mkdir(const char *dir) if (norecurse) { -#if defined(_WIN32) -#ifdef LEGACY_WIN32 - int ret = _mkdir(dir); -#else - wchar_t *dirW = utf8_to_utf16_string_alloc(dir); - int ret = -1; - - if (dirW) - { - ret = _wmkdir(dirW); - free(dirW); - } -#endif -#elif defined(IOS) - int ret = mkdir(dir, 0755); -#elif defined(VITA) || defined(PSP) - int ret = sceIoMkdir(dir, 0777); -#elif defined(PS2) - int ret =fileXioMkdir(dir, 0777); -#elif defined(__QNX__) - int ret = mkdir(dir, 0777); -#else - int ret = mkdir(dir, 0750); -#endif + int ret = path_mkdir_norecurse(dir); /* Don't treat this as an error. */ - if (path_mkdir_error(ret) && path_is_directory(dir)) + if (ret == -2 && path_is_directory(dir)) ret = 0; if (ret < 0) @@ -672,6 +580,7 @@ bool fill_pathname_parent_dir_name(char *out_dir, * * Copies parent directory of @in_dir into @out_dir. * Assumes @in_dir is a directory. Keeps trailing '/'. + * If the path was already at the root directory, @out_dir will be an empty string. **/ void fill_pathname_parent_dir(char *out_dir, const char *in_dir, size_t size) @@ -758,12 +667,26 @@ void path_basedir(char *path) * * Extracts parent directory by mutating path. * Assumes that path is a directory. Keeps trailing '/'. + * If the path was already at the root directory, returns empty string **/ void path_parent_dir(char *path) { + bool path_was_absolute = path_is_absolute(path); size_t len = strlen(path); if (len && path_char_is_slash(path[len - 1])) + { path[len - 1] = '\0'; + if (path_was_absolute && find_last_slash(path) == NULL) + { + /* We removed the only slash from what used to be an absolute path. + * On Linux, this goes from "/" to an empty string and everything works fine, + * but on Windows, we went from C:\ to C:, which is not a valid path and that later + * gets errornously treated as a relative one by path_basedir and returns "./". + * What we really wanted is an empty string. */ + path[0] = '\0'; + return; + } + } path_basedir(path); } @@ -936,7 +859,6 @@ void fill_pathname_join_noext(char *out_path, path_remove_extension(out_path); } - /** * fill_pathname_join_delim: * @out_path : output path @@ -961,7 +883,8 @@ void fill_pathname_join_delim(char *out_path, const char *dir, out_path[copied] = delim; out_path[copied+1] = '\0'; - strlcat(out_path, path, size); + if (path) + strlcat(out_path, path, size); } void fill_pathname_join_delim_concat(char *out_path, const char *dir, diff --git a/libretro-common/file/nbio/nbio_intf.c b/libretro-common/file/nbio/nbio_intf.c index 1ce6322bc9..2fac18a313 100644 --- a/libretro-common/file/nbio/nbio_intf.c +++ b/libretro-common/file/nbio/nbio_intf.c @@ -32,14 +32,17 @@ extern nbio_intf_t nbio_linux; extern nbio_intf_t nbio_mmap_unix; extern nbio_intf_t nbio_mmap_win32; +extern nbio_intf_t nbio_orbis; extern nbio_intf_t nbio_stdio; #if defined(_linux__) static nbio_intf_t *internal_nbio = &nbio_linux; #elif defined(HAVE_MMAP) && defined(BSD) static nbio_intf_t *internal_nbio = &nbio_mmap_unix; -#elif defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) +#elif defined(_WIN32) && !defined(_XBOX) static nbio_intf_t *internal_nbio = &nbio_mmap_win32; +#elif defined(ORBIS) +static nbio_intf_t *internal_nbio = &nbio_orbis; #else static nbio_intf_t *internal_nbio = &nbio_stdio; #endif diff --git a/libretro-common/file/nbio/nbio_linux.c b/libretro-common/file/nbio/nbio_linux.c index 8644bb94cb..c454440cd8 100644 --- a/libretro-common/file/nbio/nbio_linux.c +++ b/libretro-common/file/nbio/nbio_linux.c @@ -32,7 +32,6 @@ #include #include - #include #include #include diff --git a/libretro-common/file/nbio/nbio_orbis.c b/libretro-common/file/nbio/nbio_orbis.c new file mode 100644 index 0000000000..7005f6b8cf --- /dev/null +++ b/libretro-common/file/nbio/nbio_orbis.c @@ -0,0 +1,296 @@ +/* Copyright (C) 2010-2018 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (nbio_orbis.c). + * --------------------------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include + +#if defined(ORBIS) +#include +#include +#include +#include +#include + +struct nbio_orbis_t +{ + int fd; + void* data; + size_t progress; + size_t len; + /* + * possible values: + * NBIO_READ, NBIO_WRITE - obvious + * -1 - currently doing nothing + * -2 - the pointer was reallocated since the last operation + */ + signed char op; + unsigned int mode; +}; + +static void *nbio_orbis_open(const char * filename, unsigned int mode) +{ + static const int o_flags[] = { O_RDONLY, O_RDWR | O_CREAT | O_TRUNC, + O_RDWR, O_RDONLY, O_RDWR | O_CREAT | O_TRUNC }; + void *buf = NULL; + struct nbio_orbis_t* handle = NULL; + size_t len = 0; + int fd = orbisOpen(filename, o_flags[mode], 0644); + + RARCH_LOG("[NBIO_ORBIS] open %s\n" , filename); + + if (fd < 0) + return NULL; + handle = (struct nbio_orbis_t*)malloc(sizeof(struct nbio_orbis_t)); + + + if (!handle) + goto error; + + handle->fd = fd; + + switch (mode) + { + case NBIO_WRITE: + case BIO_WRITE: + break; + default: + len=orbisLseek(handle->fd, 0, SEEK_END); + orbisLseek(handle->fd, 0, SEEK_SET); + break; + } + + handle->mode = mode; + + if (len) + buf = malloc(len); + + if (!buf) + { + RARCH_LOG("[NBIO_ORBIS] open error malloc %d bytes\n",len); + } + + if (len && !buf) + goto error; + + handle->data = buf; + handle->len = len; + handle->progress = handle->len; + handle->op = -2; + + return handle; + +error: + if (handle) + free(handle); + RARCH_LOG("[NBIO_ORBIS] open error closing %s\n" , filename); + orbisClose(fd); + return NULL; +} + +static void nbio_orbis_begin_read(void *data) +{ + + struct nbio_orbis_t *handle = (struct nbio_orbis_t*)data; + if (!handle) + return; + RARCH_LOG("[NBIO_ORBIS] begin read fd=%d\n", handle->fd ); + + if (handle->op >= 0) + { + RARCH_LOG("[NBIO_ORBIS] ERROR - attempted file read operation while busy\n"); + return; + } + + orbisLseek(handle->fd, 0, SEEK_SET); + + handle->op = NBIO_READ; + handle->progress = 0; +} + +static void nbio_orbis_begin_write(void *data) +{ + struct nbio_orbis_t *handle = (struct nbio_orbis_t*)data; + if (!handle) + return; + RARCH_LOG("[NBIO_ORBIS] begin write fd=%d\n", handle->fd ); + + if (handle->op >= 0) + { + RARCH_LOG("[NBIO_ORBIS] ERROR - attempted file write operation while busy\n"); + return; + } + + orbisLseek(handle->fd, 0, SEEK_SET); + handle->op = NBIO_WRITE; + handle->progress = 0; +} + +static bool nbio_orbis_iterate(void *data) +{ + size_t amount = 65536; + struct nbio_orbis_t *handle = (struct nbio_orbis_t*)data; + + if (!handle) + return false; + RARCH_LOG("[NBIO_ORBIS] begin iterate fd=%d\n", handle->fd ); + + if (amount > handle->len - handle->progress) + amount = handle->len - handle->progress; + + switch (handle->op) + { + case NBIO_READ: + if (handle->mode == BIO_READ) + { + amount = handle->len; + RARCH_LOG("[NBIO_ORBIS] iterate BIO_READ fd=%d readbytes=%d\n", handle->fd, orbisRead(handle->fd, (char*)handle->data, amount)); + + + } + else + { + RARCH_LOG("[NBIO_ORBIS] iterate read fd=%d handle->progress=%d readbytes=%d\n", handle->fd, handle->progress, orbisRead(handle->fd, (char*)handle->data + handle->progress, amount)); + + } + break; + case NBIO_WRITE: + if (handle->mode == BIO_WRITE) + { + size_t written = 0; + amount = handle->len; + written = orbisWrite(handle->fd, (char*)handle->data, amount); + RARCH_LOG("[NBIO_ORBIS] iterate BIO_WRITE fd=%d writebytes=%d\n", handle->fd, written); + + if (written != amount) + { + RARCH_LOG("[NBIO_ORBIS] iterate BIO_WRITE error fd=%d amount=%d != writebytes=%d\n", handle->fd, amount, written); + + return false; + } + } + else + { + RARCH_LOG("[NBIO_ORBIS] iterate write fd=%d writebytes=%d\n", handle->fd, orbisWrite(handle->fd, (char*)handle->data + handle->progress, amount)); + + + } + break; + } + + handle->progress += amount; + RARCH_LOG("[NBIO_ORBIS] end iterate fd=%d\n", handle->fd ); + + if (handle->progress == handle->len) + handle->op = -1; + return (handle->op < 0); +} + +static void nbio_orbis_resize(void *data, size_t len) +{ + struct nbio_orbis_t *handle = (struct nbio_orbis_t*)data; + if (!handle) + return; + + if (handle->op >= 0) + { + RARCH_LOG("[NBIO_ORBIS] ERROR - attempted file resize operation while busy\n"); + return; + } + if (len < handle->len) + { + RARCH_LOG("[NBIO_ORBIS] ERROR - attempted file shrink operation, not implemented"); + return; + } + + handle->len = len; + handle->data = realloc(handle->data, handle->len); + handle->op = -1; + handle->progress = handle->len; +} + +static void *nbio_orbis_get_ptr(void *data, size_t* len) +{ + struct nbio_orbis_t *handle = (struct nbio_orbis_t*)data; + if (!handle) + return NULL; + RARCH_LOG("[NBIO_ORBIS] get pointer\n"); + if (len) + *len = handle->len; + if (handle->op == -1) + return handle->data; + return NULL; +} + +static void nbio_orbis_cancel(void *data) +{ + struct nbio_orbis_t *handle = (struct nbio_orbis_t*)data; + if (!handle) + return; + RARCH_LOG("[NBIO_ORBIS] cancel \n"); + handle->op = -1; + handle->progress = handle->len; +} + +static void nbio_orbis_free(void *data) +{ + struct nbio_orbis_t *handle = (struct nbio_orbis_t*)data; + if (!handle) + return; + RARCH_LOG("[NBIO_ORBIS] begin free fd=%d\n", handle->fd ); + + if (handle->op >= 0) + { + RARCH_LOG("[NBIO_ORBIS] ERROR - attempted free() while busy\n"); + return; + } + RARCH_LOG("[NBIO_ORBIS] free close fd=%d\n",handle->fd); + + orbisClose(handle->fd); + free(handle->data); + + handle->data = NULL; + free(handle); +} + +nbio_intf_t nbio_orbis = { + nbio_orbis_open, + nbio_orbis_begin_read, + nbio_orbis_begin_write, + nbio_orbis_iterate, + nbio_orbis_resize, + nbio_orbis_get_ptr, + nbio_orbis_cancel, + nbio_orbis_free, + "nbio_orbis", +}; +#else +nbio_intf_t nbio_orbis = { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "nbio_orbis", +}; +#endif diff --git a/libretro-common/file/nbio/nbio_stdio.c b/libretro-common/file/nbio/nbio_stdio.c index f80e91a27b..52e8eee5eb 100644 --- a/libretro-common/file/nbio/nbio_stdio.c +++ b/libretro-common/file/nbio/nbio_stdio.c @@ -194,6 +194,7 @@ static bool nbio_stdio_iterate(void *data) static void nbio_stdio_resize(void *data, size_t len) { + void *new_data = NULL; struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data; if (!handle) return; @@ -209,10 +210,14 @@ static void nbio_stdio_resize(void *data, size_t len) abort(); } - handle->len = len; - handle->data = realloc(handle->data, handle->len); - handle->op = -1; - handle->progress = handle->len; + handle->len = len; + handle->progress = len; + handle->op = -1; + + new_data = realloc(handle->data, handle->len); + + if (new_data) + handle->data = new_data; } static void *nbio_stdio_get_ptr(void *data, size_t* len) diff --git a/libretro-common/file/nbio/nbio_windowsmmap.c b/libretro-common/file/nbio/nbio_windowsmmap.c index 67860a3909..cac7194f25 100644 --- a/libretro-common/file/nbio/nbio_windowsmmap.c +++ b/libretro-common/file/nbio/nbio_windowsmmap.c @@ -22,7 +22,7 @@ #include -#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) +#if defined(_WIN32) && !defined(_XBOX) #include #include @@ -69,7 +69,11 @@ static void *nbio_mmap_win32_open(const char * filename, unsigned mode) HANDLE file = CreateFile(filename, access, FILE_SHARE_ALL, NULL, dispositions[mode], FILE_ATTRIBUTE_NORMAL, NULL); #else wchar_t *filename_wide = utf8_to_utf16_string_alloc(filename); +#ifdef __WINRT__ + HANDLE file = CreateFile2(filename_wide, access, FILE_SHARE_ALL, dispositions[mode], NULL); +#else HANDLE file = CreateFileW(filename_wide, access, FILE_SHARE_ALL, NULL, dispositions[mode], FILE_ATTRIBUTE_NORMAL, NULL); +#endif if (filename_wide) free(filename_wide); diff --git a/libretro-common/file/retro_dirent.c b/libretro-common/file/retro_dirent.c index 561c1b055a..752cbdad01 100644 --- a/libretro-common/file/retro_dirent.c +++ b/libretro-common/file/retro_dirent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2018 The RetroArch team +/* Copyright (C) 2010-2019 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_dirent.c). @@ -28,293 +28,91 @@ #include #include -#include -#include -#include +#define VFS_FRONTEND +#include -#if defined(_WIN32) -# ifdef _MSC_VER -# define setmode _setmode -# endif -#include -# ifdef _XBOX -# include -# define INVALID_FILE_ATTRIBUTES -1 -# else -# include -# include -# include -# include -# endif -#elif defined(VITA) -# include -# include -# include -#else -# if defined(PSP) -# include -# endif -# if defined(PS2) -# include -# endif -# include -# include -# include -# include -#endif +static retro_vfs_opendir_t dirent_opendir_cb = NULL; +static retro_vfs_readdir_t dirent_readdir_cb = NULL; +static retro_vfs_dirent_get_name_t dirent_dirent_get_name_cb = NULL; +static retro_vfs_dirent_is_dir_t dirent_dirent_is_dir_cb = NULL; +static retro_vfs_closedir_t dirent_closedir_cb = NULL; -#ifdef __CELLOS_LV2__ -#include -#endif - -#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) || defined(PS2) -#include /* stat() is defined here */ -#endif - -#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX) -#ifndef LEGACY_WIN32 -#define LEGACY_WIN32 -#endif -#endif - -struct RDIR +void dirent_vfs_init(const struct retro_vfs_interface_info* vfs_info) { -#if defined(_WIN32) -#if defined(LEGACY_WIN32) - WIN32_FIND_DATA entry; -#else - WIN32_FIND_DATAW entry; -#endif - HANDLE directory; - bool next; - char path[PATH_MAX_LENGTH]; -#elif defined(VITA) || defined(PSP) - SceUID directory; - SceIoDirent entry; -#elif defined(PS2) - int directory; - iox_dirent_t entry; -#elif defined(__CELLOS_LV2__) - CellFsErrno error; - int directory; - CellFsDirent entry; -#else - DIR *directory; - const struct dirent *entry; -#endif -}; + const struct retro_vfs_interface* vfs_iface; + + dirent_opendir_cb = NULL; + dirent_readdir_cb = NULL; + dirent_dirent_get_name_cb = NULL; + dirent_dirent_is_dir_cb = NULL; + dirent_closedir_cb = NULL; + + vfs_iface = vfs_info->iface; + + if (vfs_info->required_interface_version < DIRENT_REQUIRED_VFS_VERSION || !vfs_iface) + return; + + dirent_opendir_cb = vfs_iface->opendir; + dirent_readdir_cb = vfs_iface->readdir; + dirent_dirent_get_name_cb = vfs_iface->dirent_get_name; + dirent_dirent_is_dir_cb = vfs_iface->dirent_is_dir; + dirent_closedir_cb = vfs_iface->closedir; +} + +struct RDIR *retro_opendir_include_hidden(const char *name, bool include_hidden) +{ + if (dirent_opendir_cb != NULL) + return (struct RDIR *)dirent_opendir_cb(name, include_hidden); + return (struct RDIR *)retro_vfs_opendir_impl(name, include_hidden); +} struct RDIR *retro_opendir(const char *name) { -#if defined(_WIN32) - char path_buf[1024]; - char *path_local = NULL; - wchar_t *path_wide = NULL; - unsigned path_len; -#endif - struct RDIR *rdir; - - /*Reject null or empty string paths*/ - if (!name||(*name==0)) - return NULL; - - /*Allocate RDIR struct. Tidied later with retro_closedir*/ - rdir = (struct RDIR*)calloc(1, sizeof(*rdir)); - if (!rdir) - return NULL; - -#if defined(_WIN32) - (void)path_wide; - (void)path_local; - - path_buf[0] = '\0'; - path_len = strlen(name); - - /* Non-NT platforms don't like extra slashes in the path */ - if (name[path_len - 1] == '\\') - snprintf(path_buf, sizeof(path_buf), "%s*", name); - else - snprintf(path_buf, sizeof(path_buf), "%s\\*", name); - -#if defined(LEGACY_WIN32) - path_local = utf8_to_local_string_alloc(path_buf); - rdir->directory = FindFirstFile(path_local, &rdir->entry); - - if (path_local) - free(path_local); -#else - path_wide = utf8_to_utf16_string_alloc(path_buf); - rdir->directory = FindFirstFileW(path_wide, &rdir->entry); - - if (path_wide) - free(path_wide); -#endif - -#elif defined(VITA) || defined(PSP) - rdir->directory = sceIoDopen(name); -#elif defined(PS2) - rdir->directory = fileXioDopen(name); -#elif defined(_3DS) - rdir->directory = !string_is_empty(name) ? opendir(name) : NULL; - rdir->entry = NULL; -#elif defined(__CELLOS_LV2__) - rdir->error = cellFsOpendir(name, &rdir->directory); -#else - rdir->directory = opendir(name); - rdir->entry = NULL; -#endif - - if (rdir->directory) - return rdir; - - free(rdir); - return NULL; + return retro_opendir_include_hidden(name, false); } bool retro_dirent_error(struct RDIR *rdir) { -#if defined(_WIN32) - return (rdir->directory == INVALID_HANDLE_VALUE); -#elif defined(VITA) || defined(PSP) || defined(PS2) - return (rdir->directory < 0); -#elif defined(__CELLOS_LV2__) - return (rdir->error != CELL_FS_SUCCEEDED); -#else - return !(rdir->directory); -#endif + /* Left for compatibility */ + return false; } int retro_readdir(struct RDIR *rdir) { -#if defined(_WIN32) - if(rdir->next) -#if defined(LEGACY_WIN32) - return (FindNextFile(rdir->directory, &rdir->entry) != 0); -#else - return (FindNextFileW(rdir->directory, &rdir->entry) != 0); -#endif - - rdir->next = true; - return (rdir->directory != INVALID_HANDLE_VALUE); -#elif defined(VITA) || defined(PSP) - return (sceIoDread(rdir->directory, &rdir->entry) > 0); -#elif defined(PS2) - iox_dirent_t record; - int ret = fileXioDread(rdir->directory, &record); - rdir->entry = record; - return ( ret > 0); -#elif defined(__CELLOS_LV2__) - uint64_t nread; - rdir->error = cellFsReaddir(rdir->directory, &rdir->entry, &nread); - return (nread != 0); -#else - return ((rdir->entry = readdir(rdir->directory)) != NULL); -#endif + if (dirent_readdir_cb != NULL) + return dirent_readdir_cb((struct retro_vfs_dir_handle *)rdir); + return retro_vfs_readdir_impl((struct retro_vfs_dir_handle *)rdir); } const char *retro_dirent_get_name(struct RDIR *rdir) { -#if defined(_WIN32) -#if defined(LEGACY_WIN32) - char *name_local = local_to_utf8_string_alloc(rdir->entry.cFileName); - memset(rdir->entry.cFileName, 0, sizeof(rdir->entry.cFileName)); - strlcpy(rdir->entry.cFileName, name_local, sizeof(rdir->entry.cFileName)); - - if (name_local) - free(name_local); -#else - char *name = utf16_to_utf8_string_alloc(rdir->entry.cFileName); - memset(rdir->entry.cFileName, 0, sizeof(rdir->entry.cFileName)); - strlcpy((char*)rdir->entry.cFileName, name, sizeof(rdir->entry.cFileName)); - - if (name) - free(name); -#endif - return (char*)rdir->entry.cFileName; -#elif defined(VITA) || defined(PSP) || defined(__CELLOS_LV2__) - return rdir->entry.d_name; -#elif defined(PS2) - return rdir->entry.name; -#else - - return rdir->entry->d_name; -#endif + if (dirent_dirent_get_name_cb != NULL) + return dirent_dirent_get_name_cb((struct retro_vfs_dir_handle *)rdir); + return retro_vfs_dirent_get_name_impl((struct retro_vfs_dir_handle *)rdir); } /** * * retro_dirent_is_dir: * @rdir : pointer to the directory entry. - * @path : path to the directory entry. + * @unused : deprecated, included for compatibility reasons, pass NULL * * Is the directory listing entry a directory? * * Returns: true if directory listing entry is * a directory, false if not. */ -bool retro_dirent_is_dir(struct RDIR *rdir, const char *path) +bool retro_dirent_is_dir(struct RDIR *rdir, const char *unused) { -#if defined(_WIN32) - const WIN32_FIND_DATA *entry = (const WIN32_FIND_DATA*)&rdir->entry; - return entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; -#elif defined(PSP) || defined(VITA) - const SceIoDirent *entry = (const SceIoDirent*)&rdir->entry; -#if defined(PSP) - return (entry->d_stat.st_attr & FIO_SO_IFDIR) == FIO_SO_IFDIR; -#elif defined(VITA) - return SCE_S_ISDIR(entry->d_stat.st_mode); -#endif -#elif defined(PS2) - const iox_dirent_t *entry = (const iox_dirent_t*)&rdir->entry; - return FIO_S_ISDIR(entry->stat.mode); -#elif defined(__CELLOS_LV2__) - CellFsDirent *entry = (CellFsDirent*)&rdir->entry; - return (entry->d_type == CELL_FS_TYPE_DIRECTORY); -#else - struct stat buf; -#if defined(DT_DIR) - const struct dirent *entry = (const struct dirent*)rdir->entry; - if (entry->d_type == DT_DIR) - return true; - /* This can happen on certain file systems. */ - if (!(entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK)) - return false; -#endif - /* dirent struct doesn't have d_type, do it the slow way ... */ - if (stat(path, &buf) < 0) - return false; - return S_ISDIR(buf.st_mode); -#endif -} - -void retro_dirent_include_hidden(struct RDIR *rdir, bool include_hidden) -{ -#ifdef _WIN32 - if (include_hidden) - rdir->entry.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN; - else - rdir->entry.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN; -#endif + if (dirent_dirent_is_dir_cb != NULL) + return dirent_dirent_is_dir_cb((struct retro_vfs_dir_handle *)rdir); + return retro_vfs_dirent_is_dir_impl((struct retro_vfs_dir_handle *)rdir); } void retro_closedir(struct RDIR *rdir) { - if (!rdir) - return; - -#if defined(_WIN32) - if (rdir->directory != INVALID_HANDLE_VALUE) - FindClose(rdir->directory); -#elif defined(VITA) || defined(PSP) - sceIoDclose(rdir->directory); -#elif defined(PS2) - fileXioDclose(rdir->directory); -#elif defined(__CELLOS_LV2__) - rdir->error = cellFsClosedir(rdir->directory); -#else - if (rdir->directory) - closedir(rdir->directory); -#endif - - free(rdir); + if (dirent_closedir_cb != NULL) + dirent_closedir_cb((struct retro_vfs_dir_handle *)rdir); + else + retro_vfs_closedir_impl((struct retro_vfs_dir_handle *)rdir); } diff --git a/libretro-common/formats/image_texture.c b/libretro-common/formats/image_texture.c index e2f3c3d162..58df1e2324 100644 --- a/libretro-common/formats/image_texture.c +++ b/libretro-common/formats/image_texture.c @@ -202,7 +202,6 @@ end: return success; } - void image_texture_free(struct texture_image *img) { if (!img) diff --git a/libretro-common/formats/jpeg/rjpeg.c b/libretro-common/formats/jpeg/rjpeg.c index e321b69b33..7d4e45a1b3 100644 --- a/libretro-common/formats/jpeg/rjpeg.c +++ b/libretro-common/formats/jpeg/rjpeg.c @@ -779,7 +779,6 @@ static INLINE uint8_t rjpeg__clamp(int x) return (uint8_t) x; } - /* derived from jidctint -- DCT_ISLOW */ #define RJPEG__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ @@ -1292,7 +1291,6 @@ static uint8_t rjpeg__get_marker(rjpeg__jpeg *j) return x; } - /* after a restart interval, rjpeg__jpeg_reset the entropy decoder and * the dc prediction */ @@ -1866,7 +1864,6 @@ static int rjpeg__process_frame_header(rjpeg__jpeg *z, int scan) return 1; } - static int rjpeg__decode_jpeg_header(rjpeg__jpeg *z, int scan) { int m; @@ -2014,7 +2011,6 @@ static uint8_t* rjpeg__resample_row_h_2(uint8_t *out, uint8_t *in_near, return out; } - static uint8_t *rjpeg__resample_row_hv_2(uint8_t *out, uint8_t *in_near, uint8_t *in_far, int w, int hs) { @@ -2370,7 +2366,6 @@ static void rjpeg__setup_jpeg(rjpeg__jpeg *j) j->YCbCr_to_RGB_kernel = rjpeg__YCbCr_to_RGB_row; j->resample_row_hv_2_kernel = rjpeg__resample_row_hv_2; - #if defined(__SSE2__) if (mask & RETRO_SIMD_SSE2) { diff --git a/libretro-common/formats/json/jsonsax_full.c b/libretro-common/formats/json/jsonsax_full.c index 3a413d8d05..e5cefaf785 100644 --- a/libretro-common/formats/json/jsonsax_full.c +++ b/libretro-common/formats/json/jsonsax_full.c @@ -3132,9 +3132,9 @@ static Codepoint JSON_Writer_GetCodepointEscapeCharacter(JSON_Writer writer, Cod case '"': return '"'; - - case '/': - return '/'; + /* Don't escape forward slashes */ + /*case '/': + return '/';*/ case '\\': return '\\'; diff --git a/libretro-common/formats/libchdr/libchdr_bitstream.c b/libretro-common/formats/libchdr/libchdr_bitstream.c index 036c60d400..1a6cf73ba2 100644 --- a/libretro-common/formats/libchdr/libchdr_bitstream.c +++ b/libretro-common/formats/libchdr/libchdr_bitstream.c @@ -34,7 +34,6 @@ struct bitstream* create_bitstream(const void *src, uint32_t srclength) return bitstream; } - /*----------------------------------------------------- * bitstream_peek - fetch the requested number of bits * but don't advance the input pointer @@ -62,7 +61,6 @@ uint32_t bitstream_peek(struct bitstream* bitstream, int numbits) return bitstream->buffer >> (32 - numbits); } - /*----------------------------------------------------- * bitstream_remove - advance the input pointer by the * specified number of bits @@ -75,7 +73,6 @@ void bitstream_remove(struct bitstream* bitstream, int numbits) bitstream->bits -= numbits; } - /*----------------------------------------------------- * bitstream_read - fetch the requested number of bits *----------------------------------------------------- @@ -88,7 +85,6 @@ uint32_t bitstream_read(struct bitstream* bitstream, int numbits) return result; } - /*------------------------------------------------- * read_offset - return the current read offset *------------------------------------------------- @@ -106,7 +102,6 @@ uint32_t bitstream_read_offset(struct bitstream* bitstream) return result; } - /*------------------------------------------------- * flush - flush to the nearest byte *------------------------------------------------- diff --git a/libretro-common/formats/libchdr/libchdr_cdrom.c b/libretro-common/formats/libchdr/libchdr_cdrom.c index f59c1712f9..f6876e0b7c 100644 --- a/libretro-common/formats/libchdr/libchdr_cdrom.c +++ b/libretro-common/formats/libchdr/libchdr_cdrom.c @@ -66,8 +66,6 @@ void CLIB_DECL logerror(const char *text, ...) ATTR_PRINTF(1,2); #define LOG(x) #endif - - /*************************************************************************** CONSTANTS ***************************************************************************/ @@ -94,8 +92,6 @@ void CLIB_DECL logerror(const char *text, ...) ATTR_PRINTF(1,2); /** @brief 43 bytes each. */ #define ECC_Q_COMP 43 - - /** * @brief ------------------------------------------------- * ECC lookup tables pre-calculated tables for ECC data calcs @@ -303,7 +299,6 @@ static const uint16_t qoffsets[ECC_Q_NUM_BYTES][ECC_Q_COMP] = { 0x867,0x003,0x05b,0x0b3,0x10b,0x163,0x1bb,0x213,0x26b,0x2c3,0x31b,0x373,0x3cb,0x423,0x47b,0x4d3,0x52b,0x583,0x5db,0x633,0x68b,0x6e3,0x73b,0x793,0x7eb,0x843,0x89b,0x037,0x08f,0x0e7,0x13f,0x197,0x1ef,0x247,0x29f,0x2f7,0x34f,0x3a7,0x3ff,0x457,0x4af,0x507,0x55f } }; - /*------------------------------------------------- * ecc_source_byte - return data from the sector * at the given offset, masking anything diff --git a/libretro-common/formats/libchdr/libchdr_chd.c b/libretro-common/formats/libchdr/libchdr_chd.c index 79a50aac2f..ddb951241e 100644 --- a/libretro-common/formats/libchdr/libchdr_chd.c +++ b/libretro-common/formats/libchdr/libchdr_chd.c @@ -986,7 +986,7 @@ chd_error chd_precache(chd_file *chd) size = filestream_tell(chd->file); if (size <= 0) return CHDERR_INVALID_DATA; - chd->file_cache = malloc(size); + chd->file_cache = (UINT8*)malloc(size); if (chd->file_cache == NULL) return CHDERR_OUT_OF_MEMORY; filestream_seek(chd->file, 0, SEEK_SET); @@ -1545,8 +1545,6 @@ static chd_error read_uncompressed(chd_file *chd, UINT64 offset, size_t size, UI return CHDERR_NONE; } - - /*------------------------------------------------- hunk_read_into_memory - read a hunk into memory at the given location diff --git a/libretro-common/formats/libchdr/libchdr_huffman.c b/libretro-common/formats/libchdr/libchdr_huffman.c index dd041a76c9..9d69a7b7ac 100644 --- a/libretro-common/formats/libchdr/libchdr_huffman.c +++ b/libretro-common/formats/libchdr/libchdr_huffman.c @@ -232,7 +232,6 @@ enum huffman_error huffman_import_tree_rle(struct huffman_decoder* decoder, stru return bitstream_overflow(bitbuf) ? HUFFERR_INPUT_BUFFER_TOO_SMALL : HUFFERR_NONE; } - /*------------------------------------------------- * import_tree_huffman - import a huffman-encoded * huffman tree from a source data stream diff --git a/libretro-common/formats/libchdr/libchdr_lzma.c b/libretro-common/formats/libchdr/libchdr_lzma.c index 096c6efb0f..69bafbbff8 100644 --- a/libretro-common/formats/libchdr/libchdr_lzma.c +++ b/libretro-common/formats/libchdr/libchdr_lzma.c @@ -352,4 +352,3 @@ chd_error cdlz_codec_decompress(void *codec, const uint8_t *src, uint32_t comple } return CHDERR_NONE; } - diff --git a/libretro-common/formats/tga/rtga.c b/libretro-common/formats/tga/rtga.c index 47017d7523..d39ea57bc0 100644 --- a/libretro-common/formats/tga/rtga.c +++ b/libretro-common/formats/tga/rtga.c @@ -37,7 +37,6 @@ #define RTGA_COMPUTE_Y(r, g, b) ((uint8_t)((((r) * 77) + ((g) * 150) + (29 * (b))) >> 8)) - struct rtga { uint8_t *buff_data; diff --git a/libretro-common/formats/xml/rxml.c b/libretro-common/formats/xml/rxml.c index e2a02a77c5..482b75b004 100644 --- a/libretro-common/formats/xml/rxml.c +++ b/libretro-common/formats/xml/rxml.c @@ -485,4 +485,3 @@ char *rxml_node_attrib(struct rxml_node *node, const char *attrib) return NULL; } - diff --git a/libretro-common/formats/xml/test/Makefile b/libretro-common/formats/xml/test/Makefile index 3e2e3dbbb1..58c3336e39 100644 --- a/libretro-common/formats/xml/test/Makefile +++ b/libretro-common/formats/xml/test/Makefile @@ -24,4 +24,3 @@ clean: rm -f $(TARGET) $(OBJS) .PHONY: clean - diff --git a/libretro-common/formats/xml/test/rxml_test.c b/libretro-common/formats/xml/test/rxml_test.c index 36e794eefc..2bd39c2f72 100644 --- a/libretro-common/formats/xml/test/rxml_test.c +++ b/libretro-common/formats/xml/test/rxml_test.c @@ -64,4 +64,3 @@ int main(int argc, char *argv[]) rxml_log_document(argv[1]); } - diff --git a/libretro-common/gfx/scaler/pixconv.c b/libretro-common/gfx/scaler/pixconv.c index 15f0094781..edb5852047 100644 --- a/libretro-common/gfx/scaler/pixconv.c +++ b/libretro-common/gfx/scaler/pixconv.c @@ -873,4 +873,3 @@ void conv_copy(void *output_, const void *input_, h++, output += out_stride, input += in_stride) memcpy(output, input, copy_len); } - diff --git a/libretro-common/gfx/scaler/scaler_filter.c b/libretro-common/gfx/scaler/scaler_filter.c index 498f80d8f3..adca7eb033 100644 --- a/libretro-common/gfx/scaler/scaler_filter.c +++ b/libretro-common/gfx/scaler/scaler_filter.c @@ -240,4 +240,3 @@ bool scaler_gen_filter(struct scaler_ctx *ctx) return validate_filter(ctx); } - diff --git a/libretro-common/gfx/scaler/scaler_int.c b/libretro-common/gfx/scaler/scaler_int.c index 9aa583cef8..5dd88b14e5 100644 --- a/libretro-common/gfx/scaler/scaler_int.c +++ b/libretro-common/gfx/scaler/scaler_int.c @@ -258,4 +258,3 @@ void scaler_argb8888_point_special(const struct scaler_ctx *ctx, output[w] = inp[x >> 16]; } } - diff --git a/libretro-common/glsm/glsm.c b/libretro-common/glsm/glsm.c index 70fed4ba3f..22ae5f2343 100644 --- a/libretro-common/glsm/glsm.c +++ b/libretro-common/glsm/glsm.c @@ -131,7 +131,6 @@ struct gl_cached_state GLenum func; } depthfunc; - struct { bool used; @@ -335,7 +334,6 @@ void rglTexSubImage2D( width, height, format, type, pixels); } - void rglGetBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, @@ -898,7 +896,6 @@ void rglCompressedTexImage2D(GLenum target, GLint level, width, height, border, imageSize, data); } - void rglDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) { #ifdef GLSM_DEBUG @@ -1035,7 +1032,6 @@ void rglBindFragDataLocation(GLuint program, GLuint colorNumber, #endif } - /* * Category: Shaders * @@ -1140,7 +1136,6 @@ void rglEndQuery( GLenum target) #endif } - /* * Category: UBO * @@ -1505,7 +1500,6 @@ GLboolean rglIsProgram(GLuint program) return glIsProgram(program); } - void rglTexCoord2f(GLfloat s, GLfloat t) { #ifdef HAVE_LEGACY_GL @@ -1973,7 +1967,6 @@ void rglUniform4fv(GLint location, GLsizei count, const GLfloat *value) glUniform4fv(location, count, value); } - /* * * Core in: @@ -2208,7 +2201,6 @@ void rglTexImage2DMultisample( GLenum target, #endif } - void rglTexImage3D( GLenum target, GLint level, GLint internalFormat, diff --git a/libretro-common/glsym/README.md b/libretro-common/glsym/README.md index 9e4f0e8400..5130194fcb 100644 --- a/libretro-common/glsym/README.md +++ b/libretro-common/glsym/README.md @@ -9,4 +9,3 @@ Use Khronos' recent [header](www.opengl.org/registry/api/glext.h). ## OpenGL ES ./glgen.py /usr/include/GLES2/gl2ext.h glsym_es2.h glsym_es2.c - diff --git a/libretro-common/glsym/glgen.py b/libretro-common/glsym/glgen.py index a599e5574d..4d4a35b3e0 100755 --- a/libretro-common/glsym/glgen.py +++ b/libretro-common/glsym/glgen.py @@ -155,4 +155,3 @@ if __name__ == '__main__': f.write(' { NULL, NULL },\n') f.write('};\n') dump(f, declarations) - diff --git a/libretro-common/glsym/glsym_es2.c b/libretro-common/glsym/glsym_es2.c index 851554994d..b9c0706480 100644 --- a/libretro-common/glsym/glsym_es2.c +++ b/libretro-common/glsym/glsym_es2.c @@ -407,4 +407,3 @@ RGLSYMGLTEXTURESTORAGE3DEXTPROC __rglgen_glTextureStorage3DEXT; RGLSYMGLTEXTUREVIEWEXTPROC __rglgen_glTextureViewEXT; RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultiviewOVR; RGLSYMGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultisampleMultiviewOVR; - diff --git a/libretro-common/glsym/glsym_es3.c b/libretro-common/glsym/glsym_es3.c index b247b8f372..86d46d9e71 100644 --- a/libretro-common/glsym/glsym_es3.c +++ b/libretro-common/glsym/glsym_es3.c @@ -411,4 +411,3 @@ RGLSYMGLTEXTURESTORAGE3DEXTPROC __rglgen_glTextureStorage3DEXT; RGLSYMGLTEXTUREVIEWEXTPROC __rglgen_glTextureViewEXT; RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultiviewOVR; RGLSYMGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultisampleMultiviewOVR; - diff --git a/libretro-common/glsym/glsym_gl.c b/libretro-common/glsym/glsym_gl.c index 8fa9697294..4f0c8280f7 100644 --- a/libretro-common/glsym/glsym_gl.c +++ b/libretro-common/glsym/glsym_gl.c @@ -28,16 +28,6 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { #ifdef HAVE_LIBNX - // xglgen missing - SYM(ReadPixels), - SYM(TexImage2D), - SYM(Viewport), - SYM(TexParameteri), - SYM(TexSubImage2D), - SYM(TexParameteriv), - SYM(DrawElements), - - // xglgen generated SYM(ClearIndex), SYM(ClearColor), SYM(Clear), @@ -88,6 +78,9 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(ClearAccum), SYM(Accum), SYM(MatrixMode), + SYM(Ortho), + SYM(Frustum), + SYM(Viewport), SYM(PushMatrix), SYM(PopMatrix), SYM(LoadIdentity), @@ -95,6 +88,8 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(LoadMatrixf), SYM(MultMatrixd), SYM(MultMatrixf), + SYM(Rotated), + SYM(Rotatef), SYM(Scaled), SYM(Scalef), SYM(Translated), @@ -105,6 +100,7 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(NewList), SYM(EndList), SYM(CallList), + SYM(CallLists), SYM(ListBase), SYM(Begin), SYM(End), @@ -160,6 +156,14 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(Color3ub), SYM(Color3ui), SYM(Color3us), + SYM(Color4b), + SYM(Color4d), + SYM(Color4f), + SYM(Color4i), + SYM(Color4s), + SYM(Color4ub), + SYM(Color4ui), + SYM(Color4us), SYM(Color3bv), SYM(Color3dv), SYM(Color3fv), @@ -240,13 +244,24 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(Rectfv), SYM(Rectiv), SYM(Rectsv), + SYM(VertexPointer), + SYM(NormalPointer), + SYM(ColorPointer), + SYM(IndexPointer), + SYM(TexCoordPointer), SYM(EdgeFlagPointer), SYM(GetPointerv), SYM(ArrayElement), SYM(DrawArrays), + SYM(DrawElements), + SYM(InterleavedArrays), SYM(ShadeModel), SYM(Lightf), SYM(Lighti), + SYM(Lightfv), + SYM(Lightiv), + SYM(GetLightfv), + SYM(GetLightiv), SYM(LightModelf), SYM(LightModeli), SYM(LightModelfv), @@ -263,9 +278,16 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(PixelStorei), SYM(PixelTransferf), SYM(PixelTransferi), + SYM(PixelMapfv), + SYM(PixelMapuiv), + SYM(PixelMapusv), SYM(GetPixelMapfv), SYM(GetPixelMapuiv), SYM(GetPixelMapusv), + SYM(Bitmap), + SYM(ReadPixels), + SYM(DrawPixels), + SYM(CopyPixels), SYM(StencilFunc), SYM(StencilMask), SYM(StencilOp), @@ -287,10 +309,31 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(GetTexEnviv), SYM(TexParameterf), SYM(TexParameteri), + SYM(TexParameterfv), + SYM(TexParameteriv), + SYM(GetTexParameterfv), + SYM(GetTexParameteriv), + SYM(GetTexLevelParameterfv), + SYM(GetTexLevelParameteriv), + SYM(TexImage1D), + SYM(TexImage2D), + SYM(GetTexImage), SYM(GenTextures), SYM(DeleteTextures), SYM(BindTexture), + SYM(PrioritizeTextures), + SYM(AreTexturesResident), SYM(IsTexture), + SYM(TexSubImage1D), + SYM(TexSubImage2D), + SYM(CopyTexImage1D), + SYM(CopyTexImage2D), + SYM(CopyTexSubImage1D), + SYM(CopyTexSubImage2D), + SYM(Map1d), + SYM(Map1f), + SYM(Map2d), + SYM(Map2f), SYM(GetMapdv), SYM(GetMapfv), SYM(GetMapiv), @@ -304,6 +347,8 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(EvalCoord2fv), SYM(MapGrid1d), SYM(MapGrid1f), + SYM(MapGrid2d), + SYM(MapGrid2f), SYM(EvalPoint1), SYM(EvalPoint2), SYM(EvalMesh1), @@ -319,9 +364,44 @@ const struct rglgen_sym_map rglgen_symbol_map[] = { SYM(LoadName), SYM(PushName), SYM(PopName), + SYM(DrawRangeElements), + SYM(TexImage3D), + SYM(TexSubImage3D), + SYM(CopyTexSubImage3D), + SYM(ColorTable), + SYM(ColorSubTable), + SYM(ColorTableParameteriv), + SYM(ColorTableParameterfv), + SYM(CopyColorSubTable), + SYM(CopyColorTable), + SYM(GetColorTable), + SYM(GetColorTableParameterfv), + SYM(GetColorTableParameteriv), SYM(BlendEquation), + SYM(BlendColor), + SYM(Histogram), SYM(ResetHistogram), + SYM(GetHistogram), + SYM(GetHistogramParameterfv), + SYM(GetHistogramParameteriv), + SYM(Minmax), SYM(ResetMinmax), + SYM(GetMinmax), + SYM(GetMinmaxParameterfv), + SYM(GetMinmaxParameteriv), + SYM(ConvolutionFilter1D), + SYM(ConvolutionFilter2D), + SYM(ConvolutionParameterf), + SYM(ConvolutionParameterfv), + SYM(ConvolutionParameteri), + SYM(ConvolutionParameteriv), + SYM(CopyConvolutionFilter1D), + SYM(CopyConvolutionFilter2D), + SYM(GetConvolutionFilter), + SYM(GetConvolutionParameterfv), + SYM(GetConvolutionParameteriv), + SYM(SeparableFilter2D), + SYM(GetSeparableFilter), SYM(ActiveTexture), SYM(ClientActiveTexture), SYM(CompressedTexImage1D), @@ -2459,4 +2539,3 @@ RGLSYMGLIMAGETRANSFORMPARAMETERIVHPPROC __rglgen_glImageTransformParameterivHP; RGLSYMGLIMAGETRANSFORMPARAMETERFVHPPROC __rglgen_glImageTransformParameterfvHP; RGLSYMGLGETIMAGETRANSFORMPARAMETERIVHPPROC __rglgen_glGetImageTransformParameterivHP; RGLSYMGLGETIMAGETRANSFORMPARAMETERFVHPPROC __rglgen_glGetImageTransformParameterfvHP; - diff --git a/libretro-common/glsym/rglgen.c b/libretro-common/glsym/rglgen.c index 6306eaef47..c87d85bfd7 100644 --- a/libretro-common/glsym/rglgen.c +++ b/libretro-common/glsym/rglgen.c @@ -40,4 +40,3 @@ void rglgen_resolve_symbols(rglgen_proc_address_t proc) { rglgen_resolve_symbols_custom(proc, rglgen_symbol_map); } - diff --git a/libretro-common/glsym/rglgen.py b/libretro-common/glsym/rglgen.py index 8d35e0bdf7..a970e7f59f 100755 --- a/libretro-common/glsym/rglgen.py +++ b/libretro-common/glsym/rglgen.py @@ -147,5 +147,3 @@ if __name__ == '__main__': f.write(' { NULL, NULL },\n') f.write('};\n') dump(f, declarations) - - diff --git a/libretro-common/glsym/xglgen.py b/libretro-common/glsym/xglgen.py index 6539b4f6db..814785eb81 100644 --- a/libretro-common/glsym/xglgen.py +++ b/libretro-common/glsym/xglgen.py @@ -156,4 +156,3 @@ if __name__ == '__main__': f.write(' { NULL, NULL },\n') f.write('};\n') dump(f, declarations) - diff --git a/libretro-common/include/array/dynarray.h b/libretro-common/include/array/dynarray.h index f6b1bdf8f6..cdc4ff0d14 100644 --- a/libretro-common/include/array/dynarray.h +++ b/libretro-common/include/array/dynarray.h @@ -235,7 +235,6 @@ #define da_free(a) \ dg_dynarr_free(a) - /* add an element to the array (appended at the end) */ #define da_push(a, v) \ dg_dynarr_push(a, v) @@ -264,7 +263,6 @@ #define da_addn_uninit(a, n) \ dg_dynarr_addn_uninit(a, n) - /* insert a single value v at index idx */ #define da_insert(a, idx, v) \ dg_dynarr_insert(a, idx, v) @@ -343,7 +341,6 @@ #define da_shrink_to_fit(a) \ dg_dynarr_shrink_to_fit(a) - /* removes and returns the last element of the array */ #define da_pop(a) \ dg_dynarr_pop(a) @@ -385,7 +382,6 @@ #define da_end(a) \ dg_dynarr_end(a) - /* returns (logical) number of elements currently in the array */ #define da_count(a) \ dg_dynarr_count(a) @@ -441,7 +437,6 @@ #define dg_dynarr_free(a) \ dg__dynarr_free((void**)&(a).p, &(a).md) - /* add an element to the array (appended at the end) */ #define dg_dynarr_push(a, v) \ (dg__dynarr_maybegrowadd(dg__dynarr_unp(a), 1) ? (((a).p[(a).md.cnt++] = (v)),0) : 0) diff --git a/libretro-common/include/audio/dsp_filter.h b/libretro-common/include/audio/dsp_filter.h index 82af77135c..2bbe74af29 100644 --- a/libretro-common/include/audio/dsp_filter.h +++ b/libretro-common/include/audio/dsp_filter.h @@ -50,4 +50,3 @@ void retro_dsp_filter_process(retro_dsp_filter_t *dsp, RETRO_END_DECLS #endif - diff --git a/libretro-common/include/compat/getopt.h b/libretro-common/include/compat/getopt.h index 74287b64f5..2e606a68c7 100644 --- a/libretro-common/include/compat/getopt.h +++ b/libretro-common/include/compat/getopt.h @@ -72,4 +72,3 @@ RETRO_END_DECLS /* pragma once */ #endif - diff --git a/libretro-common/include/compat/msvc.h b/libretro-common/include/compat/msvc.h index 0a25cd9370..ad55bd8874 100644 --- a/libretro-common/include/compat/msvc.h +++ b/libretro-common/include/compat/msvc.h @@ -125,4 +125,3 @@ typedef int ssize_t; #endif #endif - diff --git a/libretro-common/include/compat/msvc/stdint.h b/libretro-common/include/compat/msvc/stdint.h index c791176c83..7c91a6851b 100644 --- a/libretro-common/include/compat/msvc/stdint.h +++ b/libretro-common/include/compat/msvc/stdint.h @@ -67,7 +67,6 @@ extern "C" { # endif #endif - /* 7.18.1 Integer types. */ /* 7.18.1.1 Exact-width integer types. */ @@ -94,7 +93,6 @@ extern "C" { typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; - /* 7.18.1.2 Minimum-width integer types. */ typedef int8_t int_least8_t; typedef int16_t int_least16_t; @@ -255,4 +253,3 @@ typedef uint64_t uintmax_t; #endif #endif - diff --git a/libretro-common/include/compat/posix_string.h b/libretro-common/include/compat/posix_string.h index 46c14413c5..f4380c3a65 100644 --- a/libretro-common/include/compat/posix_string.h +++ b/libretro-common/include/compat/posix_string.h @@ -59,7 +59,6 @@ int isblank(int c); #endif - RETRO_END_DECLS #endif diff --git a/libretro-common/include/compat/strcasestr.h b/libretro-common/include/compat/strcasestr.h index 02f28d0192..c26de9e008 100644 --- a/libretro-common/include/compat/strcasestr.h +++ b/libretro-common/include/compat/strcasestr.h @@ -50,4 +50,3 @@ RETRO_END_DECLS #endif #endif - diff --git a/libretro-common/include/compat/strl.h b/libretro-common/include/compat/strl.h index 290498d9a6..c70f119557 100644 --- a/libretro-common/include/compat/strl.h +++ b/libretro-common/include/compat/strl.h @@ -57,4 +57,3 @@ char *strldup(const char *s, size_t n); RETRO_END_DECLS #endif - diff --git a/libretro-common/include/compat/zlib.h b/libretro-common/include/compat/zlib.h index 60fa3be50d..94110afd3d 100644 --- a/libretro-common/include/compat/zlib.h +++ b/libretro-common/include/compat/zlib.h @@ -31,7 +31,6 @@ Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu - The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). @@ -220,7 +219,6 @@ typedef gz_header FAR *gz_headerp; #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ - /* basic functions */ const char * zlibVersion (void); @@ -252,7 +250,6 @@ typedef gz_header FAR *gz_headerp; this will be done by deflate(). */ - int deflate (z_streamp strm, int flush); /* deflate compresses as much data as possible, and stops when the input @@ -359,7 +356,6 @@ typedef gz_header FAR *gz_headerp; space to continue compressing. */ - int deflateEnd (z_streamp strm); /* All dynamically allocated data structures for this stream are freed. @@ -373,7 +369,6 @@ typedef gz_header FAR *gz_headerp; deallocated). */ - /* int inflateInit (z_streamp strm); @@ -398,7 +393,6 @@ typedef gz_header FAR *gz_headerp; until inflate() is called. */ - int inflate (z_streamp strm, int flush); /* inflate decompresses as much data as possible, and stops when the input @@ -514,7 +508,6 @@ typedef gz_header FAR *gz_headerp; recovery of the data is desired. */ - int inflateEnd (z_streamp strm); /* All dynamically allocated data structures for this stream are freed. @@ -526,7 +519,6 @@ typedef gz_header FAR *gz_headerp; static string (which must not be deallocated). */ - /* Advanced functions */ /* @@ -1634,7 +1626,6 @@ uint32_t adler32 (uint32_t adler, const uint8_t *buf, size_t len); len2. */ - /* various hacks, don't look :) */ /* deflateInit and inflateInit are macros to allow checking the zlib version diff --git a/libretro-common/include/file/archive_file.h b/libretro-common/include/file/archive_file.h index 3861f6ac89..9c46da0286 100644 --- a/libretro-common/include/file/archive_file.h +++ b/libretro-common/include/file/archive_file.h @@ -64,6 +64,7 @@ typedef struct file_archive_transfer { enum file_archive_transfer_type type; int32_t archive_size; + ptrdiff_t start_delta; file_archive_file_data_t *handle; void *stream; const uint8_t *footer; @@ -213,4 +214,3 @@ extern const struct file_archive_file_backend sevenzip_backend; RETRO_END_DECLS #endif - diff --git a/libretro-common/include/file/config_file.h b/libretro-common/include/file/config_file.h index d2d5b026f7..bf8102f542 100644 --- a/libretro-common/include/file/config_file.h +++ b/libretro-common/include/file/config_file.h @@ -20,7 +20,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #ifndef __LIBRETRO_SDK_CONFIG_FILE_H #define __LIBRETRO_SDK_CONFIG_FILE_H @@ -64,7 +63,6 @@ struct config_file struct config_include_list *includes; }; - typedef struct config_file config_file_t; struct config_file_cb @@ -181,15 +179,19 @@ void config_set_bool(config_file_t *conf, const char *entry, bool val); void config_set_uint(config_file_t *conf, const char *key, unsigned int val); /* Write the current config to a file. */ -bool config_file_write(config_file_t *conf, const char *path); +bool config_file_write(config_file_t *conf, const char *path, bool val); /* Dump the current config to an already opened file. * Does not close the file. */ -void config_file_dump(config_file_t *conf, FILE *file); +void config_file_dump(config_file_t *conf, FILE *file, bool val); + +#ifdef ORBIS +void config_file_dump_orbis(config_file_t *conf, int fd); +#endif + bool config_file_exists(const char *path); RETRO_END_DECLS #endif - diff --git a/libretro-common/include/file/file_path.h b/libretro-common/include/file/file_path.h index b6b533a6b9..e894bebdc3 100644 --- a/libretro-common/include/file/file_path.h +++ b/libretro-common/include/file/file_path.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2018 The RetroArch team +/* Copyright (C) 2010-2019 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_path.h). @@ -28,12 +28,17 @@ #include #include +#include #include #include RETRO_BEGIN_DECLS +#define PATH_REQUIRED_VFS_VERSION 3 + +void path_vfs_init(const struct retro_vfs_interface_info* vfs_info); + /* Order in this enum is equivalent to negative sort order in filelist * (i.e. DIRECTORY is on top of PLAIN_FILE) */ enum @@ -46,7 +51,6 @@ enum RARCH_FILE_UNSUPPORTED }; - /** * path_is_compressed_file: * @path : path @@ -137,6 +141,7 @@ void path_basedir(char *path); * * Extracts parent directory by mutating path. * Assumes that path is a directory. Keeps trailing '/'. + * If the path was already at the root directory, returns empty string **/ void path_parent_dir(char *path); @@ -315,6 +320,7 @@ bool fill_pathname_parent_dir_name(char *out_dir, * * Copies parent directory of @in_dir into @out_dir. * Assumes @in_dir is a directory. Keeps trailing '/'. + * If the path was already at the root directory, @out_dir will be an empty string. **/ void fill_pathname_parent_dir(char *out_dir, const char *in_dir, size_t size); diff --git a/libretro-common/include/formats/jsonsax.h b/libretro-common/include/formats/jsonsax.h index c98331fb39..837d5b28bf 100644 --- a/libretro-common/include/formats/jsonsax.h +++ b/libretro-common/include/formats/jsonsax.h @@ -29,7 +29,6 @@ RETRO_BEGIN_DECLS - enum { JSONSAX_OK = 0, diff --git a/libretro-common/include/formats/rjpeg.h b/libretro-common/include/formats/rjpeg.h index ed4ee3eea1..6a60391004 100644 --- a/libretro-common/include/formats/rjpeg.h +++ b/libretro-common/include/formats/rjpeg.h @@ -46,4 +46,3 @@ rjpeg_t *rjpeg_alloc(void); RETRO_END_DECLS #endif - diff --git a/libretro-common/include/formats/rpng.h b/libretro-common/include/formats/rpng.h index aeae7af49a..f13c0ac039 100644 --- a/libretro-common/include/formats/rpng.h +++ b/libretro-common/include/formats/rpng.h @@ -59,4 +59,3 @@ bool rpng_save_image_bgr24(const char *path, const uint8_t *data, RETRO_END_DECLS #endif - diff --git a/libretro-common/include/formats/rxml.h b/libretro-common/include/formats/rxml.h index 78d01a2972..21adc347e0 100644 --- a/libretro-common/include/formats/rxml.h +++ b/libretro-common/include/formats/rxml.h @@ -92,4 +92,3 @@ typedef rxml_document_t *xmlDocPtr; RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/math/matrix_3x3.h b/libretro-common/include/gfx/math/matrix_3x3.h index 791f1dae06..8dbf66c090 100644 --- a/libretro-common/include/gfx/math/matrix_3x3.h +++ b/libretro-common/include/gfx/math/matrix_3x3.h @@ -197,7 +197,6 @@ static INLINE bool matrix_3x3_square_to_quad( e = dy3 - dy0 + h * dy3; } - matrix_3x3_init(*mat, a, d, g, b, e, h, diff --git a/libretro-common/include/gfx/math/matrix_4x4.h b/libretro-common/include/gfx/math/matrix_4x4.h index dacb37c31c..6d7f130413 100644 --- a/libretro-common/include/gfx/math/matrix_4x4.h +++ b/libretro-common/include/gfx/math/matrix_4x4.h @@ -393,4 +393,3 @@ typedef struct math_matrix_4x4 RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/math/vector_2.h b/libretro-common/include/gfx/math/vector_2.h index a38153ea2c..3e2c9324ab 100644 --- a/libretro-common/include/gfx/math/vector_2.h +++ b/libretro-common/include/gfx/math/vector_2.h @@ -136,4 +136,3 @@ static INLINE unsigned int vec2_packHalf2x16(float vec0, float vec1) RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/math/vector_3.h b/libretro-common/include/gfx/math/vector_3.h index 40c9f7f49c..4ab48e3f6f 100644 --- a/libretro-common/include/gfx/math/vector_3.h +++ b/libretro-common/include/gfx/math/vector_3.h @@ -66,4 +66,3 @@ typedef float vec3_t[3]; RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/math/vector_4.h b/libretro-common/include/gfx/math/vector_4.h index e985649206..c2001437ff 100644 --- a/libretro-common/include/gfx/math/vector_4.h +++ b/libretro-common/include/gfx/math/vector_4.h @@ -59,4 +59,3 @@ typedef float vec4_t[4]; RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/scaler/filter.h b/libretro-common/include/gfx/scaler/filter.h index 27f677a6c3..29ff56bcf8 100644 --- a/libretro-common/include/gfx/scaler/filter.h +++ b/libretro-common/include/gfx/scaler/filter.h @@ -35,4 +35,3 @@ bool scaler_gen_filter(struct scaler_ctx *ctx); RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/scaler/pixconv.h b/libretro-common/include/gfx/scaler/pixconv.h index b83e0e7f03..d1f9f1a6a6 100644 --- a/libretro-common/include/gfx/scaler/pixconv.h +++ b/libretro-common/include/gfx/scaler/pixconv.h @@ -29,7 +29,6 @@ RETRO_BEGIN_DECLS - void conv_0rgb1555_argb8888(void *output, const void *input, int width, int height, int out_stride, int in_stride); @@ -101,4 +100,3 @@ void conv_copy(void *output, const void *input, RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/scaler/scaler.h b/libretro-common/include/gfx/scaler/scaler.h index 97854d45b3..b13b89a1bd 100644 --- a/libretro-common/include/gfx/scaler/scaler.h +++ b/libretro-common/include/gfx/scaler/scaler.h @@ -126,4 +126,3 @@ void scaler_ctx_scale(struct scaler_ctx *ctx, RETRO_END_DECLS #endif - diff --git a/libretro-common/include/gfx/scaler/scaler_int.h b/libretro-common/include/gfx/scaler/scaler_int.h index 2cb203a3ba..6ce68475ef 100644 --- a/libretro-common/include/gfx/scaler/scaler_int.h +++ b/libretro-common/include/gfx/scaler/scaler_int.h @@ -44,4 +44,3 @@ void scaler_argb8888_point_special(const struct scaler_ctx *ctx, RETRO_END_DECLS #endif - diff --git a/libretro-common/include/glsym/glsym.h b/libretro-common/include/glsym/glsym.h index 36c9b49f7b..a64fe573fb 100644 --- a/libretro-common/include/glsym/glsym.h +++ b/libretro-common/include/glsym/glsym.h @@ -39,4 +39,3 @@ #endif #endif - diff --git a/libretro-common/include/glsym/rglgen.h b/libretro-common/include/glsym/rglgen.h index b8a1a0c877..c9918df778 100644 --- a/libretro-common/include/glsym/rglgen.h +++ b/libretro-common/include/glsym/rglgen.h @@ -44,4 +44,3 @@ void rglgen_resolve_symbols_custom(rglgen_proc_address_t proc, RETRO_END_DECLS #endif - diff --git a/libretro-common/include/glsym/switch/nx_glsym.h b/libretro-common/include/glsym/switch/nx_glsym.h index 0b3d0c25c4..ce112234c8 100644 --- a/libretro-common/include/glsym/switch/nx_glsym.h +++ b/libretro-common/include/glsym/switch/nx_glsym.h @@ -5,38 +5,7 @@ extern "C" { #endif -// xglgen missing typedef's / defines typedef void *GLeglImageOES; -typedef void (APIENTRYP RGLSYMGLTEXIMAGE2DPROC) ( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ); -typedef void (APIENTRYP RGLSYMGLVIEWPORTPROC)( GLint x, GLint y, - GLsizei width, GLsizei height ); -typedef void (APIENTRYP RGLSYMGLTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); -typedef void (APIENTRYP RGLSYMGLREADPIXELSPROC)( GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - GLvoid *pixels ); -typedef void (APIENTRYP RGLSYMGLTEXPARAMETERIVPROC)( GLenum target, GLenum pname, - const GLint *params ); -typedef void (APIENTRYP RGLSYMGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); -typedef void (APIENTRYP RGLSYMGLDRAWELEMENTS)( GLenum mode, GLsizei count, - GLenum type, const GLvoid *indices ); - -RGLSYMGLREADPIXELSPROC glReadPixels; -RGLSYMGLTEXIMAGE2DPROC glTexImage2D; -RGLSYMGLVIEWPORTPROC glViewport; -RGLSYMGLTEXSUBIMAGE2DPROC glTexSubImage2D; -RGLSYMGLTEXPARAMETERIVPROC glTexParameteriv; -RGLSYMGLDRAWELEMENTS glDrawElements; - -// xglgen generated typedef void (APIENTRYP RGLSYMGLCLEARINDEXPROC) ( GLfloat c ); typedef void (APIENTRYP RGLSYMGLCLEARCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); typedef void (APIENTRYP RGLSYMGLCLEARPROC) ( GLbitfield mask ); @@ -87,6 +56,9 @@ typedef void (APIENTRYP RGLSYMGLDEPTHRANGEPROC) ( GLclampd near_val, GLclampd fa typedef void (APIENTRYP RGLSYMGLCLEARACCUMPROC) ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); typedef void (APIENTRYP RGLSYMGLACCUMPROC) ( GLenum op, GLfloat value ); typedef void (APIENTRYP RGLSYMGLMATRIXMODEPROC) ( GLenum mode ); +typedef void (APIENTRYP RGLSYMGLORTHOPROC) ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ); +typedef void (APIENTRYP RGLSYMGLFRUSTUMPROC) ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ); +typedef void (APIENTRYP RGLSYMGLVIEWPORTPROC) ( GLint x, GLint y, GLsizei width, GLsizei height ); typedef void (APIENTRYP RGLSYMGLPUSHMATRIXPROC) ( void ); typedef void (APIENTRYP RGLSYMGLPOPMATRIXPROC) ( void ); typedef void (APIENTRYP RGLSYMGLLOADIDENTITYPROC) ( void ); @@ -94,6 +66,8 @@ typedef void (APIENTRYP RGLSYMGLLOADMATRIXDPROC) ( const GLdouble *m ); typedef void (APIENTRYP RGLSYMGLLOADMATRIXFPROC) ( const GLfloat *m ); typedef void (APIENTRYP RGLSYMGLMULTMATRIXDPROC) ( const GLdouble *m ); typedef void (APIENTRYP RGLSYMGLMULTMATRIXFPROC) ( const GLfloat *m ); +typedef void (APIENTRYP RGLSYMGLROTATEDPROC) ( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ); +typedef void (APIENTRYP RGLSYMGLROTATEFPROC) ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ); typedef void (APIENTRYP RGLSYMGLSCALEDPROC) ( GLdouble x, GLdouble y, GLdouble z ); typedef void (APIENTRYP RGLSYMGLSCALEFPROC) ( GLfloat x, GLfloat y, GLfloat z ); typedef void (APIENTRYP RGLSYMGLTRANSLATEDPROC) ( GLdouble x, GLdouble y, GLdouble z ); @@ -104,6 +78,7 @@ typedef GLuint (APIENTRYP RGLSYMGLGENLISTSPROC) ( GLsizei range ); typedef void (APIENTRYP RGLSYMGLNEWLISTPROC) ( GLuint list, GLenum mode ); typedef void (APIENTRYP RGLSYMGLENDLISTPROC) ( void ); typedef void (APIENTRYP RGLSYMGLCALLLISTPROC) ( GLuint list ); +typedef void (APIENTRYP RGLSYMGLCALLLISTSPROC) ( GLsizei n, GLenum type, const GLvoid *lists ); typedef void (APIENTRYP RGLSYMGLLISTBASEPROC) ( GLuint base ); typedef void (APIENTRYP RGLSYMGLBEGINPROC) ( GLenum mode ); typedef void (APIENTRYP RGLSYMGLENDPROC) ( void ); @@ -159,6 +134,14 @@ typedef void (APIENTRYP RGLSYMGLCOLOR3SPROC) ( GLshort red, GLshort green, GLsho typedef void (APIENTRYP RGLSYMGLCOLOR3UBPROC) ( GLubyte red, GLubyte green, GLubyte blue ); typedef void (APIENTRYP RGLSYMGLCOLOR3UIPROC) ( GLuint red, GLuint green, GLuint blue ); typedef void (APIENTRYP RGLSYMGLCOLOR3USPROC) ( GLushort red, GLushort green, GLushort blue ); +typedef void (APIENTRYP RGLSYMGLCOLOR4BPROC) ( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha ); +typedef void (APIENTRYP RGLSYMGLCOLOR4DPROC) ( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ); +typedef void (APIENTRYP RGLSYMGLCOLOR4FPROC) ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +typedef void (APIENTRYP RGLSYMGLCOLOR4IPROC) ( GLint red, GLint green, GLint blue, GLint alpha ); +typedef void (APIENTRYP RGLSYMGLCOLOR4SPROC) ( GLshort red, GLshort green, GLshort blue, GLshort alpha ); +typedef void (APIENTRYP RGLSYMGLCOLOR4UBPROC) ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ); +typedef void (APIENTRYP RGLSYMGLCOLOR4UIPROC) ( GLuint red, GLuint green, GLuint blue, GLuint alpha ); +typedef void (APIENTRYP RGLSYMGLCOLOR4USPROC) ( GLushort red, GLushort green, GLushort blue, GLushort alpha ); typedef void (APIENTRYP RGLSYMGLCOLOR3BVPROC) ( const GLbyte *v ); typedef void (APIENTRYP RGLSYMGLCOLOR3DVPROC) ( const GLdouble *v ); typedef void (APIENTRYP RGLSYMGLCOLOR3FVPROC) ( const GLfloat *v ); @@ -239,13 +222,24 @@ typedef void (APIENTRYP RGLSYMGLRECTDVPROC) ( const GLdouble *v1, const GLdouble typedef void (APIENTRYP RGLSYMGLRECTFVPROC) ( const GLfloat *v1, const GLfloat *v2 ); typedef void (APIENTRYP RGLSYMGLRECTIVPROC) ( const GLint *v1, const GLint *v2 ); typedef void (APIENTRYP RGLSYMGLRECTSVPROC) ( const GLshort *v1, const GLshort *v2 ); +typedef void (APIENTRYP RGLSYMGLVERTEXPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ); +typedef void (APIENTRYP RGLSYMGLNORMALPOINTERPROC) ( GLenum type, GLsizei stride, const GLvoid *ptr ); +typedef void (APIENTRYP RGLSYMGLCOLORPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ); +typedef void (APIENTRYP RGLSYMGLINDEXPOINTERPROC) ( GLenum type, GLsizei stride, const GLvoid *ptr ); +typedef void (APIENTRYP RGLSYMGLTEXCOORDPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ); typedef void (APIENTRYP RGLSYMGLEDGEFLAGPOINTERPROC) ( GLsizei stride, const GLvoid *ptr ); typedef void (APIENTRYP RGLSYMGLGETPOINTERVPROC) ( GLenum pname, GLvoid **params ); typedef void (APIENTRYP RGLSYMGLARRAYELEMENTPROC) ( GLint i ); typedef void (APIENTRYP RGLSYMGLDRAWARRAYSPROC) ( GLenum mode, GLint first, GLsizei count ); +typedef void (APIENTRYP RGLSYMGLDRAWELEMENTSPROC) ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ); +typedef void (APIENTRYP RGLSYMGLINTERLEAVEDARRAYSPROC) ( GLenum format, GLsizei stride, const GLvoid *pointer ); typedef void (APIENTRYP RGLSYMGLSHADEMODELPROC) ( GLenum mode ); typedef void (APIENTRYP RGLSYMGLLIGHTFPROC) ( GLenum light, GLenum pname, GLfloat param ); typedef void (APIENTRYP RGLSYMGLLIGHTIPROC) ( GLenum light, GLenum pname, GLint param ); +typedef void (APIENTRYP RGLSYMGLLIGHTFVPROC) ( GLenum light, GLenum pname, const GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLLIGHTIVPROC) ( GLenum light, GLenum pname, const GLint *params ); +typedef void (APIENTRYP RGLSYMGLGETLIGHTFVPROC) ( GLenum light, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLGETLIGHTIVPROC) ( GLenum light, GLenum pname, GLint *params ); typedef void (APIENTRYP RGLSYMGLLIGHTMODELFPROC) ( GLenum pname, GLfloat param ); typedef void (APIENTRYP RGLSYMGLLIGHTMODELIPROC) ( GLenum pname, GLint param ); typedef void (APIENTRYP RGLSYMGLLIGHTMODELFVPROC) ( GLenum pname, const GLfloat *params ); @@ -262,9 +256,16 @@ typedef void (APIENTRYP RGLSYMGLPIXELSTOREFPROC) ( GLenum pname, GLfloat param ) typedef void (APIENTRYP RGLSYMGLPIXELSTOREIPROC) ( GLenum pname, GLint param ); typedef void (APIENTRYP RGLSYMGLPIXELTRANSFERFPROC) ( GLenum pname, GLfloat param ); typedef void (APIENTRYP RGLSYMGLPIXELTRANSFERIPROC) ( GLenum pname, GLint param ); +typedef void (APIENTRYP RGLSYMGLPIXELMAPFVPROC) ( GLenum map, GLsizei mapsize, const GLfloat *values ); +typedef void (APIENTRYP RGLSYMGLPIXELMAPUIVPROC) ( GLenum map, GLsizei mapsize, const GLuint *values ); +typedef void (APIENTRYP RGLSYMGLPIXELMAPUSVPROC) ( GLenum map, GLsizei mapsize, const GLushort *values ); typedef void (APIENTRYP RGLSYMGLGETPIXELMAPFVPROC) ( GLenum map, GLfloat *values ); typedef void (APIENTRYP RGLSYMGLGETPIXELMAPUIVPROC) ( GLenum map, GLuint *values ); typedef void (APIENTRYP RGLSYMGLGETPIXELMAPUSVPROC) ( GLenum map, GLushort *values ); +typedef void (APIENTRYP RGLSYMGLBITMAPPROC) ( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap ); +typedef void (APIENTRYP RGLSYMGLREADPIXELSPROC) ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ); +typedef void (APIENTRYP RGLSYMGLDRAWPIXELSPROC) ( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ); +typedef void (APIENTRYP RGLSYMGLCOPYPIXELSPROC) ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ); typedef void (APIENTRYP RGLSYMGLSTENCILFUNCPROC) ( GLenum func, GLint ref, GLuint mask ); typedef void (APIENTRYP RGLSYMGLSTENCILMASKPROC) ( GLuint mask ); typedef void (APIENTRYP RGLSYMGLSTENCILOPPROC) ( GLenum fail, GLenum zfail, GLenum zpass ); @@ -286,10 +287,31 @@ typedef void (APIENTRYP RGLSYMGLGETTEXENVFVPROC) ( GLenum target, GLenum pname, typedef void (APIENTRYP RGLSYMGLGETTEXENVIVPROC) ( GLenum target, GLenum pname, GLint *params ); typedef void (APIENTRYP RGLSYMGLTEXPARAMETERFPROC) ( GLenum target, GLenum pname, GLfloat param ); typedef void (APIENTRYP RGLSYMGLTEXPARAMETERIPROC) ( GLenum target, GLenum pname, GLint param ); +typedef void (APIENTRYP RGLSYMGLTEXPARAMETERFVPROC) ( GLenum target, GLenum pname, const GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLTEXPARAMETERIVPROC) ( GLenum target, GLenum pname, const GLint *params ); +typedef void (APIENTRYP RGLSYMGLGETTEXPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP RGLSYMGLGETTEXPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params ); +typedef void (APIENTRYP RGLSYMGLGETTEXLEVELPARAMETERFVPROC) ( GLenum target, GLint level, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLGETTEXLEVELPARAMETERIVPROC) ( GLenum target, GLint level, GLenum pname, GLint *params ); +typedef void (APIENTRYP RGLSYMGLTEXIMAGE1DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); +typedef void (APIENTRYP RGLSYMGLTEXIMAGE2DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); +typedef void (APIENTRYP RGLSYMGLGETTEXIMAGEPROC) ( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels ); typedef void (APIENTRYP RGLSYMGLGENTEXTURESPROC) ( GLsizei n, GLuint *textures ); typedef void (APIENTRYP RGLSYMGLDELETETEXTURESPROC) ( GLsizei n, const GLuint *textures); typedef void (APIENTRYP RGLSYMGLBINDTEXTUREPROC) ( GLenum target, GLuint texture ); +typedef void (APIENTRYP RGLSYMGLPRIORITIZETEXTURESPROC) ( GLsizei n, const GLuint *textures, const GLclampf *priorities ); +typedef GLboolean (APIENTRYP RGLSYMGLARETEXTURESRESIDENTPROC) ( GLsizei n, const GLuint *textures, GLboolean *residences ); typedef GLboolean (APIENTRYP RGLSYMGLISTEXTUREPROC) ( GLuint texture ); +typedef void (APIENTRYP RGLSYMGLTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels ); +typedef void (APIENTRYP RGLSYMGLTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ); +typedef void (APIENTRYP RGLSYMGLCOPYTEXIMAGE1DPROC) ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border ); +typedef void (APIENTRYP RGLSYMGLCOPYTEXIMAGE2DPROC) ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ); +typedef void (APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ); +typedef void (APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ); +typedef void (APIENTRYP RGLSYMGLMAP1DPROC) ( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points ); +typedef void (APIENTRYP RGLSYMGLMAP1FPROC) ( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points ); +typedef void (APIENTRYP RGLSYMGLMAP2DPROC) ( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points ); +typedef void (APIENTRYP RGLSYMGLMAP2FPROC) ( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points ); typedef void (APIENTRYP RGLSYMGLGETMAPDVPROC) ( GLenum target, GLenum query, GLdouble *v ); typedef void (APIENTRYP RGLSYMGLGETMAPFVPROC) ( GLenum target, GLenum query, GLfloat *v ); typedef void (APIENTRYP RGLSYMGLGETMAPIVPROC) ( GLenum target, GLenum query, GLint *v ); @@ -303,6 +325,8 @@ typedef void (APIENTRYP RGLSYMGLEVALCOORD2DVPROC) ( const GLdouble *u ); typedef void (APIENTRYP RGLSYMGLEVALCOORD2FVPROC) ( const GLfloat *u ); typedef void (APIENTRYP RGLSYMGLMAPGRID1DPROC) ( GLint un, GLdouble u1, GLdouble u2 ); typedef void (APIENTRYP RGLSYMGLMAPGRID1FPROC) ( GLint un, GLfloat u1, GLfloat u2 ); +typedef void (APIENTRYP RGLSYMGLMAPGRID2DPROC) ( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ); +typedef void (APIENTRYP RGLSYMGLMAPGRID2FPROC) ( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ); typedef void (APIENTRYP RGLSYMGLEVALPOINT1PROC) ( GLint i ); typedef void (APIENTRYP RGLSYMGLEVALPOINT2PROC) ( GLint i, GLint j ); typedef void (APIENTRYP RGLSYMGLEVALMESH1PROC) ( GLenum mode, GLint i1, GLint i2 ); @@ -318,9 +342,44 @@ typedef void (APIENTRYP RGLSYMGLINITNAMESPROC) ( void ); typedef void (APIENTRYP RGLSYMGLLOADNAMEPROC) ( GLuint name ); typedef void (APIENTRYP RGLSYMGLPUSHNAMEPROC) ( GLuint name ); typedef void (APIENTRYP RGLSYMGLPOPNAMEPROC) ( void ); +typedef void (APIENTRYP RGLSYMGLDRAWRANGEELEMENTSPROC) ( GLenum mode, GLuint start,GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); +typedef void (APIENTRYP RGLSYMGLTEXIMAGE3DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); +typedef void (APIENTRYP RGLSYMGLTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); +typedef void (APIENTRYP RGLSYMGLCOLORTABLEPROC) ( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table ); +typedef void (APIENTRYP RGLSYMGLCOLORSUBTABLEPROC) ( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data ); +typedef void (APIENTRYP RGLSYMGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP RGLSYMGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP RGLSYMGLCOPYCOLORSUBTABLEPROC) ( GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ); +typedef void (APIENTRYP RGLSYMGLCOPYCOLORTABLEPROC) ( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ); +typedef void (APIENTRYP RGLSYMGLGETCOLORTABLEPROC) ( GLenum target, GLenum format, GLenum type, GLvoid *table ); +typedef void (APIENTRYP RGLSYMGLGETCOLORTABLEPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLGETCOLORTABLEPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params ); typedef void (APIENTRYP RGLSYMGLBLENDEQUATIONPROC) ( GLenum mode ); +typedef void (APIENTRYP RGLSYMGLBLENDCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); +typedef void (APIENTRYP RGLSYMGLHISTOGRAMPROC) ( GLenum target, GLsizei width, GLenum internalformat, GLboolean sink ); typedef void (APIENTRYP RGLSYMGLRESETHISTOGRAMPROC) ( GLenum target ); +typedef void (APIENTRYP RGLSYMGLGETHISTOGRAMPROC) ( GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values ); +typedef void (APIENTRYP RGLSYMGLGETHISTOGRAMPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLGETHISTOGRAMPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params ); +typedef void (APIENTRYP RGLSYMGLMINMAXPROC) ( GLenum target, GLenum internalformat,GLboolean sink ); typedef void (APIENTRYP RGLSYMGLRESETMINMAXPROC) ( GLenum target ); +typedef void (APIENTRYP RGLSYMGLGETMINMAXPROC) ( GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values ); +typedef void (APIENTRYP RGLSYMGLGETMINMAXPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLGETMINMAXPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params ); +typedef void (APIENTRYP RGLSYMGLCONVOLUTIONFILTER1DPROC) ( GLenum target,GLenum internalformat, GLsizei width, GLenum format, GLenum type,const GLvoid *image ); +typedef void (APIENTRYP RGLSYMGLCONVOLUTIONFILTER2DPROC) ( GLenum target,GLenum internalformat, GLsizei width, GLsizei height, GLenum format,GLenum type, const GLvoid *image ); +typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERFPROC) ( GLenum target, GLenum pname,GLfloat params ); +typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname,const GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERIPROC) ( GLenum target, GLenum pname,GLint params ); +typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname,const GLint *params ); +typedef void (APIENTRYP RGLSYMGLCOPYCONVOLUTIONFILTER1DPROC) ( GLenum target,GLenum internalformat, GLint x, GLint y, GLsizei width ); +typedef void (APIENTRYP RGLSYMGLCOPYCONVOLUTIONFILTER2DPROC) ( GLenum target,GLenum internalformat, GLint x, GLint y, GLsizei width,GLsizei height); +typedef void (APIENTRYP RGLSYMGLGETCONVOLUTIONFILTERPROC) ( GLenum target, GLenum format,GLenum type, GLvoid *image ); +typedef void (APIENTRYP RGLSYMGLGETCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname,GLfloat *params ); +typedef void (APIENTRYP RGLSYMGLGETCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname,GLint *params ); +typedef void (APIENTRYP RGLSYMGLSEPARABLEFILTER2DPROC) ( GLenum target,GLenum internalformat, GLsizei width, GLsizei height, GLenum format,GLenum type, const GLvoid *row, const GLvoid *column ); +typedef void (APIENTRYP RGLSYMGLGETSEPARABLEFILTERPROC) ( GLenum target, GLenum format,GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); typedef void (APIENTRYP RGLSYMGLACTIVETEXTUREPROC) ( GLenum texture ); typedef void (APIENTRYP RGLSYMGLCLIENTACTIVETEXTUREPROC) ( GLenum texture ); typedef void (APIENTRYP RGLSYMGLCOMPRESSEDTEXIMAGE1DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); @@ -403,8 +462,8 @@ typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); typedef void (APIENTRYP RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +typedef void (APIENTRYP RGLSYMGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); -// xglgen generated RGLSYMGLCLEARINDEXPROC glClearIndex; RGLSYMGLCLEARCOLORPROC glClearColor; RGLSYMGLCLEARPROC glClear; @@ -455,6 +514,9 @@ RGLSYMGLDEPTHRANGEPROC glDepthRange; RGLSYMGLCLEARACCUMPROC glClearAccum; RGLSYMGLACCUMPROC glAccum; RGLSYMGLMATRIXMODEPROC glMatrixMode; +RGLSYMGLORTHOPROC glOrtho; +RGLSYMGLFRUSTUMPROC glFrustum; +RGLSYMGLVIEWPORTPROC glViewport; RGLSYMGLPUSHMATRIXPROC glPushMatrix; RGLSYMGLPOPMATRIXPROC glPopMatrix; RGLSYMGLLOADIDENTITYPROC glLoadIdentity; @@ -462,6 +524,8 @@ RGLSYMGLLOADMATRIXDPROC glLoadMatrixd; RGLSYMGLLOADMATRIXFPROC glLoadMatrixf; RGLSYMGLMULTMATRIXDPROC glMultMatrixd; RGLSYMGLMULTMATRIXFPROC glMultMatrixf; +RGLSYMGLROTATEDPROC glRotated; +RGLSYMGLROTATEFPROC glRotatef; RGLSYMGLSCALEDPROC glScaled; RGLSYMGLSCALEFPROC glScalef; RGLSYMGLTRANSLATEDPROC glTranslated; @@ -472,6 +536,7 @@ RGLSYMGLGENLISTSPROC glGenLists; RGLSYMGLNEWLISTPROC glNewList; RGLSYMGLENDLISTPROC glEndList; RGLSYMGLCALLLISTPROC glCallList; +RGLSYMGLCALLLISTSPROC glCallLists; RGLSYMGLLISTBASEPROC glListBase; RGLSYMGLBEGINPROC glBegin; RGLSYMGLENDPROC glEnd; @@ -527,6 +592,14 @@ RGLSYMGLCOLOR3SPROC glColor3s; RGLSYMGLCOLOR3UBPROC glColor3ub; RGLSYMGLCOLOR3UIPROC glColor3ui; RGLSYMGLCOLOR3USPROC glColor3us; +RGLSYMGLCOLOR4BPROC glColor4b; +RGLSYMGLCOLOR4DPROC glColor4d; +RGLSYMGLCOLOR4FPROC glColor4f; +RGLSYMGLCOLOR4IPROC glColor4i; +RGLSYMGLCOLOR4SPROC glColor4s; +RGLSYMGLCOLOR4UBPROC glColor4ub; +RGLSYMGLCOLOR4UIPROC glColor4ui; +RGLSYMGLCOLOR4USPROC glColor4us; RGLSYMGLCOLOR3BVPROC glColor3bv; RGLSYMGLCOLOR3DVPROC glColor3dv; RGLSYMGLCOLOR3FVPROC glColor3fv; @@ -607,13 +680,24 @@ RGLSYMGLRECTDVPROC glRectdv; RGLSYMGLRECTFVPROC glRectfv; RGLSYMGLRECTIVPROC glRectiv; RGLSYMGLRECTSVPROC glRectsv; +RGLSYMGLVERTEXPOINTERPROC glVertexPointer; +RGLSYMGLNORMALPOINTERPROC glNormalPointer; +RGLSYMGLCOLORPOINTERPROC glColorPointer; +RGLSYMGLINDEXPOINTERPROC glIndexPointer; +RGLSYMGLTEXCOORDPOINTERPROC glTexCoordPointer; RGLSYMGLEDGEFLAGPOINTERPROC glEdgeFlagPointer; RGLSYMGLGETPOINTERVPROC glGetPointerv; RGLSYMGLARRAYELEMENTPROC glArrayElement; RGLSYMGLDRAWARRAYSPROC glDrawArrays; +RGLSYMGLDRAWELEMENTSPROC glDrawElements; +RGLSYMGLINTERLEAVEDARRAYSPROC glInterleavedArrays; RGLSYMGLSHADEMODELPROC glShadeModel; RGLSYMGLLIGHTFPROC glLightf; RGLSYMGLLIGHTIPROC glLighti; +RGLSYMGLLIGHTFVPROC glLightfv; +RGLSYMGLLIGHTIVPROC glLightiv; +RGLSYMGLGETLIGHTFVPROC glGetLightfv; +RGLSYMGLGETLIGHTIVPROC glGetLightiv; RGLSYMGLLIGHTMODELFPROC glLightModelf; RGLSYMGLLIGHTMODELIPROC glLightModeli; RGLSYMGLLIGHTMODELFVPROC glLightModelfv; @@ -630,9 +714,16 @@ RGLSYMGLPIXELSTOREFPROC glPixelStoref; RGLSYMGLPIXELSTOREIPROC glPixelStorei; RGLSYMGLPIXELTRANSFERFPROC glPixelTransferf; RGLSYMGLPIXELTRANSFERIPROC glPixelTransferi; +RGLSYMGLPIXELMAPFVPROC glPixelMapfv; +RGLSYMGLPIXELMAPUIVPROC glPixelMapuiv; +RGLSYMGLPIXELMAPUSVPROC glPixelMapusv; RGLSYMGLGETPIXELMAPFVPROC glGetPixelMapfv; RGLSYMGLGETPIXELMAPUIVPROC glGetPixelMapuiv; RGLSYMGLGETPIXELMAPUSVPROC glGetPixelMapusv; +RGLSYMGLBITMAPPROC glBitmap; +RGLSYMGLREADPIXELSPROC glReadPixels; +RGLSYMGLDRAWPIXELSPROC glDrawPixels; +RGLSYMGLCOPYPIXELSPROC glCopyPixels; RGLSYMGLSTENCILFUNCPROC glStencilFunc; RGLSYMGLSTENCILMASKPROC glStencilMask; RGLSYMGLSTENCILOPPROC glStencilOp; @@ -654,10 +745,31 @@ RGLSYMGLGETTEXENVFVPROC glGetTexEnvfv; RGLSYMGLGETTEXENVIVPROC glGetTexEnviv; RGLSYMGLTEXPARAMETERFPROC glTexParameterf; RGLSYMGLTEXPARAMETERIPROC glTexParameteri; +RGLSYMGLTEXPARAMETERFVPROC glTexParameterfv; +RGLSYMGLTEXPARAMETERIVPROC glTexParameteriv; +RGLSYMGLGETTEXPARAMETERFVPROC glGetTexParameterfv; +RGLSYMGLGETTEXPARAMETERIVPROC glGetTexParameteriv; +RGLSYMGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv; +RGLSYMGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv; +RGLSYMGLTEXIMAGE1DPROC glTexImage1D; +RGLSYMGLTEXIMAGE2DPROC glTexImage2D; +RGLSYMGLGETTEXIMAGEPROC glGetTexImage; RGLSYMGLGENTEXTURESPROC glGenTextures; RGLSYMGLDELETETEXTURESPROC glDeleteTextures; RGLSYMGLBINDTEXTUREPROC glBindTexture; +RGLSYMGLPRIORITIZETEXTURESPROC glPrioritizeTextures; +RGLSYMGLARETEXTURESRESIDENTPROC glAreTexturesResident; RGLSYMGLISTEXTUREPROC glIsTexture; +RGLSYMGLTEXSUBIMAGE1DPROC glTexSubImage1D; +RGLSYMGLTEXSUBIMAGE2DPROC glTexSubImage2D; +RGLSYMGLCOPYTEXIMAGE1DPROC glCopyTexImage1D; +RGLSYMGLCOPYTEXIMAGE2DPROC glCopyTexImage2D; +RGLSYMGLCOPYTEXSUBIMAGE1DPROC glCopyTexSubImage1D; +RGLSYMGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D; +RGLSYMGLMAP1DPROC glMap1d; +RGLSYMGLMAP1FPROC glMap1f; +RGLSYMGLMAP2DPROC glMap2d; +RGLSYMGLMAP2FPROC glMap2f; RGLSYMGLGETMAPDVPROC glGetMapdv; RGLSYMGLGETMAPFVPROC glGetMapfv; RGLSYMGLGETMAPIVPROC glGetMapiv; @@ -671,6 +783,8 @@ RGLSYMGLEVALCOORD2DVPROC glEvalCoord2dv; RGLSYMGLEVALCOORD2FVPROC glEvalCoord2fv; RGLSYMGLMAPGRID1DPROC glMapGrid1d; RGLSYMGLMAPGRID1FPROC glMapGrid1f; +RGLSYMGLMAPGRID2DPROC glMapGrid2d; +RGLSYMGLMAPGRID2FPROC glMapGrid2f; RGLSYMGLEVALPOINT1PROC glEvalPoint1; RGLSYMGLEVALPOINT2PROC glEvalPoint2; RGLSYMGLEVALMESH1PROC glEvalMesh1; @@ -686,9 +800,44 @@ RGLSYMGLINITNAMESPROC glInitNames; RGLSYMGLLOADNAMEPROC glLoadName; RGLSYMGLPUSHNAMEPROC glPushName; RGLSYMGLPOPNAMEPROC glPopName; +RGLSYMGLDRAWRANGEELEMENTSPROC glDrawRangeElements; +RGLSYMGLTEXIMAGE3DPROC glTexImage3D; +RGLSYMGLTEXSUBIMAGE3DPROC glTexSubImage3D; +RGLSYMGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D; +RGLSYMGLCOLORTABLEPROC glColorTable; +RGLSYMGLCOLORSUBTABLEPROC glColorSubTable; +RGLSYMGLCOLORTABLEPARAMETERIVPROC glColorTableParameteriv; +RGLSYMGLCOLORTABLEPARAMETERFVPROC glColorTableParameterfv; +RGLSYMGLCOPYCOLORSUBTABLEPROC glCopyColorSubTable; +RGLSYMGLCOPYCOLORTABLEPROC glCopyColorTable; +RGLSYMGLGETCOLORTABLEPROC glGetColorTable; +RGLSYMGLGETCOLORTABLEPARAMETERFVPROC glGetColorTableParameterfv; +RGLSYMGLGETCOLORTABLEPARAMETERIVPROC glGetColorTableParameteriv; RGLSYMGLBLENDEQUATIONPROC glBlendEquation; +RGLSYMGLBLENDCOLORPROC glBlendColor; +RGLSYMGLHISTOGRAMPROC glHistogram; RGLSYMGLRESETHISTOGRAMPROC glResetHistogram; +RGLSYMGLGETHISTOGRAMPROC glGetHistogram; +RGLSYMGLGETHISTOGRAMPARAMETERFVPROC glGetHistogramParameterfv; +RGLSYMGLGETHISTOGRAMPARAMETERIVPROC glGetHistogramParameteriv; +RGLSYMGLMINMAXPROC glMinmax; RGLSYMGLRESETMINMAXPROC glResetMinmax; +RGLSYMGLGETMINMAXPROC glGetMinmax; +RGLSYMGLGETMINMAXPARAMETERFVPROC glGetMinmaxParameterfv; +RGLSYMGLGETMINMAXPARAMETERIVPROC glGetMinmaxParameteriv; +RGLSYMGLCONVOLUTIONFILTER1DPROC glConvolutionFilter1D; +RGLSYMGLCONVOLUTIONFILTER2DPROC glConvolutionFilter2D; +RGLSYMGLCONVOLUTIONPARAMETERFPROC glConvolutionParameterf; +RGLSYMGLCONVOLUTIONPARAMETERFVPROC glConvolutionParameterfv; +RGLSYMGLCONVOLUTIONPARAMETERIPROC glConvolutionParameteri; +RGLSYMGLCONVOLUTIONPARAMETERIVPROC glConvolutionParameteriv; +RGLSYMGLCOPYCONVOLUTIONFILTER1DPROC glCopyConvolutionFilter1D; +RGLSYMGLCOPYCONVOLUTIONFILTER2DPROC glCopyConvolutionFilter2D; +RGLSYMGLGETCONVOLUTIONFILTERPROC glGetConvolutionFilter; +RGLSYMGLGETCONVOLUTIONPARAMETERFVPROC glGetConvolutionParameterfv; +RGLSYMGLGETCONVOLUTIONPARAMETERIVPROC glGetConvolutionParameteriv; +RGLSYMGLSEPARABLEFILTER2DPROC glSeparableFilter2D; +RGLSYMGLGETSEPARABLEFILTERPROC glGetSeparableFilter; RGLSYMGLACTIVETEXTUREPROC glActiveTexture; RGLSYMGLCLIENTACTIVETEXTUREPROC glClientActiveTexture; RGLSYMGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D; diff --git a/libretro-common/include/libchdr/bitstream.h b/libretro-common/include/libchdr/bitstream.h index d376373b76..271c89cb08 100644 --- a/libretro-common/include/libchdr/bitstream.h +++ b/libretro-common/include/libchdr/bitstream.h @@ -39,5 +39,4 @@ uint32_t bitstream_peek(struct bitstream* bitstream, int numbits); void bitstream_remove(struct bitstream* bitstream, int numbits); uint32_t bitstream_flush(struct bitstream* bitstream); - #endif diff --git a/libretro-common/include/libchdr/cdrom.h b/libretro-common/include/libchdr/cdrom.h index 232314e76b..041ff2fa60 100644 --- a/libretro-common/include/libchdr/cdrom.h +++ b/libretro-common/include/libchdr/cdrom.h @@ -15,7 +15,6 @@ #include - /*************************************************************************** CONSTANTS ***************************************************************************/ diff --git a/libretro-common/include/libchdr/chd.h b/libretro-common/include/libchdr/chd.h index 9b4df95349..454de38774 100644 --- a/libretro-common/include/libchdr/chd.h +++ b/libretro-common/include/libchdr/chd.h @@ -49,7 +49,6 @@ extern "C" { #include "coretypes.h" #include - /*************************************************************************** Compressed Hunks of Data header format. All numbers are stored in @@ -171,7 +170,6 @@ extern "C" { ***************************************************************************/ - /*************************************************************************** CONSTANTS ***************************************************************************/ @@ -279,8 +277,6 @@ enum _chd_error }; typedef enum _chd_error chd_error; - - /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ @@ -288,7 +284,6 @@ typedef enum _chd_error chd_error; /* opaque types */ typedef struct _chd_file chd_file; - /* extract header structure (NOT the on-disk header structure) */ typedef struct _chd_header chd_header; struct _chd_header @@ -321,7 +316,6 @@ struct _chd_header UINT32 obsolete_hunksize; /* obsolete field -- do not use! */ }; - /* structure for returning information about a verification pass */ typedef struct _chd_verify_result chd_verify_result; struct _chd_verify_result @@ -332,13 +326,10 @@ struct _chd_verify_result UINT8 metasha1[CHD_SHA1_BYTES]; /* SHA1 checksum of metadata */ }; - - /*************************************************************************** FUNCTION PROTOTYPES ***************************************************************************/ - /* ----- CHD file management ----- */ /* create a new CHD file fitting the given description */ @@ -364,31 +355,21 @@ RFILE *chd_core_file(chd_file *chd); /* return an error string for the given CHD error */ const char *chd_error_string(chd_error err); - - /* ----- CHD header management ----- */ /* return a pointer to the extracted CHD header data */ const chd_header *chd_get_header(chd_file *chd); - - - /* ----- core data read/write ----- */ /* read one hunk from the CHD file */ chd_error chd_read(chd_file *chd, UINT32 hunknum, void *buffer); - - /* ----- metadata management ----- */ /* get indexed metadata of a particular sort */ chd_error chd_get_metadata(chd_file *chd, UINT32 searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 *resultlen, UINT32 *resulttag, UINT8 *resultflags); - - - /* ----- codec interfaces ----- */ /* set internal codec parameters */ diff --git a/libretro-common/include/libchdr/huffman.h b/libretro-common/include/libchdr/huffman.h index 183bd74fdf..ec5ef54a7b 100644 --- a/libretro-common/include/libchdr/huffman.h +++ b/libretro-common/include/libchdr/huffman.h @@ -15,7 +15,6 @@ #include "bitstream.h" - /*************************************************************************** * CONSTANTS *************************************************************************** diff --git a/libretro-common/include/libchdr/libchdr_zlib.h b/libretro-common/include/libchdr/libchdr_zlib.h index 4f3f141050..324faeeaa2 100644 --- a/libretro-common/include/libchdr/libchdr_zlib.h +++ b/libretro-common/include/libchdr/libchdr_zlib.h @@ -36,7 +36,6 @@ struct _zlib_codec_data zlib_allocator allocator; }; - /* codec-private data for the CDZL codec */ typedef struct _cdzl_codec_data cdzl_codec_data; struct _cdzl_codec_data { diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h index 4e1a9785ba..f3c13961ec 100644 --- a/libretro-common/include/libretro.h +++ b/libretro-common/include/libretro.h @@ -1100,6 +1100,10 @@ enum retro_mod * Introduced in VFS API v1 */ struct retro_vfs_file_handle; +/* Opaque directory handle + * Introduced in VFS API v3 */ +struct retro_vfs_dir_handle; + /* File open flags * Introduced in VFS API v1 */ #define RETRO_VFS_FILE_ACCESS_READ (1 << 0) /* Read only mode */ @@ -1119,6 +1123,12 @@ struct retro_vfs_file_handle; #define RETRO_VFS_SEEK_POSITION_CURRENT 1 #define RETRO_VFS_SEEK_POSITION_END 2 +/* stat() result flags + * Introduced in VFS API v3 */ +#define RETRO_VFS_STAT_IS_VALID (1 << 0) +#define RETRO_VFS_STAT_IS_DIRECTORY (1 << 1) +#define RETRO_VFS_STAT_IS_CHARACTER_SPECIAL (1 << 2) + /* Get path from opaque handle. Returns the exact same path passed to file_open when getting the handle * Introduced in VFS API v1 */ typedef const char *(RETRO_CALLCONV *retro_vfs_get_path_t)(struct retro_vfs_file_handle *stream); @@ -1128,7 +1138,7 @@ typedef const char *(RETRO_CALLCONV *retro_vfs_get_path_t)(struct retro_vfs_file * Introduced in VFS API v1 */ typedef struct retro_vfs_file_handle *(RETRO_CALLCONV *retro_vfs_open_t)(const char *path, unsigned mode, unsigned hints); -/* Close the file and release its resources. Must be called if open_file returns non-NULL. Returns 0 on succes, -1 on failure. +/* Close the file and release its resources. Must be called if open_file returns non-NULL. Returns 0 on success, -1 on failure. * Whether the call succeeds ot not, the handle passed as parameter becomes invalid and should no longer be used. * Introduced in VFS API v1 */ typedef int (RETRO_CALLCONV *retro_vfs_close_t)(struct retro_vfs_file_handle *stream); @@ -1141,7 +1151,7 @@ typedef int64_t (RETRO_CALLCONV *retro_vfs_size_t)(struct retro_vfs_file_handle * Introduced in VFS API v2 */ typedef int64_t (RETRO_CALLCONV *retro_vfs_truncate_t)(struct retro_vfs_file_handle *stream, int64_t length); -/* Get the current read / write position for the file. Returns - 1 for error. +/* Get the current read / write position for the file. Returns -1 for error. * Introduced in VFS API v1 */ typedef int64_t (RETRO_CALLCONV *retro_vfs_tell_t)(struct retro_vfs_file_handle *stream); @@ -1169,6 +1179,39 @@ typedef int (RETRO_CALLCONV *retro_vfs_remove_t)(const char *path); * Introduced in VFS API v1 */ typedef int (RETRO_CALLCONV *retro_vfs_rename_t)(const char *old_path, const char *new_path); +/* Stat the specified file. Retruns a bitmask of RETRO_VFS_STAT_* flags, none are set if path was not valid. + * Additionally stores file size in given variable, unless NULL is given. + * Introduced in VFS API v3 */ +typedef int (RETRO_CALLCONV *retro_vfs_stat_t)(const char *path, int32_t *size); + +/* Create the specified directory. Returns 0 on success, -1 on unknown failure, -2 if already exists. + * Introduced in VFS API v3 */ +typedef int (RETRO_CALLCONV *retro_vfs_mkdir_t)(const char *dir); + +/* Open the specified directory for listing. Returns the opaque dir handle, or NULL for error. + * Support for the include_hidden argument may vary depending on the platform. + * Introduced in VFS API v3 */ +typedef struct retro_vfs_dir_handle *(RETRO_CALLCONV *retro_vfs_opendir_t)(const char *dir, bool include_hidden); + +/* Read the directory entry at the current position, and move the read pointer to the next position. + * Returns true on success, false if already on the last entry. + * Introduced in VFS API v3 */ +typedef bool (RETRO_CALLCONV *retro_vfs_readdir_t)(struct retro_vfs_dir_handle *dirstream); + +/* Get the name of the last entry read. Returns a string on success, or NULL for error. + * The returned string pointer is valid until the next call to readdir or closedir. + * Introduced in VFS API v3 */ +typedef const char *(RETRO_CALLCONV *retro_vfs_dirent_get_name_t)(struct retro_vfs_dir_handle *dirstream); + +/* Check if the last entry read was a directory. Returns true if it was, false otherwise (or on error). + * Introduced in VFS API v3 */ +typedef bool (RETRO_CALLCONV *retro_vfs_dirent_is_dir_t)(struct retro_vfs_dir_handle *dirstream); + +/* Close the directory and release its resources. Must be called if opendir returns non-NULL. Returns 0 on success, -1 on failure. + * Whether the call succeeds ot not, the handle passed as parameter becomes invalid and should no longer be used. + * Introduced in VFS API v3 */ +typedef int (RETRO_CALLCONV *retro_vfs_closedir_t)(struct retro_vfs_dir_handle *dirstream); + struct retro_vfs_interface { /* VFS API v1 */ @@ -1185,6 +1228,14 @@ struct retro_vfs_interface retro_vfs_rename_t rename; /* VFS API v2 */ retro_vfs_truncate_t truncate; + /* VFS API v3 */ + retro_vfs_stat_t stat; + retro_vfs_mkdir_t mkdir; + retro_vfs_opendir_t opendir; + retro_vfs_readdir_t readdir; + retro_vfs_dirent_get_name_t dirent_get_name; + retro_vfs_dirent_is_dir_t dirent_is_dir; + retro_vfs_closedir_t closedir; }; struct retro_vfs_interface_info @@ -1207,6 +1258,7 @@ enum retro_hw_render_interface_type RETRO_HW_RENDER_INTERFACE_D3D10 = 2, RETRO_HW_RENDER_INTERFACE_D3D11 = 3, RETRO_HW_RENDER_INTERFACE_D3D12 = 4, + RETRO_HW_RENDER_INTERFACE_GSKIT_PS2 = 5, RETRO_HW_RENDER_INTERFACE_DUMMY = INT_MAX }; diff --git a/libretro-common/include/libretro_d3d.h b/libretro-common/include/libretro_d3d.h index d95931b3e9..a0ba716fdb 100644 --- a/libretro-common/include/libretro_d3d.h +++ b/libretro-common/include/libretro_d3d.h @@ -54,7 +54,6 @@ struct retro_hw_render_interface_d3d11 pD3DCompile D3DCompile; }; - #endif #endif /* LIBRETRO_DIRECT3D_H__ */ diff --git a/libretro-common/include/libretro_gskit_ps2.h b/libretro-common/include/libretro_gskit_ps2.h new file mode 100644 index 0000000000..e1e978d4c5 --- /dev/null +++ b/libretro-common/include/libretro_gskit_ps2.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2010-2018 The RetroArch team + * + * --------------------------------------------------------------------------------------------- + * The following license statement only applies to this libretro API header (libretro_d3d.h) + * --------------------------------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the + * "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LIBRETRO_GSKIT_PS2_H_ +#define LIBRETRO_GSKIT_PS2_H_ + +#include "libretro.h" + +#if defined(PS2) + +#include + +#define RETRO_HW_RENDER_INTERFACE_GSKIT_PS2_VERSION 1 + +struct retro_hw_render_interface_gskit_ps2 +{ + /* Must be set to RETRO_HW_RENDER_INTERFACE_GSKIT_PS2. */ + enum retro_hw_render_interface_type interface_type; + /* Must be set to RETRO_HW_RENDER_INTERFACE_GSKIT_PS2_VERSION. */ + unsigned interface_version; + + /* Opaque handle to the GSKit_PS2 backend in the frontend + * which must be passed along to all function pointers + * in this interface. + */ + GSTEXTURE *coreTexture; + bool clearTexture; +}; +typedef struct retro_hw_render_interface_gskit_ps2 RETRO_HW_RENDER_INTEFACE_GSKIT_PS2; + +#endif + +#endif /* LIBRETRO_GSKIT_PS2_H_ */ diff --git a/libretro-common/include/libretro_vulkan.h b/libretro-common/include/libretro_vulkan.h index 5ae7187b7d..a6f9fb3c75 100644 --- a/libretro-common/include/libretro_vulkan.h +++ b/libretro-common/include/libretro_vulkan.h @@ -395,4 +395,3 @@ struct retro_hw_render_interface_vulkan }; #endif - diff --git a/libretro-common/include/lists/file_list.h b/libretro-common/include/lists/file_list.h index 208bf15a59..587967d514 100644 --- a/libretro-common/include/lists/file_list.h +++ b/libretro-common/include/lists/file_list.h @@ -52,7 +52,6 @@ typedef struct file_list size_t size; } file_list_t; - void *file_list_get_userdata_at_offset(const file_list_t *list, size_t index); diff --git a/libretro-common/include/math/float_minmax.h b/libretro-common/include/math/float_minmax.h index 2164dde0f7..9d446d6196 100644 --- a/libretro-common/include/math/float_minmax.h +++ b/libretro-common/include/math/float_minmax.h @@ -58,5 +58,4 @@ static INLINE float float_max(float a, float b) #endif } - #endif diff --git a/libretro-common/include/math/fxp.h b/libretro-common/include/math/fxp.h index 46f58bae91..b4f199ac45 100644 --- a/libretro-common/include/math/fxp.h +++ b/libretro-common/include/math/fxp.h @@ -59,4 +59,3 @@ static INLINE int64_t fx32_shiftup(const int32_t a) } #endif - diff --git a/libretro-common/include/net/net_compat.h b/libretro-common/include/net/net_compat.h index 789f944e71..516120ab9d 100644 --- a/libretro-common/include/net/net_compat.h +++ b/libretro-common/include/net/net_compat.h @@ -46,7 +46,6 @@ #define MSG_NOSIGNAL 0 #endif - #elif defined(_XBOX) #define NOD3D diff --git a/libretro-common/include/net/net_ifinfo.h b/libretro-common/include/net/net_ifinfo.h index b1d2535500..14fbf68823 100644 --- a/libretro-common/include/net/net_ifinfo.h +++ b/libretro-common/include/net/net_ifinfo.h @@ -32,7 +32,6 @@ RETRO_BEGIN_DECLS - struct net_ifinfo_entry { char *name; @@ -53,5 +52,4 @@ bool net_ifinfo_new(net_ifinfo_t *list); RETRO_END_DECLS - #endif diff --git a/libretro-common/include/queues/fifo_queue.h b/libretro-common/include/queues/fifo_queue.h index b9c22e7ece..4e87699da8 100644 --- a/libretro-common/include/queues/fifo_queue.h +++ b/libretro-common/include/queues/fifo_queue.h @@ -76,4 +76,3 @@ static INLINE size_t fifo_write_avail(fifo_buffer_t *buffer) RETRO_END_DECLS #endif - diff --git a/libretro-common/include/queues/task_queue.h b/libretro-common/include/queues/task_queue.h index 40c35ddfdb..c0965ecda5 100644 --- a/libretro-common/include/queues/task_queue.h +++ b/libretro-common/include/queues/task_queue.h @@ -42,7 +42,6 @@ enum task_type TASK_TYPE_BLOCKING }; - typedef struct retro_task retro_task_t; typedef void (*retro_task_callback_t)(void *task_data, void *user_data, const char *error); @@ -210,7 +209,6 @@ void task_queue_push(retro_task_t *task); * This must only be called from the main thread. */ void task_queue_wait(retro_task_condition_fn_t cond, void* data); - /* Sends a signal to terminate all the tasks. * * This won't terminate the tasks immediately. diff --git a/libretro-common/include/retro_common.h b/libretro-common/include/retro_common.h index e4804fae08..9a1fd5fd61 100644 --- a/libretro-common/include/retro_common.h +++ b/libretro-common/include/retro_common.h @@ -34,4 +34,3 @@ in a public API, you may need this. #include #endif - diff --git a/libretro-common/include/retro_common_api.h b/libretro-common/include/retro_common_api.h index c3b3f4927f..fc4f745414 100644 --- a/libretro-common/include/retro_common_api.h +++ b/libretro-common/include/retro_common_api.h @@ -113,6 +113,5 @@ Of course, another school of thought is that you should do as little damage as p in as few places as possible... */ - /* _LIBRETRO_COMMON_RETRO_COMMON_API_H */ #endif diff --git a/libretro-common/include/retro_dirent.h b/libretro-common/include/retro_dirent.h index c3450732c5..8a2591bd3a 100644 --- a/libretro-common/include/retro_dirent.h +++ b/libretro-common/include/retro_dirent.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2018 The RetroArch team +/* Copyright (C) 2010-2019 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_dirent.h). @@ -23,6 +23,7 @@ #ifndef __RETRO_DIRENT_H #define __RETRO_DIRENT_H +#include #include #include @@ -30,6 +31,10 @@ RETRO_BEGIN_DECLS +#define DIRENT_REQUIRED_VFS_VERSION 3 + +void dirent_vfs_init(const struct retro_vfs_interface_info* vfs_info); + typedef struct RDIR RDIR; /** @@ -44,25 +49,27 @@ typedef struct RDIR RDIR; */ struct RDIR *retro_opendir(const char *name); +struct RDIR *retro_opendir_include_hidden(const char *name, bool include_hidden); + int retro_readdir(struct RDIR *rdir); +/* Deprecated, returns false, left for compatibility */ bool retro_dirent_error(struct RDIR *rdir); -void retro_dirent_include_hidden(struct RDIR *rdir, bool include_hidden); - const char *retro_dirent_get_name(struct RDIR *rdir); /** * * retro_dirent_is_dir: * @rdir : pointer to the directory entry. + * @unused : deprecated, included for compatibility reasons, pass NULL * * Is the directory listing entry a directory? * * Returns: true if directory listing entry is * a directory, false if not. */ -bool retro_dirent_is_dir(struct RDIR *rdir, const char *path); +bool retro_dirent_is_dir(struct RDIR *rdir, const char *unused); void retro_closedir(struct RDIR *rdir); diff --git a/libretro-common/include/retro_miscellaneous.h b/libretro-common/include/retro_miscellaneous.h index 629ce12c34..bdb41f7bba 100644 --- a/libretro-common/include/retro_miscellaneous.h +++ b/libretro-common/include/retro_miscellaneous.h @@ -77,7 +77,7 @@ static INLINE bool bits_any_set(uint32_t* ptr, uint32_t count) #ifndef PATH_MAX_LENGTH #if defined(__CELLOS_LV2__) #define PATH_MAX_LENGTH CELL_FS_MAX_FS_PATH_LENGTH -#elif defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) +#elif defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) || defined(ORBIS) #define PATH_MAX_LENGTH 512 #else #define PATH_MAX_LENGTH 4096 diff --git a/libretro-common/include/retro_timers.h b/libretro-common/include/retro_timers.h index d5526bc637..884c078942 100644 --- a/libretro-common/include/retro_timers.h +++ b/libretro-common/include/retro_timers.h @@ -96,7 +96,7 @@ static INLINE void retro_sleep(unsigned msec) #elif defined(_3DS) svcSleepThread(1000000 * (s64)msec); #elif defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - /* TODO/FIXME */ + SleepEx(msec, FALSE); #elif defined(_WIN32) Sleep(msec); #elif defined(XENON) diff --git a/libretro-common/include/streams/interface_stream.h b/libretro-common/include/streams/interface_stream.h index 71d5c97fd4..ec480c6624 100644 --- a/libretro-common/include/streams/interface_stream.h +++ b/libretro-common/include/streams/interface_stream.h @@ -103,7 +103,6 @@ intfstream_t *intfstream_open_memory(void *data, intfstream_t *intfstream_open_chd_track(const char *path, unsigned mode, unsigned hints, int32_t track); - RETRO_END_DECLS #endif diff --git a/libretro-common/include/streams/stdin_stream.h b/libretro-common/include/streams/stdin_stream.h index dda02963e4..3ed9bfdc9e 100644 --- a/libretro-common/include/streams/stdin_stream.h +++ b/libretro-common/include/streams/stdin_stream.h @@ -37,4 +37,3 @@ size_t read_stdin(char *buf, size_t size); RETRO_END_DECLS #endif - diff --git a/libretro-common/include/streams/trans_stream.h b/libretro-common/include/streams/trans_stream.h index 0a10368e73..d183c6333e 100644 --- a/libretro-common/include/streams/trans_stream.h +++ b/libretro-common/include/streams/trans_stream.h @@ -39,7 +39,6 @@ RETRO_BEGIN_DECLS - enum trans_stream_error { TRANS_STREAM_ERROR_NONE = 0, @@ -105,4 +104,3 @@ extern const struct trans_stream_backend pipe_backend; RETRO_END_DECLS #endif - diff --git a/libretro-common/include/utils/md5.h b/libretro-common/include/utils/md5.h index 6e84851c5d..caf160bce1 100644 --- a/libretro-common/include/utils/md5.h +++ b/libretro-common/include/utils/md5.h @@ -32,7 +32,6 @@ RETRO_BEGIN_DECLS - /* Any 32-bit or wider unsigned integer data type will do */ typedef unsigned int MD5_u32plus; diff --git a/libretro-common/include/vfs/vfs_implementation.h b/libretro-common/include/vfs/vfs_implementation.h index 5a1e5c3a9c..afc2e22213 100644 --- a/libretro-common/include/vfs/vfs_implementation.h +++ b/libretro-common/include/vfs/vfs_implementation.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2018 The RetroArch team +/* Copyright (C) 2010-2019 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vfs_implementation.h). @@ -38,6 +38,12 @@ typedef struct retro_vfs_file_handle libretro_vfs_implementation_file; typedef struct libretro_vfs_implementation_file libretro_vfs_implementation_file; #endif +#ifdef VFS_FRONTEND +typedef struct retro_vfs_dir_handle libretro_vfs_implementation_dir; +#else +typedef struct libretro_vfs_implementation_dir libretro_vfs_implementation_dir; +#endif + libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, unsigned mode, unsigned hints); int retro_vfs_file_close_impl(libretro_vfs_implementation_file *stream); @@ -64,4 +70,18 @@ int retro_vfs_file_rename_impl(const char *old_path, const char *new_path); const char *retro_vfs_file_get_path_impl(libretro_vfs_implementation_file *stream); +int retro_vfs_stat_impl(const char *path, int32_t *size); + +int retro_vfs_mkdir_impl(const char *dir); + +libretro_vfs_implementation_dir *retro_vfs_opendir_impl(const char *dir, bool include_hidden); + +bool retro_vfs_readdir_impl(libretro_vfs_implementation_dir *dirstream); + +const char *retro_vfs_dirent_get_name_impl(libretro_vfs_implementation_dir *dirstream); + +bool retro_vfs_dirent_is_dir_impl(libretro_vfs_implementation_dir *dirstream); + +int retro_vfs_closedir_impl(libretro_vfs_implementation_dir *dirstream); + #endif diff --git a/libretro-common/include/vulkan/vulkan_symbol_wrapper.h b/libretro-common/include/vulkan/vulkan_symbol_wrapper.h index 06f404e2ce..4b1ded0d4e 100644 --- a/libretro-common/include/vulkan/vulkan_symbol_wrapper.h +++ b/libretro-common/include/vulkan/vulkan_symbol_wrapper.h @@ -348,9 +348,7 @@ VkBool32 vulkan_symbol_wrapper_load_device_symbol(VkDevice device, const char *n #define VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, name, pfn) vulkan_symbol_wrapper_load_device_symbol(device, name, (PFN_vkVoidFunction*) &(pfn)) #define VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_EXTENSION_SYMBOL(device, name) vulkan_symbol_wrapper_load_device_symbol(device, #name, (PFN_vkVoidFunction*) & name) - #ifdef __cplusplus } #endif #endif - diff --git a/libretro-common/libco/aarch64.c b/libretro-common/libco/aarch64.c index 3c3b2f8131..b9781e3390 100644 --- a/libretro-common/libco/aarch64.c +++ b/libretro-common/libco/aarch64.c @@ -126,4 +126,3 @@ void co_switch(cothread_t handle) #ifdef __cplusplus } #endif - diff --git a/libretro-common/libco/armeabi.c b/libretro-common/libco/armeabi.c index f65aaa2e4b..f03a356794 100644 --- a/libretro-common/libco/armeabi.c +++ b/libretro-common/libco/armeabi.c @@ -104,4 +104,3 @@ void co_switch(cothread_t handle) #ifdef __cplusplus } #endif - diff --git a/libretro-common/lists/dir_list.c b/libretro-common/lists/dir_list.c index 10d73a50d5..968f74c4f2 100644 --- a/libretro-common/lists/dir_list.c +++ b/libretro-common/lists/dir_list.c @@ -53,7 +53,6 @@ static int qstrcmp_dir(const void *a_, const void *b_) int a_type = a->attr.i; int b_type = b->attr.i; - /* Sort directories before files. */ if (a_type != b_type) return b_type - a_type; @@ -172,13 +171,11 @@ static int dir_list_read(const char *dir, bool include_dirs, bool include_hidden, bool include_compressed, bool recursive) { - struct RDIR *entry = retro_opendir(dir); + struct RDIR *entry = retro_opendir_include_hidden(dir, include_hidden); if (!entry || retro_dirent_error(entry)) goto error; - retro_dirent_include_hidden(entry, include_hidden); - while (retro_readdir(entry)) { char file_path[PATH_MAX_LENGTH]; @@ -190,7 +187,7 @@ static int dir_list_read(const char *dir, file_path[0] = '\0'; fill_pathname_join(file_path, dir, name, sizeof(file_path)); - is_dir = retro_dirent_is_dir(entry, file_path); + is_dir = retro_dirent_is_dir(entry, NULL); if(!is_dir) file_ext = path_get_extension(name); @@ -299,4 +296,3 @@ struct string_list *dir_list_new(const char *dir, return list; } - diff --git a/libretro-common/lists/file_list.c b/libretro-common/lists/file_list.c index 1525d8879e..dcf03d4de6 100644 --- a/libretro-common/lists/file_list.c +++ b/libretro-common/lists/file_list.c @@ -136,7 +136,6 @@ size_t file_list_get_directory_ptr(const file_list_t *list) return list->list[size].directory_ptr; } - void file_list_pop(file_list_t *list, size_t *directory_ptr) { if (!list) diff --git a/libretro-common/memmap/memalign.c b/libretro-common/memmap/memalign.c index 6171e21783..c2332962b7 100644 --- a/libretro-common/memmap/memalign.c +++ b/libretro-common/memmap/memalign.c @@ -25,7 +25,6 @@ #include - void *memalign_alloc(size_t boundary, size_t size) { void **place = NULL; diff --git a/libretro-common/net/net_compat.c b/libretro-common/net/net_compat.c index ea45743596..cec24a0cd1 100644 --- a/libretro-common/net/net_compat.c +++ b/libretro-common/net/net_compat.c @@ -447,7 +447,6 @@ error: return NULL; } - /* convert presentation format to network format */ static const char * inet_ntop6x(const unsigned char *src, char *dst, size_t size) diff --git a/libretro-common/queues/fifo_queue.c b/libretro-common/queues/fifo_queue.c index d6b21aca48..0ddb89ab1e 100644 --- a/libretro-common/queues/fifo_queue.c +++ b/libretro-common/queues/fifo_queue.c @@ -64,7 +64,6 @@ void fifo_write(fifo_buffer_t *buffer, const void *in_buf, size_t size) buffer->end = (buffer->end + size) % buffer->size; } - void fifo_read(fifo_buffer_t *buffer, void *in_buf, size_t size) { size_t first_read = size; @@ -81,4 +80,3 @@ void fifo_read(fifo_buffer_t *buffer, void *in_buf, size_t size) buffer->first = (buffer->first + size) % buffer->size; } - diff --git a/libretro-common/queues/message_queue.c b/libretro-common/queues/message_queue.c index a8086c3b9f..f5af162f2d 100644 --- a/libretro-common/queues/message_queue.c +++ b/libretro-common/queues/message_queue.c @@ -93,7 +93,6 @@ void msg_queue_free(msg_queue_t *queue) free(queue); } - /** * msg_queue_push: * @queue : pointer to queue object diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index 2eb51dd9e7..7ca188eefc 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -401,7 +401,6 @@ static void retro_task_threaded_reset(void) slock_unlock(running_lock); } - static bool retro_task_threaded_find( retro_task_finder_t func, void *user_data) { diff --git a/libretro-common/rthreads/psp_pthread.h b/libretro-common/rthreads/psp_pthread.h index 007aa5cb11..7aea08a875 100644 --- a/libretro-common/rthreads/psp_pthread.h +++ b/libretro-common/rthreads/psp_pthread.h @@ -62,7 +62,6 @@ typedef struct sthreadEntry start_routine; } sthread_args_struct; - static int psp_thread_wrap(SceSize args, void *argp) { sthread_args_struct* sthread_args = (sthread_args_struct*)argp; @@ -137,7 +136,6 @@ static INLINE int pthread_mutex_unlock(pthread_mutex_t *mutex) #endif } - static INLINE int pthread_join(pthread_t thread, void **retval) { #ifdef VITA @@ -238,7 +236,6 @@ static INLINE int pthread_cond_init(pthread_cond_t *cond, return 0; - #else /* FIXME: stub */ return 1; @@ -282,7 +279,6 @@ static INLINE int pthread_cond_destroy(pthread_cond_t *cond) #endif } - static INLINE int pthread_detach(pthread_t thread) { return 0; diff --git a/libretro-common/rthreads/rthreads.c b/libretro-common/rthreads/rthreads.c index 7c67d9465c..930f71b05c 100644 --- a/libretro-common/rthreads/rthreads.c +++ b/libretro-common/rthreads/rthreads.c @@ -853,9 +853,9 @@ bool scond_wait_timeout(scond_t *cond, slock_t *lock, int64_t timeout_us) now.tv_sec = s; now.tv_nsec = n; #elif defined(PS2) - int tickUS = cpu_ticks()/295.0; - now.tv_sec = tickUS/1000000; - now.tv_nsec = tickUS * 1000; + int tickms = clock(); + now.tv_sec = tickms/1000; + now.tv_nsec = tickms * 1000; #elif defined(__mips__) || defined(VITA) || defined(_3DS) struct timeval tm; diff --git a/libretro-common/rthreads/xenon_sdl_threads.c b/libretro-common/rthreads/xenon_sdl_threads.c index ff1855c275..6c38d89015 100644 --- a/libretro-common/rthreads/xenon_sdl_threads.c +++ b/libretro-common/rthreads/xenon_sdl_threads.c @@ -56,4 +56,3 @@ int SDL_CondSignal(SDL_cond *cond) *(volatile bool*)cond = false; return 0; } - diff --git a/libretro-common/samples/file/nbio/Makefile b/libretro-common/samples/file/nbio/Makefile index cf7a581106..c0a9021562 100644 --- a/libretro-common/samples/file/nbio/Makefile +++ b/libretro-common/samples/file/nbio/Makefile @@ -29,4 +29,3 @@ clean: rm -f $(TARGET) $(OBJS) .PHONY: clean - diff --git a/libretro-common/samples/formats/png/Makefile b/libretro-common/samples/formats/png/Makefile index 154285f8b1..521dd0b875 100644 --- a/libretro-common/samples/formats/png/Makefile +++ b/libretro-common/samples/formats/png/Makefile @@ -55,4 +55,3 @@ clean: rm -f $(TARGET) $(OBJS) .PHONY: clean - diff --git a/libretro-common/samples/utils/Makefile b/libretro-common/samples/utils/Makefile index b9c785ee55..94942be407 100644 --- a/libretro-common/samples/utils/Makefile +++ b/libretro-common/samples/utils/Makefile @@ -62,13 +62,11 @@ asflags := $(extra_flags) LDFLAGS := flags += -std=c99 -DMD5_BUILD_UTILITY -DSHA1_BUILD_UTILITY - ifeq (1,$(use_neon)) ASMFLAGS := -INEON/asm asflags += -mfpu=neon endif - OBJS += $(CORE_DIR)/djb2.o \ $(CORE_DIR)/md5.o \ $(CORE_DIR)/sha1.o \ diff --git a/libretro-common/streams/chd_stream.c b/libretro-common/streams/chd_stream.c index 669bd43391..f622a782ff 100644 --- a/libretro-common/streams/chd_stream.c +++ b/libretro-common/streams/chd_stream.c @@ -251,7 +251,6 @@ chdstream_t *chdstream_open(const char *path, int32_t track) else pregap = 0; - stream->chd = chd; stream->frames_per_hunk = hd->hunkbytes / hd->unitbytes; stream->track_frame = meta.frame_offset; diff --git a/libretro-common/streams/file_stream.c b/libretro-common/streams/file_stream.c index 680a809ec5..3a6f161c5d 100644 --- a/libretro-common/streams/file_stream.c +++ b/libretro-common/streams/file_stream.c @@ -323,7 +323,6 @@ int filestream_eof(RFILE *stream) return stream->eof_flag; } - int64_t filestream_tell(RFILE *stream) { int64_t output; diff --git a/libretro-common/string/stdstring.c b/libretro-common/string/stdstring.c index 6d55cfe11e..af7f7cae85 100644 --- a/libretro-common/string/stdstring.c +++ b/libretro-common/string/stdstring.c @@ -82,6 +82,10 @@ char *string_replace_substring(const char *in, outlen = strlen(in) - pattern_len*numhits + replacement_len*numhits; out = (char *)malloc(outlen+1); + + if (!out) + return NULL; + outat = out; inat = in; inprev = in; @@ -105,18 +109,17 @@ char *string_trim_whitespace_left(char *const s) { if(s && *s) { - size_t len = strlen(s); - char *cur = s; + size_t len = strlen(s); + char *current = s; - while(*cur && isspace((unsigned char)*cur)) + while(*current && isspace((unsigned char)*current)) { - ++cur; + ++current; --len; } - if(s != cur) - memmove(s, cur, len + 1); - + if(s != current) + memmove(s, current, len + 1); } return s; @@ -127,16 +130,16 @@ char *string_trim_whitespace_right(char *const s) { if(s && *s) { - size_t len = strlen(s); - char *cur = s + len - 1; + size_t len = strlen(s); + char *current = s + len - 1; - while(cur != s && isspace((unsigned char)*cur)) + while(current != s && isspace((unsigned char)*current)) { - --cur; + --current; --len; } - cur[isspace((unsigned char)*cur) ? 0 : 1] = '\0'; + current[isspace((unsigned char)*current) ? 0 : 1] = '\0'; } return s; diff --git a/libretro-common/utils/sha1_main.c b/libretro-common/utils/sha1_main.c index 1eb0c8ec54..55b0e0c4e3 100644 --- a/libretro-common/utils/sha1_main.c +++ b/libretro-common/utils/sha1_main.c @@ -31,7 +31,6 @@ */ void usage(void); - /* * main * diff --git a/libretro-common/vfs/vfs_implementation.c b/libretro-common/vfs/vfs_implementation.c index 4721e7259e..4d5098c758 100644 --- a/libretro-common/vfs/vfs_implementation.c +++ b/libretro-common/vfs/vfs_implementation.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2018 The RetroArch team +/* Copyright (C) 2010-2019 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vfs_implementation.c). @@ -26,6 +26,8 @@ #include #include +#include + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -34,6 +36,7 @@ # ifdef _MSC_VER # define setmode _setmode # endif +#include # ifdef _XBOX # include # define INVALID_FILE_ATTRIBUTES -1 @@ -56,6 +59,10 @@ # include # endif # include +# if defined(ORBIS) +# include +# include +# endif #endif #ifdef __CELLOS_LV2__ @@ -69,6 +76,90 @@ #include #endif +/* TODO: Some things are duplicated but I'm really afraid of breaking other platforms by touching this */ +#if defined(VITA) +# include +# include +# include +#elif defined(ORBIS) +# include +# include +# include +# include +#elif !defined(_WIN32) +# if defined(PSP) +# include +# endif +# if defined(PS2) +# include +# endif +# include +# include +# include +# include +#endif + +#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) || defined(PS2) +#include /* stat() is defined here */ +#endif + +#ifdef __APPLE__ +#include +#endif +#ifdef __HAIKU__ +#include +#endif +#ifndef __MACH__ +#include +#include +#endif +#include +#include +#include + +#if defined(_WIN32) +#ifndef _XBOX +#if defined(_MSC_VER) && _MSC_VER <= 1200 +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) +#endif +#endif +#elif defined(VITA) +#define SCE_ERROR_ERRNO_EEXIST 0x80010011 +#include +#include +#include +#else +#include +#include +#include +#endif + +#if defined(ORBIS) +#include +#include +#include +#endif +#if defined(PSP) +#include +#endif + +#if defined(PS2) +#include +#include +#endif + +#if defined(__CELLOS_LV2__) +#include +#endif + +#if defined(VITA) +#define FIO_S_ISDIR SCE_S_ISDIR +#endif + +#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) +#include /* stat() is defined here */ +#endif + /* Assume W-functions do not work below Win2K and Xbox platforms */ #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX) @@ -95,6 +186,7 @@ #include #include #include +#include #define RFILE_HINT_UNBUFFERED (1 << 8) @@ -123,6 +215,7 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i goto error; if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) + { /* VC2005 and up have a special 64-bit fseek */ #ifdef ATLEAST_VC2005 return _fseeki64(stream->fp, offset, whence); @@ -130,10 +223,18 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i return fseek(stream->fp, (long)offset, whence); #elif defined(PS2) return fioLseek(fileno(stream->fp), (off_t)offset, whence); +#elif defined(ORBIS) + int ret = orbisLseek(stream->fd, offset, whence); + + RARCH_LOG("[VFS]retro_vfs_file_seek_internal orbisLseek return %d on fd=%d filename=%s\n", ret, stream->fd, stream->orig_path); + + if (ret < 0) + return -1; + return 0; #else return fseeko(stream->fp, (off_t)offset, whence); #endif - + } #ifdef HAVE_MMAP /* Need to check stream->mapped because this function is * called in filestream_open() */ @@ -236,25 +337,28 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns mode_str = "wb"; flags = O_WRONLY | O_CREAT | O_TRUNC; +#if !defined(ORBIS) #if defined(PS2) flags |= FIO_S_IRUSR | FIO_S_IWUSR; #elif !defined(_WIN32) flags |= S_IRUSR | S_IWUSR; #else flags |= O_BINARY; +#endif #endif break; case RETRO_VFS_FILE_ACCESS_READ_WRITE: mode_str = "w+b"; - flags = O_RDWR | O_CREAT | O_TRUNC; +#if !defined(ORBIS) #if defined(PS2) flags |= FIO_S_IRUSR | FIO_S_IWUSR; #elif !defined(_WIN32) flags |= S_IRUSR | S_IWUSR; #else flags |= O_BINARY; +#endif #endif break; @@ -263,12 +367,14 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns mode_str = "r+b"; flags = O_RDWR; +#if !defined(ORBIS) #if defined(PS2) flags |= FIO_S_IRUSR | FIO_S_IWUSR; #elif !defined(_WIN32) flags |= S_IRUSR | S_IWUSR; #else flags |= O_BINARY; +#endif #endif break; @@ -278,6 +384,16 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) { +#ifdef ORBIS + int fd = orbisOpen(path, flags, 0644); + RARCH_LOG("[VFS]retro_vfs_file_open_impl orbisOpen fd=%d path=%s\n", fd, path); + if( fd < 0) + { + stream->fd=-1; + goto error; + } + stream->fd = fd; +#else FILE *fp = (FILE*)fopen_utf8(path, mode_str); if (!fp) @@ -294,9 +410,10 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns */ /* TODO: this is only useful for a few platforms, find which and add ifdef */ stream->fp = fp; -#if !defined(PS2) +#if !defined(PS2) /* TODO: PS2 IMPROVEMENT */ stream->buf = (char*)calloc(1, 0x4000); setvbuf(stream->fp, stream->buf, _IOFBF, 0x4000); +#endif #endif } else @@ -340,14 +457,18 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns } #endif } - +#ifdef ORBIS + stream->size = orbisLseek(stream->fd, 0, SEEK_END); + orbisLseek(stream->fd, 0, SEEK_SET); + RARCH_LOG("[VFS]retro_vfs_file_open_impl size=%d fd=%d path=%s\n", stream->size, stream->fd, stream->orig_path); +#else retro_vfs_file_seek_internal(stream, 0, SEEK_SET); retro_vfs_file_seek_internal(stream, 0, SEEK_END); stream->size = retro_vfs_file_tell_impl(stream); retro_vfs_file_seek_internal(stream, 0, SEEK_SET); - +#endif return stream; error: @@ -374,7 +495,15 @@ int retro_vfs_file_close_impl(libretro_vfs_implementation_file *stream) } if (stream->fd > 0) + { +#ifdef ORBIS + RARCH_LOG("[VFS]retro_vfs_file_close_impl orbisClose fd=%d path=%s\n", stream->fd, stream->orig_path); + orbisClose(stream->fd); + stream->fd=-1; +#else close(stream->fd); +#endif + } if (stream->buf) free(stream->buf); if (stream->orig_path) @@ -386,7 +515,11 @@ int retro_vfs_file_close_impl(libretro_vfs_implementation_file *stream) int retro_vfs_file_error_impl(libretro_vfs_implementation_file *stream) { +#ifdef ORBIS + return 0; +#else return ferror(stream->fp); +#endif } int64_t retro_vfs_file_size_impl(libretro_vfs_implementation_file *stream) @@ -404,7 +537,7 @@ int64_t retro_vfs_file_truncate_impl(libretro_vfs_implementation_file *stream, i #ifdef _WIN32 if(_chsize(_fileno(stream->fp), length) != 0) return -1; -#elif !defined(VITA) && !defined(PSP) && !defined(PS2) && (!defined(SWITCH) || defined(HAVE_LIBNX)) +#elif !defined(VITA) && !defined(PSP) && !defined(PS2) && !defined(ORBIS) && (!defined(SWITCH) || defined(HAVE_LIBNX)) if(ftruncate(fileno(stream->fp), length) != 0) return -1; #endif @@ -418,13 +551,22 @@ int64_t retro_vfs_file_tell_impl(libretro_vfs_implementation_file *stream) return -1; if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) + { +#ifdef ORBIS + int64_t ret = orbisLseek(stream->fd, 0, SEEK_CUR); + RARCH_LOG("[VFS]retro_vfs_file_tell_impl orbisLseek fd=%d path=%s ret=%d\n", stream->fd, stream->orig_path, ret); + if(ret < 0) + return -1; + return ret; +#else /* VC2005 and up have a special 64-bit ftell */ #ifdef ATLEAST_VC2005 return _ftelli64(stream->fp); #else return ftell(stream->fp); #endif - +#endif + } #ifdef HAVE_MMAP /* Need to check stream->mapped because this function * is called in filestream_open() */ @@ -437,7 +579,8 @@ int64_t retro_vfs_file_tell_impl(libretro_vfs_implementation_file *stream) return 0; } -int64_t retro_vfs_file_seek_impl(libretro_vfs_implementation_file *stream, int64_t offset, int seek_position) +int64_t retro_vfs_file_seek_impl(libretro_vfs_implementation_file *stream, + int64_t offset, int seek_position) { int whence = -1; switch (seek_position) @@ -456,14 +599,25 @@ int64_t retro_vfs_file_seek_impl(libretro_vfs_implementation_file *stream, int64 return retro_vfs_file_seek_internal(stream, offset, whence); } -int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream, void *s, uint64_t len) +int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream, + void *s, uint64_t len) { if (!stream || !s) goto error; if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) - return fread(s, 1, (size_t)len, stream->fp); + { +#ifdef ORBIS + int64_t ret = orbisRead(stream->fd, s, (size_t)len); + RARCH_LOG("[VFS]retro_vfs_file_read_impl orbisRead fd=%d path=%s bytesread=%d\n", stream->fd, stream->orig_path, ret); + if( ret < 0) + return -1; + return 0; +#else + return fread(s, 1, (size_t)len, stream->fp); +#endif + } #ifdef HAVE_MMAP if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS) { @@ -492,8 +646,19 @@ int64_t retro_vfs_file_write_impl(libretro_vfs_implementation_file *stream, cons goto error; if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) - return fwrite(s, 1, (size_t)len, stream->fp); + { +#ifdef ORBIS + int64_t ret = orbisWrite(stream->fd, s, (size_t)len); + RARCH_LOG("[VFS]retro_vfs_file_write_impl orbisWrite fd=%d path=%s byteswrite=%d\n", stream->fd, stream->orig_path, ret); + + if( ret < 0) + return -1; + return 0; +#else + return fwrite(s, 1, (size_t)len, stream->fp); +#endif + } #ifdef HAVE_MMAP if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS) goto error; @@ -508,7 +673,11 @@ int retro_vfs_file_flush_impl(libretro_vfs_implementation_file *stream) { if (!stream) return -1; +#ifdef ORBIS + return 0; +#else return fflush(stream->fp)==0 ? 0 : -1; +#endif } int retro_vfs_file_remove_impl(const char *path) @@ -546,9 +715,14 @@ int retro_vfs_file_remove_impl(const char *path) return 0; } #endif +#else +#ifdef ORBIS + /* stub for now */ + return 0; #else if (remove(path) == 0) return 0; +#endif #endif return -1; } @@ -609,9 +783,14 @@ int retro_vfs_file_rename_impl(const char *old_path, const char *new_path) free(new_path_wide); #endif return -1; +#else +#ifdef ORBIS + /* stub for now */ + return 0; #else return rename(old_path, new_path)==0 ? 0 : -1; #endif +#endif } const char *retro_vfs_file_get_path_impl(libretro_vfs_implementation_file *stream) @@ -621,3 +800,408 @@ const char *retro_vfs_file_get_path_impl(libretro_vfs_implementation_file *strea abort(); return stream->orig_path; } + + +int retro_vfs_stat_impl(const char *path, int32_t *size) +{ + bool is_dir, is_character_special; +#if defined(ORBIS) + return 0; /* for now */ +#endif +#if defined(VITA) || defined(PSP) + SceIoStat buf; + char *tmp = strdup(path); + size_t len = strlen(tmp); + if (tmp[len-1] == '/') + tmp[len-1] = '\0'; + + if (sceIoGetstat(tmp, &buf) < 0) + { + free(tmp); + return 0; + } + free(tmp); +#elif defined(PS2) + iox_stat_t buf; + char *tmp = strdup(path); + size_t len = strlen(tmp); + if (tmp[len-1] == '/') + tmp[len-1] = '\0'; + + if (fileXioGetStat(tmp, &buf) < 0) + { + free(tmp); + return 0; + } + free(tmp); +#elif defined(__CELLOS_LV2__) + CellFsStat buf; + if (cellFsStat(path, &buf) < 0) + return 0; +#elif defined(_WIN32) + DWORD file_info; + struct _stat buf; + char *path_local = NULL; + wchar_t *path_wide = NULL; + + if (!path || !*path) + return 0; + + (void)path_wide; + (void)path_local; + (void)file_info; + +#if defined(LEGACY_WIN32) + path_local = utf8_to_local_string_alloc(path); + file_info = GetFileAttributes(path_local); + + _stat(path_local, &buf); + + if (path_local) + free(path_local); +#else + path_wide = utf8_to_utf16_string_alloc(path); + file_info = GetFileAttributesW(path_wide); + + _wstat(path_wide, &buf); + + if (path_wide) + free(path_wide); +#endif + + if (file_info == INVALID_FILE_ATTRIBUTES) + return 0; +#else + struct stat buf; + if (stat(path, &buf) < 0) + return 0; +#endif + + if (size) +#if defined(PS2) + *size = (int32_t)buf.size; +#else + *size = (int32_t)buf.st_size; +#endif + +#if defined(VITA) || defined(PSP) + is_dir = FIO_S_ISDIR(buf.st_mode); +#elif defined(PS2) + is_dir = FIO_S_ISDIR(buf.mode); +#elif defined(__CELLOS_LV2__) + is_dir = ((buf.st_mode & S_IFMT) == S_IFDIR); +#elif defined(_WIN32) + is_dir = (file_info & FILE_ATTRIBUTE_DIRECTORY); +#else + is_dir = S_ISDIR(buf.st_mode); +#endif + +#if defined(VITA) || defined(PSP) || defined(PS2) || defined(__CELLOS_LV2__) || defined(_WIN32) + is_character_special = false; +#else + is_character_special = S_ISCHR(buf.st_mode); +#endif + + return RETRO_VFS_STAT_IS_VALID | (is_dir ? RETRO_VFS_STAT_IS_DIRECTORY : 0) | (is_character_special ? RETRO_VFS_STAT_IS_CHARACTER_SPECIAL : 0); +} + +static bool path_mkdir_error(int ret) +{ +#if defined(VITA) + return (ret == SCE_ERROR_ERRNO_EEXIST); +#elif defined(PSP) || defined(PS2) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(ORBIS) + return (ret == -1); +#else + return (ret < 0 && errno == EEXIST); +#endif +} + +int retro_vfs_mkdir_impl(const char *dir) +{ +#if defined(_WIN32) +#ifdef LEGACY_WIN32 + int ret = _mkdir(dir); +#else + wchar_t *dirW = utf8_to_utf16_string_alloc(dir); + int ret = -1; + + if (dirW) + { + ret = _wmkdir(dirW); + free(dirW); + } +#endif +#elif defined(IOS) + int ret = mkdir(dir, 0755); +#elif defined(VITA) || defined(PSP) + int ret = sceIoMkdir(dir, 0777); +#elif defined(PS2) + int ret =fileXioMkdir(dir, 0777); +#elif defined(ORBIS) + int ret =orbisMkdir(dir, 0755); +#elif defined(__QNX__) + int ret = mkdir(dir, 0777); +#else + int ret = mkdir(dir, 0750); +#endif + + if (path_mkdir_error(ret)) + return -2; + return ret < 0 ? -1 : 0; +} + +#ifdef VFS_FRONTEND +struct retro_vfs_dir_handle +#else +struct libretro_vfs_implementation_dir +#endif +{ + char* orig_path; +#if defined(_WIN32) +#if defined(LEGACY_WIN32) + WIN32_FIND_DATA entry; +#else + WIN32_FIND_DATAW entry; +#endif + HANDLE directory; + bool next; + char path[PATH_MAX_LENGTH]; +#elif defined(VITA) || defined(PSP) + SceUID directory; + SceIoDirent entry; +#elif defined(PS2) + int directory; + iox_dirent_t entry; +#elif defined(__CELLOS_LV2__) + CellFsErrno error; + int directory; + CellFsDirent entry; +#elif defined(ORBIS) + int directory; + struct dirent entry; +#else + DIR *directory; + const struct dirent *entry; +#endif +}; + +static bool dirent_check_error(libretro_vfs_implementation_dir *rdir) +{ +#if defined(_WIN32) + return (rdir->directory == INVALID_HANDLE_VALUE); +#elif defined(VITA) || defined(PSP) || defined(PS2) || defined(ORBIS) + return (rdir->directory < 0); +#elif defined(__CELLOS_LV2__) + return (rdir->error != CELL_FS_SUCCEEDED); +#else + return !(rdir->directory); +#endif +} + +libretro_vfs_implementation_dir *retro_vfs_opendir_impl(const char *name, bool include_hidden) +{ +#if defined(_WIN32) + char path_buf[1024]; + char *path_local = NULL; + wchar_t *path_wide = NULL; + unsigned path_len; +#endif + libretro_vfs_implementation_dir *rdir; + + /*Reject null or empty string paths*/ + if (!name||(*name==0)) + return NULL; + + /*Allocate RDIR struct. Tidied later with retro_closedir*/ + rdir = (libretro_vfs_implementation_dir*)calloc(1, sizeof(*rdir)); + if (!rdir) + return NULL; + + rdir->orig_path = strdup(name); + +#if defined(_WIN32) + (void)path_wide; + (void)path_local; + + path_buf[0] = '\0'; + path_len = strlen(name); + + /* Non-NT platforms don't like extra slashes in the path */ + if (name[path_len - 1] == '\\') + snprintf(path_buf, sizeof(path_buf), "%s*", name); + else + snprintf(path_buf, sizeof(path_buf), "%s\\*", name); + +#if defined(LEGACY_WIN32) + path_local = utf8_to_local_string_alloc(path_buf); + rdir->directory = FindFirstFile(path_local, &rdir->entry); + + if (path_local) + free(path_local); +#else + path_wide = utf8_to_utf16_string_alloc(path_buf); + rdir->directory = FindFirstFileW(path_wide, &rdir->entry); + + if (path_wide) + free(path_wide); +#endif + +#elif defined(VITA) || defined(PSP) + rdir->directory = sceIoDopen(name); +#elif defined(PS2) + rdir->directory = fileXioDopen(name); +#elif defined(_3DS) + rdir->directory = !string_is_empty(name) ? opendir(name) : NULL; + rdir->entry = NULL; +#elif defined(__CELLOS_LV2__) + rdir->error = cellFsOpendir(name, &rdir->directory); +#elif defined(ORBIS) + rdir->directory = orbisDopen(name); +#else + rdir->directory = opendir(name); + rdir->entry = NULL; +#endif + +#ifdef _WIN32 + if (include_hidden) + rdir->entry.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN; + else + rdir->entry.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN; +#endif + + if (rdir->directory && !dirent_check_error(rdir)) + return rdir; + + retro_vfs_closedir_impl(rdir); + return NULL; +} + +bool retro_vfs_readdir_impl(libretro_vfs_implementation_dir *rdir) +{ +#if defined(_WIN32) + if(rdir->next) +#if defined(LEGACY_WIN32) + return (FindNextFile(rdir->directory, &rdir->entry) != 0); +#else + return (FindNextFileW(rdir->directory, &rdir->entry) != 0); +#endif + + rdir->next = true; + return (rdir->directory != INVALID_HANDLE_VALUE); +#elif defined(VITA) || defined(PSP) + return (sceIoDread(rdir->directory, &rdir->entry) > 0); +#elif defined(PS2) + iox_dirent_t record; + int ret = fileXioDread(rdir->directory, &record); + rdir->entry = record; + return ( ret > 0); +#elif defined(__CELLOS_LV2__) + uint64_t nread; + rdir->error = cellFsReaddir(rdir->directory, &rdir->entry, &nread); + return (nread != 0); +#elif defined(ORBIS) + return (orbisDread(rdir->directory, &rdir->entry) > 0); +#else + return ((rdir->entry = readdir(rdir->directory)) != NULL); +#endif +} + +const char *retro_vfs_dirent_get_name_impl(libretro_vfs_implementation_dir *rdir) +{ +#if defined(_WIN32) +#if defined(LEGACY_WIN32) + char *name_local = local_to_utf8_string_alloc(rdir->entry.cFileName); + memset(rdir->entry.cFileName, 0, sizeof(rdir->entry.cFileName)); + strlcpy(rdir->entry.cFileName, name_local, sizeof(rdir->entry.cFileName)); + + if (name_local) + free(name_local); +#else + char *name = utf16_to_utf8_string_alloc(rdir->entry.cFileName); + memset(rdir->entry.cFileName, 0, sizeof(rdir->entry.cFileName)); + strlcpy((char*)rdir->entry.cFileName, name, sizeof(rdir->entry.cFileName)); + + if (name) + free(name); +#endif + return (char*)rdir->entry.cFileName; +#elif defined(VITA) || defined(PSP) || defined(__CELLOS_LV2__) || defined(ORBIS) + return rdir->entry.d_name; +#elif defined(PS2) + return rdir->entry.name; +#else + + return rdir->entry->d_name; +#endif +} + +bool retro_vfs_dirent_is_dir_impl(libretro_vfs_implementation_dir *rdir) +{ +#if defined(_WIN32) + const WIN32_FIND_DATA *entry = (const WIN32_FIND_DATA*)&rdir->entry; + return entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; +#elif defined(PSP) || defined(VITA) + const SceIoDirent *entry = (const SceIoDirent*)&rdir->entry; +#if defined(PSP) + return (entry->d_stat.st_attr & FIO_SO_IFDIR) == FIO_SO_IFDIR; +#elif defined(VITA) + return SCE_S_ISDIR(entry->d_stat.st_mode); +#endif +#elif defined(PS2) + const iox_dirent_t *entry = (const iox_dirent_t*)&rdir->entry; + return FIO_S_ISDIR(entry->stat.mode); +#elif defined(__CELLOS_LV2__) + CellFsDirent *entry = (CellFsDirent*)&rdir->entry; + return (entry->d_type == CELL_FS_TYPE_DIRECTORY); +#elif defined(ORBIS) + const struct dirent *entry = &rdir->entry; + if (entry->d_type==DT_DIR) + return true; + if (!(entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK)) + return false; +#else + struct stat buf; +#if defined(DT_DIR) + const struct dirent *entry = (const struct dirent*)rdir->entry; + if (entry->d_type == DT_DIR) + return true; + /* This can happen on certain file systems. */ + if (!(entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK)) + return false; +#endif + /* dirent struct doesn't have d_type, do it the slow way ... */ + char path[PATH_MAX_LENGTH]; + path[0] = '\0'; + fill_pathname_join(path, rdir->orig_path, retro_vfs_dirent_get_name_impl(rdir), sizeof(path)); + if (stat(path, &buf) < 0) + return false; + return S_ISDIR(buf.st_mode); +#endif +} + +int retro_vfs_closedir_impl(libretro_vfs_implementation_dir *rdir) +{ + if (!rdir) + return -1; + +#if defined(_WIN32) + if (rdir->directory != INVALID_HANDLE_VALUE) + FindClose(rdir->directory); +#elif defined(VITA) || defined(PSP) + sceIoDclose(rdir->directory); +#elif defined(PS2) + fileXioDclose(rdir->directory); +#elif defined(__CELLOS_LV2__) + rdir->error = cellFsClosedir(rdir->directory); +#elif defined(ORBIS) + orbisDclose(rdir->directory); +#else + if (rdir->directory) + closedir(rdir->directory); +#endif + + if (rdir->orig_path) + free(rdir->orig_path); + free(rdir); + return 0; +} diff --git a/libretro-common/vulkan/vulkan_symbol_wrapper.c b/libretro-common/vulkan/vulkan_symbol_wrapper.c index abf02dca3b..7fe13ea8b9 100644 --- a/libretro-common/vulkan/vulkan_symbol_wrapper.c +++ b/libretro-common/vulkan/vulkan_symbol_wrapper.c @@ -176,7 +176,6 @@ PFN_vkGetInstanceProcAddr vulkan_symbol_wrapper_instance_proc_addr(void) return GetInstanceProcAddr; } - VkBool32 vulkan_symbol_wrapper_load_instance_symbol(VkInstance instance, const char *name, PFN_vkVoidFunction *ppSymbol) { *ppSymbol = GetInstanceProcAddr(instance, name); diff --git a/libretro-db/bintree.c b/libretro-db/bintree.c index b080aa4f55..b68d391bf1 100644 --- a/libretro-db/bintree.c +++ b/libretro-db/bintree.c @@ -86,7 +86,6 @@ static int bintree_insert_internal(bintree_t *t, struct bintree_node *root, void return -EINVAL; } - static int bintree_iterate_internal(struct bintree_node *n, bintree_iter_cb cb, void *ctx) { diff --git a/libretro-db/c_converter.c b/libretro-db/c_converter.c index 3d2e2ac615..294164c437 100644 --- a/libretro-db/c_converter.c +++ b/libretro-db/c_converter.c @@ -64,7 +64,6 @@ typedef struct const char* fname; } dat_converter_token_t; - typedef struct dat_converter_map_t dat_converter_map_t; typedef struct dat_converter_list_t dat_converter_list_t; typedef union dat_converter_list_item_t dat_converter_list_item_t; @@ -100,7 +99,6 @@ union dat_converter_list_item_t dat_converter_list_t* list; }; - struct dat_converter_bt_node_t { int index; @@ -212,7 +210,6 @@ static dat_converter_bt_node_t* dat_converter_bt_node_insert( return NULL; } - static void dat_converter_list_append(dat_converter_list_t* dst, void* item) { if (dst->count == dst->capacity) diff --git a/libretro-db/query.c b/libretro-db/query.c index 47dc88f069..6bcb0e2f7a 100644 --- a/libretro-db/query.c +++ b/libretro-db/query.c @@ -353,7 +353,6 @@ static void query_raise_unexpected_char( *error = tmp_error_buff; } - static void query_argument_free(struct argument *arg) { unsigned i; @@ -399,7 +398,6 @@ static struct buffer query_chomp(struct buffer buff) return buff; } - static struct buffer query_expect_eof(struct buffer buff, const char ** error) { buff = query_chomp(buff); @@ -613,7 +611,6 @@ static struct buffer query_expect_char(struct buffer buff, return buff; } - static struct buffer query_parse_argument(struct buffer buff, struct argument *arg, const char **error) { diff --git a/libretro-db/rmsgpack.h b/libretro-db/rmsgpack.h index a3ffdcaffe..f8c2c8ba8f 100644 --- a/libretro-db/rmsgpack.h +++ b/libretro-db/rmsgpack.h @@ -58,4 +58,3 @@ int rmsgpack_write_uint(RFILE *fd, uint64_t value ); int rmsgpack_read(RFILE *fd, struct rmsgpack_read_callbacks *callbacks, void *data); #endif - diff --git a/managers/cheat_manager.c b/managers/cheat_manager.c index 9e979d09f2..40c8f3d191 100644 --- a/managers/cheat_manager.c +++ b/managers/cheat_manager.c @@ -52,6 +52,7 @@ #include "../input/input_driver.h" #include "../configuration.h" +cheat_manager_t cheat_manager_state; unsigned cheat_manager_get_buf_size(void) { @@ -227,7 +228,7 @@ bool cheat_manager_save(const char *path, const char *cheat_database, bool overw } - ret = config_file_write(conf, cheats_file); + ret = config_file_write(conf, cheats_file, true); config_file_free(conf); return ret; @@ -272,7 +273,6 @@ static void cheat_manager_new(unsigned size) { unsigned i; - cheat_manager_free(); cheat_manager_state.buf_size = size; @@ -413,7 +413,6 @@ bool cheat_manager_load(const char *path, bool append) config_file_free(conf); conf = NULL; - cheat_manager_alloc_if_empty(); if (append) @@ -433,7 +432,6 @@ bool cheat_manager_load(const char *path, bool append) cheat_manager_new(cheats); } - for (i = orig_size; i < cheats; i++) { cheat_manager_state.cheats[i].idx = i; @@ -461,12 +459,10 @@ error: return false; } - bool cheat_manager_realloc(unsigned new_size, unsigned default_handler) { unsigned i; - unsigned orig_size; - + unsigned orig_size = 0; if (!cheat_manager_state.cheats) { @@ -476,6 +472,7 @@ bool cheat_manager_realloc(unsigned new_size, unsigned default_handler) } else { + struct item_cheat *val = NULL; orig_size = cheat_manager_state.size; /* if size is decreasing, free the items that will be lost */ @@ -487,8 +484,12 @@ bool cheat_manager_realloc(unsigned new_size, unsigned default_handler) free(cheat_manager_state.cheats[i].desc); } - cheat_manager_state.cheats = (struct item_cheat*) - realloc(cheat_manager_state.cheats, new_size * sizeof(struct item_cheat)); + val = (struct item_cheat*) + realloc(cheat_manager_state.cheats, + new_size * sizeof(struct item_cheat)); + + if (val) + cheat_manager_state.cheats = val; } if (!cheat_manager_state.cheats) @@ -756,7 +757,15 @@ int cheat_manager_initialize_memory(rarch_setting_t *setting, bool wraparound) if (!cheat_manager_state.memory_size_list) cheat_manager_state.memory_size_list = (unsigned*)calloc(1, sizeof(unsigned)); else - cheat_manager_state.memory_size_list = (unsigned*)realloc(cheat_manager_state.memory_size_list, sizeof(unsigned) * cheat_manager_state.num_memory_buffers); + { + unsigned *val = (unsigned*)realloc( + cheat_manager_state.memory_size_list, + sizeof(unsigned) * + cheat_manager_state.num_memory_buffers); + + if (val) + cheat_manager_state.memory_size_list = val; + } cheat_manager_state.memory_buf_list[cheat_manager_state.num_memory_buffers-1] = (uint8_t*)system->mmaps.descriptors[i].core.ptr; cheat_manager_state.memory_size_list[cheat_manager_state.num_memory_buffers-1] = system->mmaps.descriptors[i].core.len; @@ -845,7 +854,6 @@ int cheat_manager_initialize_memory(rarch_setting_t *setting, bool wraparound) cheat_manager_state.memory_initialized = true; - runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_INIT_SUCCESS), 1, 180, true); #ifdef HAVE_MENU @@ -973,7 +981,6 @@ int cheat_manager_search(enum cheat_search_type search_type) return 0; } - cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits); /* little endian FF000000 = 256 */ diff --git a/managers/cheat_manager.h b/managers/cheat_manager.h index e941036a07..14243f0451 100644 --- a/managers/cheat_manager.h +++ b/managers/cheat_manager.h @@ -24,7 +24,6 @@ RETRO_BEGIN_DECLS - enum cheat_handler_type { CHEAT_HANDLER_TYPE_EMU = 0, @@ -187,7 +186,7 @@ struct cheat_manager typedef struct cheat_manager cheat_manager_t; -cheat_manager_t cheat_manager_state; +extern cheat_manager_t cheat_manager_state; unsigned cheat_manager_get_size(void); diff --git a/managers/core_option_manager.c b/managers/core_option_manager.c index a60554bfa6..87ea3e23ca 100644 --- a/managers/core_option_manager.c +++ b/managers/core_option_manager.c @@ -156,7 +156,6 @@ void core_option_manager_get(core_option_manager_t *opt, void *data) var->value = NULL; } - /** * core_option_manager_new: * @conf_path : Filesystem path to write core option config file to. @@ -253,7 +252,7 @@ bool core_option_manager_flush(core_option_manager_t *opt) } RARCH_LOG("Saved core options file to \"%s\"\n", opt->conf_path); - return config_file_write(opt->conf, opt->conf_path); + return config_file_write(opt->conf, opt->conf_path, true); } /** @@ -279,7 +278,7 @@ bool core_option_manager_flush_game_specific( core_option_manager_get_val(opt, i)); } - return config_file_write(opt->conf, path); + return config_file_write(opt->conf, path, true); } /** diff --git a/managers/state_manager.c b/managers/state_manager.c index 9b8f5515d0..fc6b512a6b 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -394,7 +394,6 @@ static void state_manager_raw_decompress(const void *patch, * This means that on average, ~2 * maxcompsize is * unused at any given moment. */ - /* These are called very few constant times per frame, * keep it as simple as possible. */ static INLINE void write_size_t(void *ptr, size_t val) @@ -660,7 +659,6 @@ void state_manager_event_init(unsigned rewind_buffer_size) state_manager_push_do(rewind_state.state); } - bool state_manager_frame_is_reversed(void) { return frame_is_reversed; diff --git a/menu/cbs/menu_cbs_cancel.c b/menu/cbs/menu_cbs_cancel.c index 4dba74ac47..f0102ea69d 100644 --- a/menu/cbs/menu_cbs_cancel.c +++ b/menu/cbs/menu_cbs_cancel.c @@ -34,8 +34,8 @@ int action_cancel_pop_default(const char *path, const char *label, unsigned type, size_t idx) { size_t new_selection_ptr; - const char *menu_label = NULL; - enum msg_hash_enums enum_idx = 0; + const char *menu_label = NULL; + enum msg_hash_enums enum_idx = MSG_UNKNOWN; (void)path; (void)label; @@ -159,7 +159,6 @@ int menu_cbs_init_bind_cancel(menu_file_list_cbs_t *cbs, if (!cbs) return -1; - BIND_ACTION_CANCEL(cbs, action_cancel_pop_default); if (menu_cbs_init_bind_cancel_compare_label(cbs, label) == 0) diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index 79e1aee9b2..64b6af9a01 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -246,7 +246,6 @@ end: return ret; } - #ifdef HAVE_LIBRETRODB static int deferred_push_cursor_manager_list_generic( menu_displaylist_info_t *info, enum database_query_type type) diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index a5ccd31733..624aedf633 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -70,7 +70,7 @@ static void menu_action_setting_audio_mixer_stream_name( *w = 19; strlcpy(s2, path, len2); - if (offset >= AUDIO_MIXER_MAX_STREAMS) + if (offset >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return; strlcpy(s, audio_driver_mixer_get_stream_name(offset), len); @@ -90,7 +90,7 @@ static void menu_action_setting_audio_mixer_stream_volume( *w = 19; strlcpy(s2, path, len2); - if (offset >= AUDIO_MIXER_MAX_STREAMS) + if (offset >= AUDIO_MIXER_MAX_SYSTEM_STREAMS) return; snprintf(s, len, "%.2f dB", audio_driver_mixer_get_stream_volume(offset)); @@ -501,7 +501,6 @@ static void menu_action_setting_disp_set_label_input_desc( else strlcpy(s, "---", len); - *w = 19; strlcpy(s2, path, len2); } diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 2fcb431cf5..19704f5320 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -234,7 +234,6 @@ static int action_left_mainmenu(unsigned type, const char *label, else push_list = 2; - switch (push_list) { case 1: diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 734408e440..d95f527b28 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -26,6 +26,10 @@ #include "../../config.h" #endif +#ifdef HAVE_DISCORD +#include "../../discord/discord.h" +#endif + #include "../../config.def.h" #include "../../config.def.keybinds.h" #include "../../wifi/wifi_driver.h" @@ -277,12 +281,14 @@ int generic_action_ok_displaylist_push(const char *path, enum msg_hash_enums enum_idx = MSG_UNKNOWN; settings_t *settings = config_get_ptr(); file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0); + char *menu_driver = settings->arrays.menu_driver; menu_displaylist_info_init(&info); info.list = menu_stack; - if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) + if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu) || + string_is_equal(menu_driver, "null")) goto end; tmp[0] = '\0'; @@ -1122,7 +1128,6 @@ static int file_load_with_detect_core_wrapper( PATH_MAX_LENGTH * sizeof(char))) ret = -1; - if ( !is_carchive && !string_is_empty(path) && !string_is_empty(menu_path_new)) fill_pathname_join(menu->detect_content_path, @@ -1546,7 +1551,6 @@ static int default_action_ok_load_content_from_playlist_from_menu(const char *_p return 0; } - #define default_action_ok_set(funcname, _id, _flush) \ static int (funcname)(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) \ { \ @@ -1657,7 +1661,6 @@ static int action_ok_file_load(const char *path, CORE_TYPE_PLAIN); } - static int action_ok_playlist_entry_collection(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -2026,7 +2029,10 @@ static int action_ok_audio_add_to_mixer(const char *path, if (filestream_exists(entry_path)) task_push_audio_mixer_load(entry_path, - NULL, NULL); + NULL, NULL, false, + AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC, + 0 + ); return 0; } @@ -2045,7 +2051,9 @@ static int action_ok_audio_add_to_mixer_and_play(const char *path, if (filestream_exists(entry_path)) task_push_audio_mixer_load_and_play(entry_path, - NULL, NULL); + NULL, NULL, false, + AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC, + 0); return 0; } @@ -2073,7 +2081,9 @@ static int action_ok_audio_add_to_mixer_and_collection(const char *path, if (filestream_exists(combined_path)) task_push_audio_mixer_load(combined_path, - NULL, NULL); + NULL, NULL, false, + AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC, + 0); return 0; } @@ -2101,7 +2111,9 @@ static int action_ok_audio_add_to_mixer_and_collection_and_play(const char *path if (filestream_exists(combined_path)) task_push_audio_mixer_load_and_play(combined_path, - NULL, NULL); + NULL, NULL, false, + AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC, + 0); return 0; } @@ -2151,7 +2163,6 @@ static void menu_input_wifi_cb(void *userdata, const char *passphrase) menu_input_dialog_end(); } - static void menu_input_st_string_cb_rename_entry(void *userdata, const char *str) { @@ -2170,7 +2181,6 @@ static void menu_input_st_string_cb_rename_entry(void *userdata, NULL); } - menu_input_dialog_end(); } @@ -2628,7 +2638,6 @@ static int action_ok_deferred_list_stub(const char *path, return 0; } - #if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) static int action_ok_set_switch_cpu_profile(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) @@ -3008,7 +3017,6 @@ static int action_ok_cheat_copy_before(const char *path, runloop_msg_queue_push(msg, 1, 180, true); - return 0 ; } @@ -3150,7 +3158,6 @@ static int action_ok_file_load_detect_core(const char *path, return 0; } - static int action_ok_load_state(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -3343,10 +3350,11 @@ static void cb_generic_dir_download(void *task_data, } /* expects http_transfer_t*, file_transfer_t* */ -static void cb_generic_download(void *task_data, +void cb_generic_download(void *task_data, void *user_data, const char *err) { char output_path[PATH_MAX_LENGTH]; + char buf[PATH_MAX_LENGTH]; #if defined(HAVE_COMPRESSION) && defined(HAVE_ZLIB) bool extract = true; #endif @@ -3423,6 +3431,14 @@ static void cb_generic_download(void *task_data, case MENU_ENUM_LABEL_CB_LAKKA_DOWNLOAD: dir_path = LAKKA_UPDATE_DIR; break; + case MENU_ENUM_LABEL_CB_DISCORD_AVATAR: + { + fill_pathname_application_special(buf, + PATH_MAX_LENGTH * sizeof(char), + APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS); + dir_path = buf; + break; + } default: RARCH_WARN("Unknown transfer type '%s' bailing out.\n", msg_hash_to_str(transf->enum_idx)); @@ -3495,6 +3511,10 @@ finish: RARCH_ERR("Download of '%s' failed: %s\n", (transf ? transf->path: "unknown"), err); } +#ifdef HAVE_DISCORD + else if (transf->enum_idx == MENU_ENUM_LABEL_CB_DISCORD_AVATAR) + discord_avatar_set_ready(true); +#endif if (data) { @@ -3508,7 +3528,6 @@ finish: } #endif - static int action_ok_download_generic(const char *path, const char *label, const char *menu_label, unsigned type, size_t idx, size_t entry_idx, @@ -3661,7 +3680,7 @@ static int action_ok_option_create(const char *path, return false; } - if (config_file_write(conf, game_path)) + if (config_file_write(conf, game_path, true)) { runloop_msg_queue_push( msg_hash_to_str(MSG_CORE_OPTIONS_FILE_CREATED_SUCCESSFULLY), @@ -3804,7 +3823,6 @@ static int action_ok_delete_entry(const char *path, return 0; } - static int action_ok_rdb_entry_submenu(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -4007,7 +4025,7 @@ static int action_ok_netplay_connect_room(const char *path, task_push_netplay_crc_scan(netplay_room_list[idx - 3].gamecrc, netplay_room_list[idx - 3].gamename, - tmp_hostname, netplay_room_list[idx - 3].corename); + tmp_hostname, netplay_room_list[idx - 3].corename, netplay_room_list[idx - 3].subsystem_name); #else return -1; @@ -4016,7 +4034,6 @@ static int action_ok_netplay_connect_room(const char *path, return 0; } - static int action_ok_netplay_lan_scan(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -4166,12 +4183,13 @@ void netplay_refresh_rooms_menu(file_list_t *list) static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const char *err) { + char *new_data = NULL; const char *path = NULL; const char *label = NULL; unsigned menu_type = 0; enum msg_hash_enums enum_idx = MSG_UNKNOWN; - http_transfer_data_t *data = (http_transfer_data_t*)task_data; + http_transfer_data_t *data = (http_transfer_data_t*)task_data; menu_entries_get_last_stack(&path, &label, &menu_type, &enum_idx, NULL); @@ -4183,7 +4201,12 @@ static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const cha if (!data || err) goto finish; - data->data = (char*)realloc(data->data, data->len + 1); + new_data = (char*)realloc(data->data, data->len + 1); + + if (!new_data) + goto finish; + + data->data = new_data; data->data[data->len] = '\0'; if (!strstr(data->data, file_path_str(FILE_PATH_NETPLAY_ROOM_LIST_URL))) @@ -4249,6 +4272,9 @@ static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const cha strlcpy(netplay_room_list[i].frontend, host->frontend, sizeof(netplay_room_list[i].frontend)); + strlcpy(netplay_room_list[i].subsystem_name, + host->subsystem_name, + sizeof(netplay_room_list[i].subsystem_name)); netplay_room_list[i].port = host->port; netplay_room_list[i].gamecrc = host->content_crc; @@ -4326,7 +4352,7 @@ static void netplay_lan_scan_callback(void *task_data, static int action_ok_push_netplay_refresh_rooms(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - char url [2048] = "http://newlobby.libretro.com/list/"; + char url [2048] = "http://lobby.libretro.com/list/"; #ifndef RARCH_CONSOLE task_push_netplay_lan_scan(netplay_lan_scan_callback); #endif @@ -4335,7 +4361,6 @@ static int action_ok_push_netplay_refresh_rooms(const char *path, } #endif - static int action_ok_scan_directory_list(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index f0f902a2c2..35661aef08 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -212,7 +212,6 @@ static int audio_mixer_stream_volume_right(unsigned type, const char *label, return 0; } - static int action_right_goto_tab(void) { menu_ctx_list_t list_info; diff --git a/menu/cbs/menu_cbs_select.c b/menu/cbs/menu_cbs_select.c index 155d6c105e..baf049bcbb 100644 --- a/menu/cbs/menu_cbs_select.c +++ b/menu/cbs/menu_cbs_select.c @@ -180,7 +180,7 @@ static int action_select_netplay_connect_room(const char *path, task_push_netplay_crc_scan(netplay_room_list[idx - 3].gamecrc, netplay_room_list[idx - 3].gamename, - tmp_hostname, netplay_room_list[idx - 3].corename); + tmp_hostname, netplay_room_list[idx - 3].corename, netplay_room_list[idx - 3].subsystem_name); return 0; } diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index 963b3c154f..1867101741 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -164,7 +164,6 @@ static int action_start_shader_pass(unsigned type, const char *label) return 0; } - static int action_start_shader_scale_pass(unsigned type, const char *label) { unsigned pass = type - MENU_SETTINGS_SHADER_PASS_SCALE_0; diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 20bdea1fed..1bd69f3765 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -26,6 +26,7 @@ #include #include +#include #ifndef BIND_ACTION_SUBLABEL #define BIND_ACTION_SUBLABEL(cbs, name) \ @@ -387,6 +388,7 @@ default_sublabel_macro(action_bind_sublabel_ozone_menu_color_theme, default_sublabel_macro(action_bind_sublabel_menu_use_preferred_system_color_theme, MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME) default_sublabel_macro(action_bind_sublabel_menu_wallpaper_opacity, MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY) default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY) +default_sublabel_macro(action_bind_sublabel_menu_horizontal_animation, MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION) default_sublabel_macro(action_bind_sublabel_menu_ribbon_enable, MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE) default_sublabel_macro(action_bind_sublabel_menu_font, MENU_ENUM_SUBLABEL_XMB_FONT) default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT) @@ -579,6 +581,31 @@ static int action_bind_sublabel_subsystem_add( return 0; } +static int action_bind_sublabel_subsystem_load( + file_list_t *list, + unsigned type, unsigned i, + const char *label, const char *path, + char *s, size_t len) +{ + unsigned j = 0; + char buf[4096]; + + buf[0] = '\0'; + + for (j = 0; j < content_get_subsystem_rom_id(); j++) + { + strlcat(buf, " ", sizeof(buf)); + strlcat(buf, path_basename(content_get_subsystem_rom(j)), sizeof(buf)); + if (j != content_get_subsystem_rom_id() - 1) + strlcat(buf, "\n", sizeof(buf)); + } + + if (!string_is_empty(buf)) + strlcpy(s, buf, len); + + return 0; +} + static int action_bind_sublabel_remap_kbd_sublabel( file_list_t *list, unsigned type, unsigned i, @@ -691,6 +718,7 @@ static int action_bind_sublabel_netplay_room( const char *core_ver = NULL; const char *frontend = NULL; const char *na = NULL; + const char *subsystem = NULL; /* This offset may cause issues if any entries are added to this menu */ unsigned offset = i - 3; @@ -704,15 +732,54 @@ static int action_bind_sublabel_netplay_room( core_ver = netplay_room_list[offset].coreversion; gamecrc = netplay_room_list[offset].gamecrc; frontend = netplay_room_list[offset].frontend; + subsystem = netplay_room_list[offset].subsystem_name; na = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE); - snprintf(s, len, - "RetroArch: %s (%s)\nCore: %s (%s)\nGame: %s (%08x)", - string_is_empty(ra_version) ? na : ra_version, - string_is_empty(frontend) ? na : frontend, - corename, core_ver, - !string_is_equal(gamename, na) ? gamename : na, - gamecrc); + if (string_is_empty(subsystem) || string_is_equal(subsystem, "N/A")) + { + snprintf(s, len, + "RetroArch: %s (%s)\nCore: %s (%s)\nGame: %s (%08x)", + string_is_empty(ra_version) ? na : ra_version, + string_is_empty(frontend) ? na : frontend, + corename, core_ver, + !string_is_equal(gamename, na) ? gamename : na, + gamecrc); + } + else + { + if (strstr(gamename, "|")) + { + char buf[4096]; + unsigned i = 0; + struct string_list *list = string_split(gamename, "|"); + + buf[0] = '\0'; + for (i = 0; i < list->size; i++) + { + strlcat(buf, " ", sizeof(buf)); + strlcat(buf, list->elems[i].data, sizeof(buf)); + strlcat(buf, "\n", sizeof(buf)); + } + snprintf(s, len, + "RetroArch: %s (%s)\nCore: %s (%s)\nSubsystem: %s\nGames:\n%s", + string_is_empty(ra_version) ? na : ra_version, + string_is_empty(frontend) ? na : frontend, + corename, core_ver, subsystem, + !string_is_equal(gamename, na) ? buf : na + ); + string_list_free(list); + } + else + { + snprintf(s, len, + "RetroArch: %s (%s)\nCore: %s (%s)\nSubsystem: %s\nGame: %s (%08x)", + string_is_empty(ra_version) ? na : ra_version, + string_is_empty(frontend) ? na : frontend, + corename, core_ver, subsystem, + !string_is_equal(gamename, na) ? gamename : na, + gamecrc); + } + } #if 0 strlcpy(s, corename, len); #endif @@ -1137,6 +1204,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_framebuffer_opacity); break; + case MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_horizontal_animation); + break; case MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_wallpaper_opacity); break; @@ -1171,6 +1241,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_SUBSYSTEM_ADD: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_subsystem_add); break; + case MENU_ENUM_LABEL_SUBSYSTEM_LOAD: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_subsystem_load); + break; case MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_disk_cycle_tray_status); break; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 9099662cd8..2319275737 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -608,7 +608,6 @@ static void materialui_compute_entries_box(materialui_handle_t* mui, int width) menu_entry_init(&entry); menu_entry_get(&entry, 0, i, NULL, true); - sublabel_str = menu_entry_get_sublabel(&entry); menu_entry_free(&entry); @@ -998,7 +997,6 @@ static void materialui_render_menu_list( } } - static size_t materialui_list_get_size(void *data, enum menu_list_type type) { switch (type) @@ -2092,7 +2090,6 @@ static int materialui_list_push(void *data, void *userdata, menu_displaylist_setting(&entry); #else { - settings_t *settings = config_get_ptr(); if (settings->bools.menu_show_online_updater) { entry.enum_idx = MENU_ENUM_LABEL_ONLINE_UPDATER; @@ -2205,7 +2202,6 @@ static int materialui_pointer_down(void *userdata, menu_navigation_set_selection(ii); } - } return 0; @@ -2352,7 +2348,6 @@ static void materialui_list_insert(void *userdata, node->texture_switch2_index = MUI_TEXTURE_DATABASE; node->texture_switch2_set = true; break; - case 32: /* TODO: Need to find out what this is */ case FILE_TYPE_RDB_ENTRY: node->texture_switch2_index = MUI_TEXTURE_SETTINGS; node->texture_switch2_set = true; diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index b6e5154619..3d687af322 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -117,7 +117,6 @@ error: return NULL; } - static void nk_menu_input_gamepad(nk_menu_handle_t *nk) { switch (nk->action) @@ -195,7 +194,6 @@ static void nk_menu_main(nk_menu_handle_t *nk) nk_buffer_info(&nk->status, &nk->ctx.memory); } - static void nk_menu_frame(void *data, video_frame_info_t *video_info) { unsigned ticker_limit, i; @@ -212,7 +210,6 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info) 0.98, 0.98, 0.98, 1, }; - for (i = 0; i < 16; i++) { coord_black[i] = 0; diff --git a/menu/drivers/nuklear/nk_common.c b/menu/drivers/nuklear/nk_common.c index 61800585fd..5bf0875a0b 100644 --- a/menu/drivers/nuklear/nk_common.c +++ b/menu/drivers/nuklear/nk_common.c @@ -201,7 +201,6 @@ void nk_common_device_draw(struct nk_device *dev, menu_display_blend_begin(); - #if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) glActiveTexture(GL_TEXTURE0); #endif @@ -307,4 +306,3 @@ void nk_common_mem_free(nk_handle unused, void *ptr) (void)unused; free(ptr); } - diff --git a/menu/drivers/null.c b/menu/drivers/null.c index 55a6bdc5f3..9022267cb1 100644 --- a/menu/drivers/null.c +++ b/menu/drivers/null.c @@ -22,18 +22,54 @@ #include "../menu_driver.h" +static bool g_menu_on = false; + +static void* null_init(void **userdata, bool video_is_threaded) +{ + menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu)); + + if (!menu) + return NULL; + + return menu; +} + +static void null_free(void *data) +{ + menu_handle_t *menu = (menu_handle_t*)data; + + /*if (menu) + free(menu);*/ +} + +static void null_toggle(void *userdata, bool menu_on) +{ + (void)userdata; + + g_menu_on = menu_on; +} + +static int null_menu_iterate(menu_handle_t *menu, void *userdata, enum menu_action action) +{ + (void)menu; + (void)userdata; + (void)action; + + return 1; +} + menu_ctx_driver_t menu_ctx_null = { NULL, /* set_texture */ NULL, /* render_messagebox */ - NULL, /* iterate */ + null_menu_iterate, NULL, /* render */ NULL, /* frame */ - NULL, /* init */ - NULL, /* free */ + null_init, + null_free, NULL, /* context_reset */ NULL, /* context_destroy */ NULL, /* populate_entries */ - NULL, /* toggle */ + null_toggle, NULL, /* navigation_clear */ NULL, /* navigation_decrement */ NULL, /* navigation_increment */ diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index fa9fd08a87..957a30cfc8 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -23,6 +23,10 @@ #include "ozone_texture.h" #include "ozone_sidebar.h" +#if 0 +#include "discord/discord.h" +#endif + #include #include #include @@ -118,7 +122,7 @@ static void *ozone_init(void **userdata, bool video_is_threaded) menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu)); if (!menu) - return false; + return NULL; if (!menu_display_init_first_driver(video_is_threaded)) goto error; @@ -348,14 +352,36 @@ static void ozone_context_reset(void *data, bool is_threaded) for (i = 0; i < OZONE_TEXTURE_LAST; i++) { char filename[PATH_MAX_LENGTH]; - strlcpy(filename, OZONE_TEXTURES_FILES[i], sizeof(filename)); +#if 0 + if (i == OZONE_TEXTURE_DISCORD_OWN_AVATAR && discord_avatar_is_ready()) + strlcpy(filename, discord_get_own_avatar(), sizeof(filename)); + else +#endif + strlcpy(filename, OZONE_TEXTURES_FILES[i], sizeof(filename)); + strlcat(filename, ".png", sizeof(filename)); - if (!menu_display_reset_textures_list(filename, ozone->png_path, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR)) +#if 0 + if (i == OZONE_TEXTURE_DISCORD_OWN_AVATAR && discord_avatar_is_ready()) { - ozone->has_all_assets = false; - RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->png_path, path_default_slash(), filename); + char buf[PATH_MAX_LENGTH]; + fill_pathname_application_special(buf, + sizeof(buf), + APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS); + if (!menu_display_reset_textures_list(filename, buf, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR)) + RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->png_path, path_default_slash(), filename); } + else + { +#endif + if (!menu_display_reset_textures_list(filename, ozone->png_path, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR)) + { + ozone->has_all_assets = false; + RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->png_path, path_default_slash(), filename); + } +#if 0 + } +#endif } /* Sidebar textures */ @@ -930,7 +956,12 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i /* Icon */ menu_display_blend_begin(video_info); - ozone_draw_icon(video_info, 60, 60, ozone->textures[OZONE_TEXTURE_RETROARCH], 47, 14, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon); +#if 0 + if (discord_avatar_is_ready()) + ozone_draw_icon(video_info, 60, 60, ozone->textures[OZONE_TEXTURE_DISCORD_OWN_AVATAR], 47, 14, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon); + else +#endif + ozone_draw_icon(video_info, 60, 60, ozone->textures[OZONE_TEXTURE_RETROARCH], 47, 14, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon); menu_display_blend_end(video_info); /* Battery */ @@ -1117,6 +1148,16 @@ static void ozone_frame(void *data, video_frame_info_t *video_info) bool draw_osk = menu_input_dialog_get_display_kb(); static bool draw_osk_old = false; +#if 0 + static bool reset = false; + + if (discord_avatar_is_ready() && !reset) + { + ozone_context_reset(data, false); + reset = true; + } +#endif + menu_animation_ctx_entry_t entry; if (!ozone) diff --git a/menu/drivers/ozone/ozone_sidebar.c b/menu/drivers/ozone/ozone_sidebar.c index a6d51dfb40..2883a5fc18 100644 --- a/menu/drivers/ozone/ozone_sidebar.c +++ b/menu/drivers/ozone/ozone_sidebar.c @@ -370,7 +370,6 @@ void ozone_sidebar_goto(ozone_handle_t *ozone, unsigned new_selection) } } - void ozone_change_tab(ozone_handle_t *ozone, enum msg_hash_enums tab, enum menu_settings_type type) @@ -424,16 +423,7 @@ void ozone_init_horizontal_list(ozone_handle_t *ozone) if (settings->bools.menu_content_show_playlists && !string_is_empty(info.path)) { if (menu_displaylist_ctl(DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL, &info)) - { - size_t i; - for (i = 0; i < ozone->horizontal_list->size; i++) - { - ozone_node_t *node = ozone_alloc_node(); - file_list_set_userdata(ozone->horizontal_list, i, node); - } - menu_displaylist_process(&info); - } } menu_displaylist_info_free(&info); diff --git a/menu/drivers/ozone/ozone_texture.c b/menu/drivers/ozone/ozone_texture.c index 3b3414dcdc..d131167d83 100644 --- a/menu/drivers/ozone/ozone_texture.c +++ b/menu/drivers/ozone/ozone_texture.c @@ -79,7 +79,6 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RDB]; - /* Menu collection submenus*/ case MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_ZIP]; @@ -150,6 +149,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_HELP]; case MENU_ENUM_LABEL_QUIT_RETROARCH: + case MENU_ENUM_LABEL_BLOCK_SRAM_OVERWRITE: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_EXIT]; /* Settings icons*/ case MENU_ENUM_LABEL_DRIVER_SETTINGS: @@ -178,6 +178,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_INPUT_USER_14_BINDS: case MENU_ENUM_LABEL_INPUT_USER_15_BINDS: case MENU_ENUM_LABEL_INPUT_USER_16_BINDS: + case MENU_ENUM_LABEL_START_NET_RETROPAD: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS]; case MENU_ENUM_LABEL_LATENCY_SETTINGS: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_LATENCY]; @@ -191,6 +192,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_LOGGING_SETTINGS: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_LOG]; case MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS: + case MENU_ENUM_LABEL_FASTFORWARD_RATIO: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FRAMESKIP]; case MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING: case MENU_ENUM_LABEL_RECORDING_SETTINGS: @@ -258,6 +260,8 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG: case MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS: case MENU_ENUM_LABEL_RESTART_RETROARCH: + case MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE: + case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD]; case MENU_ENUM_LABEL_SHUTDOWN: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SHUTDOWN]; @@ -269,6 +273,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET: case MENU_ENUM_LABEL_CHEAT_FILE_LOAD: case MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND: + case MENU_ENUM_LABEL_SAVESTATE_AUTO_LOAD: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_LOADSTATE]; case MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES: case MENU_ENUM_LABEL_SHADER_APPLY_CHANGES: @@ -281,7 +286,14 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_TOGGLE: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_TOGGLE]; case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD: + case MENU_ENUM_LABEL_SAVESTATE_AUTO_INDEX: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_COG]; + case MENU_ENUM_LABEL_SAVESTATE_AUTO_SAVE: + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVESTATE]; + case MENU_ENUM_LABEL_SLOWMOTION_RATIO: + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RESUME]; + case MENU_ENUM_LABEL_START_VIDEO_PROCESSOR: + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MOVIE]; default: break; } @@ -385,26 +397,40 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone, (type <= MENU_SETTINGS_INPUT_DESC_END) ) { + /* This part is only utilized by Input User # Binds */ unsigned input_id; if (type < MENU_SETTINGS_INPUT_DESC_BEGIN) { input_id = MENU_SETTINGS_INPUT_BEGIN; + if ( type == input_id + 1) + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC]; if ( type == input_id + 2) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS]; + if ( type == input_id + 3) + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL]; if ( type == input_id + 4) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD]; if ( type == input_id + 5) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVING]; + if ( type == input_id + 6) + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE]; + if ((type > (input_id + 30)) && (type < (input_id + 42))) + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN]; + if ( type == input_id + 42) + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO]; + /* align to use the same code of Quickmenu controls*/ input_id = input_id + 7; } else { + /* Quickmenu controls repeats the same icons for all users*/ input_id = MENU_SETTINGS_INPUT_DESC_BEGIN; while (type > (input_id + 23)) { input_id = (input_id + 24) ; } } + /* This is utilized for both Input Binds and Quickmenu controls*/ if ( type == input_id ) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D]; if ( type == (input_id + 1)) @@ -683,6 +709,16 @@ switch (id) return "menu_apply_toggle.png"; case OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_COG: return "menu_apply_cog.png"; + case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC: + return "input_ADC.png"; + case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL: + return "input_BIND_ALL.png"; + case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE: + return "input_MOUSE.png"; + case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN: + return "input_LGUN.png"; + case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO: + return "input_TURBO.png"; } return NULL; } diff --git a/menu/drivers/ozone/ozone_texture.h b/menu/drivers/ozone/ozone_texture.h index 5441732378..bc01aa4283 100644 --- a/menu/drivers/ozone/ozone_texture.h +++ b/menu/drivers/ozone/ozone_texture.h @@ -28,11 +28,13 @@ enum OZONE_TEXTURE { OZONE_TEXTURE_RETROARCH = 0, OZONE_TEXTURE_CURSOR_BORDER, - +#if 0 + OZONE_TEXTURE_DISCORD_OWN_AVATAR, +#endif OZONE_TEXTURE_LAST }; -static char *OZONE_TEXTURES_FILES[OZONE_TEXTURE_LAST] = { +static const char *OZONE_TEXTURES_FILES[OZONE_TEXTURE_LAST] = { "retroarch", "cursor_border" }; @@ -49,7 +51,7 @@ enum OZONE_THEME_TEXTURES { OZONE_THEME_TEXTURE_LAST }; -static char *OZONE_THEME_TEXTURES_FILES[OZONE_THEME_TEXTURE_LAST] = { +static const char *OZONE_THEME_TEXTURES_FILES[OZONE_THEME_TEXTURE_LAST] = { "button_a", "button_b", "switch", @@ -72,7 +74,7 @@ enum OZONE_TAB_TEXTURES { OZONE_TAB_TEXTURE_LAST }; -static char *OZONE_TAB_TEXTURES_FILES[OZONE_TAB_TEXTURE_LAST] = { +static const char *OZONE_TAB_TEXTURES_FILES[OZONE_TAB_TEXTURE_LAST] = { "retroarch", "settings", "history", @@ -198,6 +200,11 @@ enum OZONE_ENTRIES_ICONS_TEXTURE_PAUSE, OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_TOGGLE, OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_COG, + OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC, + OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL, + OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE, + OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN, + OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO, OZONE_ENTRIES_ICONS_TEXTURE_LAST }; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 5c172a6f3c..48cb9d0e00 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -53,6 +53,348 @@ #define RGUI_TERM_WIDTH(width) (((width - RGUI_TERM_START_X(width) - RGUI_TERM_START_X(width)) / (FONT_WIDTH_STRIDE))) #define RGUI_TERM_HEIGHT(width, height) (((height - RGUI_TERM_START_Y(height) - RGUI_TERM_START_X(width)) / (FONT_HEIGHT_STRIDE)) - 1) +typedef struct +{ + uint32_t hover_color; + uint32_t normal_color; + uint32_t title_color; + uint32_t bg_dark_color; + uint32_t bg_light_color; + uint32_t border_dark_color; + uint32_t border_light_color; +} rgui_theme_t; + +static const rgui_theme_t rgui_theme_classic_red = { + 0xFFFF362B, /* hover_color */ + 0xFFFFFFFF, /* normal_color */ + 0xFFFF362B, /* title_color */ + 0xC0202020, /* bg_dark_color */ + 0xC0404040, /* bg_light_color */ + 0xC08C0000, /* border_dark_color */ + 0xC0CC0E03 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_classic_orange = { + 0xFFF87217, /* hover_color */ + 0xFFFFFFFF, /* normal_color */ + 0xFFF87217, /* title_color */ + 0xC0202020, /* bg_dark_color */ + 0xC0404040, /* bg_light_color */ + 0xC0962800, /* border_dark_color */ + 0xC0E46C03 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_classic_yellow = { + 0xFFFFD801, /* hover_color */ + 0xFFFFFFFF, /* normal_color */ + 0xFFFFD801, /* title_color */ + 0xC0202020, /* bg_dark_color */ + 0xC0404040, /* bg_light_color */ + 0xC0AC7800, /* border_dark_color */ + 0xC0F3C60D /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_classic_green = { + 0xFF64FF64, /* hover_color */ + 0xFFFFFFFF, /* normal_color */ + 0xFF64FF64, /* title_color */ + 0xC0202020, /* bg_dark_color */ + 0xC0404040, /* bg_light_color */ + 0xC0204020, /* border_dark_color */ + 0xC0408040 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_classic_blue = { + 0xFF48BEFF, /* hover_color */ + 0xFFFFFFFF, /* normal_color */ + 0xFF48BEFF, /* title_color */ + 0xC0202020, /* bg_dark_color */ + 0xC0404040, /* bg_light_color */ + 0xC0005BA6, /* border_dark_color */ + 0xC02E94E2 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_classic_violet = { + 0xFFD86EFF, /* hover_color */ + 0xFFFFFFFF, /* normal_color */ + 0xFFD86EFF, /* title_color */ + 0xC0202020, /* bg_dark_color */ + 0xC0404040, /* bg_light_color */ + 0xC04C0A60, /* border_dark_color */ + 0xC0842DCE /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_classic_grey = { + 0xFFB6C1C7, /* hover_color */ + 0xFFFFFFFF, /* normal_color */ + 0xFFB6C1C7, /* title_color */ + 0xC0202020, /* bg_dark_color */ + 0xC0404040, /* bg_light_color */ + 0xC0505050, /* border_dark_color */ + 0xC0798A99 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_legacy_red = { + 0xFFFFBDBD, /* hover_color */ + 0xFFFAF6D5, /* normal_color */ + 0xFFFF948A, /* title_color */ + 0xC09E4137, /* bg_dark_color */ + 0xC0B34B41, /* bg_light_color */ + 0xC0BF5E58, /* border_dark_color */ + 0xC0F27A6F /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_dark_purple = { + 0xFFF2B5D6, /* hover_color */ + 0xFFE8D0CC, /* normal_color */ + 0xFFC79FC2, /* title_color */ + 0xC0562D56, /* bg_dark_color */ + 0xC0663A66, /* bg_light_color */ + 0xC0885783, /* border_dark_color */ + 0xC0A675A1 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_midnight_blue = { + 0xFFB2D3ED, /* hover_color */ + 0xFFD3DCDE, /* normal_color */ + 0xFF86A1BA, /* title_color */ + 0xC024374A, /* bg_dark_color */ + 0xC03C4D5E, /* bg_light_color */ + 0xC046586A, /* border_dark_color */ + 0xC06D7F91 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_golden = { + 0xFFFFE666, /* hover_color */ + 0xFFFFFFDC, /* normal_color */ + 0xFFFFCC00, /* title_color */ + 0xC0B88D0B, /* bg_dark_color */ + 0xC0BF962B, /* bg_light_color */ + 0xC0e1ad21, /* border_dark_color */ + 0xC0FCC717 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_electric_blue = { + 0xFF7DF9FF, /* hover_color */ + 0xFFDBE9F4, /* normal_color */ + 0xFF86CDE0, /* title_color */ + 0xC02E69C6, /* bg_dark_color */ + 0xC0007FFF, /* bg_light_color */ + 0xC034A5D8, /* border_dark_color */ + 0xC070C9FF /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_apple_green = { + 0xFFB0FC64, /* hover_color */ + 0xFFD8F2CB, /* normal_color */ + 0xFFA6D652, /* title_color */ + 0xC04F7942, /* bg_dark_color */ + 0xC0688539, /* bg_light_color */ + 0xC0608E3A, /* border_dark_color */ + 0xC09AB973 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_volcanic_red = { + 0xFFFFCC99, /* hover_color */ + 0xFFD3D3D3, /* normal_color */ + 0xFFDDADAF, /* title_color */ + 0xC0922724, /* bg_dark_color */ + 0xC0BD0F1E, /* bg_light_color */ + 0xC0CE2029, /* border_dark_color */ + 0xC0FF0000 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_lagoon = { + 0xFFBCE1EB, /* hover_color */ + 0xFFCFCFC4, /* normal_color */ + 0xFF86C7C7, /* title_color */ + 0xC0495C6B, /* bg_dark_color */ + 0xC0526778, /* bg_light_color */ + 0xC058848F, /* border_dark_color */ + 0xC060909C /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_brogrammer = { + 0xFF3498DB, /* hover_color */ + 0xFFECF0F1, /* normal_color */ + 0xFF2ECC71, /* title_color */ + 0xC0242424, /* bg_dark_color */ + 0xC0242424, /* bg_light_color */ + 0xC0E74C3C, /* border_dark_color */ + 0xC0E74C3C /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_dracula = { + 0xFFBD93F9, /* hover_color */ + 0xFFF8F8F2, /* normal_color */ + 0xFFFF79C6, /* title_color */ + 0xC02F3240, /* bg_dark_color */ + 0xC02F3240, /* bg_light_color */ + 0xC06272A4, /* border_dark_color */ + 0xC06272A4 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_fairyfloss = { + 0xFFFFF352, /* hover_color */ + 0xFFF8F8F2, /* normal_color */ + 0xFFFFB8D1, /* title_color */ + 0xC0675F87, /* bg_dark_color */ + 0xC0675F87, /* bg_light_color */ + 0xC08077A8, /* border_dark_color */ + 0xC08077A8 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_flatui = { + 0xFF0A74B9, /* hover_color */ + 0xFF2C3E50, /* normal_color */ + 0xFF8E44AD, /* title_color */ + 0xE0ECF0F1, /* bg_dark_color */ + 0xE0ECF0F1, /* bg_light_color */ + 0xE095A5A6, /* border_dark_color */ + 0xE095A5A6 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_gruvbox_dark = { + 0xFFFE8019, /* hover_color */ + 0xFFEBDBB2, /* normal_color */ + 0xFF83A598, /* title_color */ + 0xC03D3D3D, /* bg_dark_color */ + 0xC03D3D3D, /* bg_light_color */ + 0xC099897A, /* border_dark_color */ + 0xC099897A /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_gruvbox_light = { + 0xFFAF3A03, /* hover_color */ + 0xFF3C3836, /* normal_color */ + 0xFF076678, /* title_color */ + 0xE0FBEBC7, /* bg_dark_color */ + 0xE0FBEBC7, /* bg_light_color */ + 0xE0928374, /* border_dark_color */ + 0xE0928374 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_hacking_the_kernel = { + 0xFF83FF83, /* hover_color */ + 0xFF00E000, /* normal_color */ + 0xFF00FF00, /* title_color */ + 0xC0000000, /* bg_dark_color */ + 0xC0000000, /* bg_light_color */ + 0xC0036303, /* border_dark_color */ + 0xC0036303 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_nord = { + 0xFF8FBCBB, /* hover_color */ + 0xFFD8DEE9, /* normal_color */ + 0xFF81A1C1, /* title_color */ + 0xC0363C4F, /* bg_dark_color */ + 0xC0363C4F, /* bg_light_color */ + 0xC04E596E, /* border_dark_color */ + 0xC04E596E /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_nova = { + 0XFF7FC1CA, /* hover_color */ + 0XFFC5D4DD, /* normal_color */ + 0XFF9A93E1, /* title_color */ + 0xC0485B66, /* bg_dark_color */ + 0xC0485B66, /* bg_light_color */ + 0xC0627985, /* border_dark_color */ + 0xC0627985 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_one_dark = { + 0XFF98C379, /* hover_color */ + 0XFFBBBBBB, /* normal_color */ + 0XFFD19A66, /* title_color */ + 0xC02D323B, /* bg_dark_color */ + 0xC02D323B, /* bg_light_color */ + 0xC0495162, /* border_dark_color */ + 0xC0495162 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_palenight = { + 0xFFC792EA, /* hover_color */ + 0xFFBFC7D5, /* normal_color */ + 0xFF82AAFF, /* title_color */ + 0xC02F3347, /* bg_dark_color */ + 0xC02F3347, /* bg_light_color */ + 0xC0697098, /* border_dark_color */ + 0xC0697098 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_solarized_dark = { + 0xFFB58900, /* hover_color */ + 0xFF839496, /* normal_color */ + 0xFF268BD2, /* title_color */ + 0xC0003542, /* bg_dark_color */ + 0xC0003542, /* bg_light_color */ + 0xC093A1A1, /* border_dark_color */ + 0xC093A1A1 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_solarized_light = { + 0xFFB58900, /* hover_color */ + 0xFF657B83, /* normal_color */ + 0xFF268BD2, /* title_color */ + 0xE0FDEDDF, /* bg_dark_color */ + 0xE0FDEDDF, /* bg_light_color */ + 0xE093A1A1, /* border_dark_color */ + 0xE093A1A1 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_tango_dark = { + 0xFF8AE234, /* hover_color */ + 0xFFEEEEEC, /* normal_color */ + 0xFF729FCF, /* title_color */ + 0xC0384042, /* bg_dark_color */ + 0xC0384042, /* bg_light_color */ + 0xC06A767A, /* border_dark_color */ + 0xC06A767A /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_tango_light = { + 0xFF4E9A06, /* hover_color */ + 0xFF2E3436, /* normal_color */ + 0xFF204A87, /* title_color */ + 0xE0EEEEEC, /* bg_dark_color */ + 0xE0EEEEEC, /* bg_light_color */ + 0xE0C7C7C7, /* border_dark_color */ + 0xE0C7C7C7 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_zenburn = { + 0xFFF0DFAF, /* hover_color */ + 0xFFDCDCCC, /* normal_color */ + 0xFF8FB28F, /* title_color */ + 0xC04F4F4F, /* bg_dark_color */ + 0xC04F4F4F, /* bg_light_color */ + 0xC0636363, /* border_dark_color */ + 0xC0636363 /* border_light_color */ +}; + +static const rgui_theme_t rgui_theme_anti_zenburn = { + 0xFF336C6C, /* hover_color */ + 0xFF232333, /* normal_color */ + 0xFF205070, /* title_color */ + 0xE0C0C0C0, /* bg_dark_color */ + 0xE0C0C0C0, /* bg_light_color */ + 0xE0A0A0A0, /* border_dark_color */ + 0xE0A0A0A0 /* border_light_color */ +}; + +typedef struct +{ + uint16_t hover_color; + uint16_t normal_color; + uint16_t title_color; + uint16_t bg_dark_color; + uint16_t bg_light_color; + uint16_t border_dark_color; + uint16_t border_light_color; +} rgui_colors_t; + typedef struct { bool bg_modified; @@ -65,75 +407,104 @@ typedef struct bool border_thickness; float scroll_y; char *msgbox; + unsigned color_theme; + rgui_colors_t colors; } rgui_t; static uint16_t *rgui_framebuf_data = NULL; -/* Note: if we knew what colour format each of these - * special cases required, we could do away with all - * this nonsense and handle it inside a single colour - * conversion function... - * In the meantime, we'll use the existing obfuscated - * values for all the non-standard platforms, and leave - * it messy... */ -#if defined(GEKKO) || defined(PSP) +#if defined(PS2) -/* Is this supposed to be 4444 ABGR? - * Have no idea what's going on here, so have to use - * fixed colour values... */ -#define HOVER_COLOR(settings) ((3 << 0) | (10 << 4) | (3 << 8) | (7 << 12)) -#define NORMAL_COLOR(settings) 0x7FFF -#define TITLE_COLOR(settings) HOVER_COLOR(settings) -#define BG_DARK_COLOR(settings) ((6 << 12) | (1 << 8) | (1 << 4) | (1 << 0)) -#define BG_LIGHT_COLOR(settings) ((6 << 12) | (2 << 8) | (2 << 4) | (2 << 0)) -#define BORDER_DARK_COLOR(settings) ((6 << 12) | (1 << 8) | (1 << 5) | (1 << 0)) -#define BORDER_LIGHT_COLOR(settings) ((6 << 12) | (2 << 8) | (2 << 5) | (2 << 0)) +static uint16_t argb32_to_abgr1555(uint32_t col) +{ + /* Extract colour components */ + unsigned a = (col >> 24) & 0xff; + unsigned r = (col >> 16) & 0xff; + unsigned g = (col >> 8) & 0xff; + unsigned b = col & 0xff; + /* Background and border colours are normally semi-transparent + * (so we can see suspended content when opening the quick menu). + * When no content is loaded, the 'image' behind the RGUI background + * and border is black - which has the effect of darkening the + * perceived background/border colours. All the preset theme (and + * default 'custom') colour values have been adjusted to account for + * this, but abgr1555 only has a 1 bit alpha channel. This means all + * colours become fully opaque, and consequently backgrounds/borders + * become abnormally bright. + * We therefore have to darken each RGB value according to the alpha + * component of the input colour... */ + float a_factor = (float)a * (1.0 / 255.0); + r = (unsigned)(((float)r * a_factor) + 0.5) & 0xff; + g = (unsigned)(((float)g * a_factor) + 0.5) & 0xff; + b = (unsigned)(((float)b * a_factor) + 0.5) & 0xff; + /* Convert from 8 bit to 5 bit */ + r = r >> 3; + g = g >> 3; + b = b >> 3; + /* Return final value - alpha always set to 1 */ + return (1 << 15) | (b << 10) | (g << 5) | r; +} -#elif defined(PS2) +#define argb32_to_pixel_platform_format(color) argb32_to_abgr1555(color) -/* Have no idea what's going on here, so have to use - * fixed colour values... */ -#define HOVER_COLOR(settings) 0x03E0 -#define NORMAL_COLOR(settings) 0x7FFF -#define TITLE_COLOR(settings) HOVER_COLOR(settings) -#define BG_DARK_COLOR(settings) ((0 << 15) | (1 << 12) | (1 << 7) | (1 << 2)) -#define BG_LIGHT_COLOR(settings) ((0 << 15) | (2 << 12) | (2 << 7) | (2 << 2)) -#define BORDER_DARK_COLOR(settings) ((0 << 15) | (1 << 12) | (1 << 8) | (1 << 2)) -#define BORDER_LIGHT_COLOR(settings) ((0 << 15) | (2 << 12) | (2 << 8) | (2 << 2)) +#elif defined(GEKKO) -#elif defined(HAVE_LIBNX) && !defined(HAVE_OPENGL) +static uint16_t argb32_to_rgb5a3(uint32_t col) +{ + /* Extract colour components */ + unsigned a = (col >> 24) & 0xff; + unsigned r = (col >> 16) & 0xff; + unsigned g = (col >> 8) & 0xff; + unsigned b = col & 0xff; + /* Gekko platforms only have a 3 bit alpha channel, which + * is one bit less than all 'standard' target platforms. + * As a result, Gekko colours are effectively ~6-7% less + * transparent than expected, which causes backgrounds and + * borders to appear too bright. We therefore have to darken + * each RGB component according to the difference between Gekko + * alpha and normal 4 bit alpha values... */ + unsigned a4 = a >> 4; + unsigned a3 = a >> 5; + float a_factor = 1.0; + if (a3 > 0) + { + /* Avoid divide by zero errors... */ + a_factor = ((float)a4 * (1.0 / 15.0)) / ((float)a3 * (1.0 / 7.0)); + } + r = (unsigned)(((float)r * a_factor) + 0.5); + g = (unsigned)(((float)g * a_factor) + 0.5); + b = (unsigned)(((float)b * a_factor) + 0.5); + /* a_factor can actually be greater than 1. This will never happen + * with the current preset theme colour values, but users can set + * any custom values they like, so we have to play it safe... */ + r = (r <= 0xff) ? r : 0xff; + g = (g <= 0xff) ? g : 0xff; + b = (b <= 0xff) ? b : 0xff; + /* Convert RGB from 8 bit to 4 bit */ + r = r >> 4; + g = g >> 4; + b = b >> 4; + /* Return final value */ + return (a3 << 12) | (r << 8) | (g << 4) | b; +} -#define HOVER_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_hover_color)) -#define NORMAL_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_normal_color)) -#define TITLE_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_title_color)) -/* Is this supposed to be RGB565? - * Have no idea what's going on here, so have to use - * fixed colour values... */ -#define BG_DARK_COLOR(settings) ((((31 * (54)) / 255) << 11) | (((63 * (54)) / 255) << 5) | ((31 * (54)) / 255)) -#define BG_LIGHT_COLOR(settings) BG_DARK_COLOR(settings) -#define BORDER_DARK_COLOR(settings) ((((31 * (54)) / 255) << 11) | (((63 * (109)) / 255) << 5) | ((31 * (54)) / 255)) -#define BORDER_LIGHT_COLOR(settings) BORDER_DARK_COLOR(settings) +#define argb32_to_pixel_platform_format(color) argb32_to_rgb5a3(color) -static uint16_t argb32_to_rgba4444(uint32_t col) +#elif defined(PSP) + +static uint16_t argb32_to_abgr4444(uint32_t col) { unsigned a = ((col >> 24) & 0xff) >> 4; unsigned r = ((col >> 16) & 0xff) >> 4; unsigned g = ((col >> 8) & 0xff) >> 4; unsigned b = ((col & 0xff) ) >> 4; - return (r << 12) | (g << 8) | (b << 4) | a; + return (a << 12) | (b << 8) | (g << 4) | r; } +#define argb32_to_pixel_platform_format(color) argb32_to_abgr4444(color) + #else -/* This is the only sane case... */ -#define HOVER_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_hover_color)) -#define NORMAL_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_normal_color)) -#define TITLE_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_title_color)) -#define BG_DARK_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_bg_dark_color)) -#define BG_LIGHT_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_bg_light_color)) -#define BORDER_DARK_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_border_dark_color)) -#define BORDER_LIGHT_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_border_light_color)) - static uint16_t argb32_to_rgba4444(uint32_t col) { unsigned a = ((col >> 24) & 0xff) >> 4; @@ -143,20 +514,131 @@ static uint16_t argb32_to_rgba4444(uint32_t col) return (r << 12) | (g << 8) | (b << 4) | a; } +#define argb32_to_pixel_platform_format(color) argb32_to_rgba4444(color) + #endif -static uint16_t rgui_bg_filler(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color) +static const rgui_theme_t *get_theme(rgui_t *rgui) +{ + switch (rgui->color_theme) + { + case RGUI_THEME_CLASSIC_RED: + return &rgui_theme_classic_red; + case RGUI_THEME_CLASSIC_ORANGE: + return &rgui_theme_classic_orange; + case RGUI_THEME_CLASSIC_YELLOW: + return &rgui_theme_classic_yellow; + case RGUI_THEME_CLASSIC_GREEN: + return &rgui_theme_classic_green; + case RGUI_THEME_CLASSIC_BLUE: + return &rgui_theme_classic_blue; + case RGUI_THEME_CLASSIC_VIOLET: + return &rgui_theme_classic_violet; + case RGUI_THEME_CLASSIC_GREY: + return &rgui_theme_classic_grey; + case RGUI_THEME_LEGACY_RED: + return &rgui_theme_legacy_red; + case RGUI_THEME_DARK_PURPLE: + return &rgui_theme_dark_purple; + case RGUI_THEME_MIDNIGHT_BLUE: + return &rgui_theme_midnight_blue; + case RGUI_THEME_GOLDEN: + return &rgui_theme_golden; + case RGUI_THEME_ELECTRIC_BLUE: + return &rgui_theme_electric_blue; + case RGUI_THEME_APPLE_GREEN: + return &rgui_theme_apple_green; + case RGUI_THEME_VOLCANIC_RED: + return &rgui_theme_volcanic_red; + case RGUI_THEME_LAGOON: + return &rgui_theme_lagoon; + case RGUI_THEME_BROGRAMMER: + return &rgui_theme_brogrammer; + case RGUI_THEME_DRACULA: + return &rgui_theme_dracula; + case RGUI_THEME_FAIRYFLOSS: + return &rgui_theme_fairyfloss; + case RGUI_THEME_FLATUI: + return &rgui_theme_flatui; + case RGUI_THEME_GRUVBOX_DARK: + return &rgui_theme_gruvbox_dark; + case RGUI_THEME_GRUVBOX_LIGHT: + return &rgui_theme_gruvbox_light; + case RGUI_THEME_HACKING_THE_KERNEL: + return &rgui_theme_hacking_the_kernel; + case RGUI_THEME_NORD: + return &rgui_theme_nord; + case RGUI_THEME_NOVA: + return &rgui_theme_nova; + case RGUI_THEME_ONE_DARK: + return &rgui_theme_one_dark; + case RGUI_THEME_PALENIGHT: + return &rgui_theme_palenight; + case RGUI_THEME_SOLARIZED_DARK: + return &rgui_theme_solarized_dark; + case RGUI_THEME_SOLARIZED_LIGHT: + return &rgui_theme_solarized_light; + case RGUI_THEME_TANGO_DARK: + return &rgui_theme_tango_dark; + case RGUI_THEME_TANGO_LIGHT: + return &rgui_theme_tango_light; + case RGUI_THEME_ZENBURN: + return &rgui_theme_zenburn; + case RGUI_THEME_ANTI_ZENBURN: + return &rgui_theme_anti_zenburn; + default: + break; + } + + return &rgui_theme_classic_green; +} + +static void prepare_rgui_colors(rgui_t *rgui, settings_t *settings) +{ + rgui_theme_t theme_colors; + rgui->color_theme = settings->uints.menu_rgui_color_theme; + if (rgui->color_theme == RGUI_THEME_CUSTOM) + { + theme_colors.hover_color = settings->uints.menu_entry_hover_color; + theme_colors.normal_color = settings->uints.menu_entry_normal_color; + theme_colors.title_color = settings->uints.menu_title_color; + theme_colors.bg_dark_color = settings->uints.menu_bg_dark_color; + theme_colors.bg_light_color = settings->uints.menu_bg_light_color; + theme_colors.border_dark_color = settings->uints.menu_border_dark_color; + theme_colors.border_light_color = settings->uints.menu_border_light_color; + } + else + { + const rgui_theme_t *current_theme = get_theme(rgui); + theme_colors.hover_color = current_theme->hover_color; + theme_colors.normal_color = current_theme->normal_color; + theme_colors.title_color = current_theme->title_color; + theme_colors.bg_dark_color = current_theme->bg_dark_color; + theme_colors.bg_light_color = current_theme->bg_light_color; + theme_colors.border_dark_color = current_theme->border_dark_color; + theme_colors.border_light_color = current_theme->border_light_color; + } + rgui->colors.hover_color = argb32_to_pixel_platform_format(theme_colors.hover_color); + rgui->colors.normal_color = argb32_to_pixel_platform_format(theme_colors.normal_color); + rgui->colors.title_color = argb32_to_pixel_platform_format(theme_colors.title_color); + rgui->colors.bg_dark_color = argb32_to_pixel_platform_format(theme_colors.bg_dark_color); + rgui->colors.bg_light_color = argb32_to_pixel_platform_format(theme_colors.bg_light_color); + rgui->colors.border_dark_color = argb32_to_pixel_platform_format(theme_colors.border_dark_color); + rgui->colors.border_light_color = argb32_to_pixel_platform_format(theme_colors.border_light_color); +} + +static uint16_t rgui_bg_filler(rgui_t *rgui, unsigned x, unsigned y) { unsigned shift = (rgui->bg_thickness ? 1 : 0); unsigned select = ((x >> shift) + (y >> shift)) & 1; - return (select == 0) ? dark_color : light_color; + return (select == 0) ? rgui->colors.bg_dark_color : rgui->colors.bg_light_color; } -static uint16_t rgui_border_filler(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color) +static uint16_t rgui_border_filler(rgui_t *rgui, unsigned x, unsigned y) { unsigned shift = (rgui->border_thickness ? 1 : 0); unsigned select = ((x >> shift) + (y >> shift)) & 1; - return (select == 0) ? dark_color : light_color; + return (select == 0) ? rgui->colors.border_dark_color : rgui->colors.border_light_color; } static void rgui_fill_rect( @@ -165,14 +647,13 @@ static void rgui_fill_rect( size_t pitch, unsigned x, unsigned y, unsigned width, unsigned height, - uint16_t dark_color, uint16_t light_color, - uint16_t (*col)(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)) + uint16_t (*col)(rgui_t *rgui, unsigned x, unsigned y)) { unsigned i, j; for (j = y; j < y + height; j++) for (i = x; i < x + width; i++) - data[j * (pitch >> 1) + i] = col(rgui, i, j, dark_color, light_color); + data[j * (pitch >> 1) + i] = col(rgui, i, j); } static void rgui_color_rect( @@ -300,7 +781,6 @@ static void rgui_render_background(rgui_t *rgui) unsigned fb_width, fb_height; uint16_t *src = NULL; uint16_t *dst = NULL; - uint16_t dark_color, light_color; menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch); @@ -322,18 +802,10 @@ static void rgui_render_background(rgui_t *rgui) if (settings->bools.menu_rgui_border_filler_enable) { - dark_color = BORDER_DARK_COLOR(settings); - light_color = BORDER_LIGHT_COLOR(settings); - - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5, - dark_color, light_color, rgui_border_filler); - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5, - dark_color, light_color, rgui_border_filler); - - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10, - dark_color, light_color, rgui_border_filler); - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, fb_width - 10, 5, 5, fb_height - 10, - dark_color, light_color, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, fb_width - 10, 5, 5, fb_height - 10, rgui_border_filler); } } } @@ -354,8 +826,6 @@ static void rgui_set_message(void *data, const char *message) static void rgui_render_messagebox(rgui_t *rgui, const char *message) { int x, y; - uint16_t normal_color; - uint16_t dark_color, light_color; size_t i, fb_pitch; unsigned fb_width, fb_height; unsigned width, glyphs_width, height; @@ -405,31 +875,17 @@ static void rgui_render_messagebox(rgui_t *rgui, const char *message) if (rgui_framebuf_data) { - dark_color = BG_DARK_COLOR(settings); - light_color = BG_LIGHT_COLOR(settings); - - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + 5, width - 10, height - 10, - dark_color, light_color, rgui_bg_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + 5, width - 10, height - 10, rgui_bg_filler); if (settings->bools.menu_rgui_border_filler_enable) { - - dark_color = BORDER_DARK_COLOR(settings); - light_color = BORDER_LIGHT_COLOR(settings); - - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y, width - 5, 5, - dark_color, light_color, rgui_border_filler); - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + width - 5, y, 5, height - 5, - dark_color, light_color, rgui_border_filler); - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + height - 5, width - 5, 5, - dark_color, light_color, rgui_border_filler); - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y + 5, 5, height - 5, - dark_color, light_color, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y, width - 5, 5, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + width - 5, y, 5, height - 5, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + height - 5, width - 5, 5, rgui_border_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y + 5, 5, height - 5, rgui_border_filler); } } - normal_color = NORMAL_COLOR(settings); - for (i = 0; i < list->size; i++) { const char *msg = list->elems[i].data; @@ -437,7 +893,7 @@ static void rgui_render_messagebox(rgui_t *rgui, const char *message) int offset_y = (int)(FONT_HEIGHT_STRIDE * i); if (rgui_framebuf_data) - blit_line(x + 8 + offset_x, y + 8 + offset_y, msg, normal_color); + blit_line(x + 8 + offset_x, y + 8 + offset_y, msg, rgui->colors.normal_color); } end: @@ -474,6 +930,12 @@ static void rgui_frame(void *data, video_frame_info_t *video_info) rgui->bg_thickness = settings->bools.menu_rgui_background_filler_thickness_enable; rgui->border_thickness = settings->bools.menu_rgui_border_filler_thickness_enable; + if (settings->uints.menu_rgui_color_theme != rgui->color_theme) + { + prepare_rgui_colors(rgui, settings); + rgui->bg_modified = true; + } + rgui->frame_count++; } @@ -481,8 +943,6 @@ static void rgui_render(void *data, bool is_idle) { menu_animation_ctx_ticker_t ticker; unsigned x, y; - uint16_t hover_color, normal_color; - uint16_t dark_color, light_color; size_t i, end, fb_pitch, old_start; unsigned fb_width, fb_height; int bottom; @@ -518,11 +978,7 @@ static void rgui_render(void *data, bool is_idle) { if (rgui_framebuf_data) { - dark_color = BG_DARK_COLOR(settings); - light_color = BG_LIGHT_COLOR(settings); - - rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 0, fb_height, fb_width, 4, - dark_color, light_color, rgui_bg_filler); + rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 0, fb_height, fb_width, 4, rgui_bg_filler); } rgui->last_width = fb_width; rgui->last_height = fb_height; @@ -606,9 +1062,6 @@ static void rgui_render(void *data, bool is_idle) menu_animation_ticker(&ticker); - hover_color = HOVER_COLOR(settings); - normal_color = NORMAL_COLOR(settings); - if (menu_entries_ctl(MENU_ENTRIES_CTL_SHOW_BACK, NULL)) { char back_buf[32]; @@ -623,7 +1076,7 @@ static void rgui_render(void *data, bool is_idle) RGUI_TERM_START_X(fb_width), RGUI_TERM_START_X(fb_width), back_msg, - TITLE_COLOR(settings)); + rgui->colors.title_color); } string_to_upper(title_buf); @@ -633,7 +1086,7 @@ static void rgui_render(void *data, bool is_idle) (int)(RGUI_TERM_START_X(fb_width) + (RGUI_TERM_WIDTH(fb_width) - utf8len(title_buf)) * FONT_WIDTH_STRIDE / 2), RGUI_TERM_START_X(fb_width), - title_buf, TITLE_COLOR(settings)); + title_buf, rgui->colors.title_color); if (settings->bools.menu_core_enable && menu_entries_get_core_title(title_msg, sizeof(title_msg)) == 0) @@ -642,7 +1095,7 @@ static void rgui_render(void *data, bool is_idle) blit_line( RGUI_TERM_START_X(fb_width), (RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) + - RGUI_TERM_START_Y(fb_height) + 2, title_msg, hover_color); + RGUI_TERM_START_Y(fb_height) + 2, title_msg, rgui->colors.hover_color); } if (settings->bools.menu_timedate_enable) @@ -662,7 +1115,7 @@ static void rgui_render(void *data, bool is_idle) blit_line( RGUI_TERM_WIDTH(fb_width) * FONT_WIDTH_STRIDE - RGUI_TERM_START_X(fb_width), (RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) + - RGUI_TERM_START_Y(fb_height) + 2, timedate, hover_color); + RGUI_TERM_START_Y(fb_height) + 2, timedate, rgui->colors.hover_color); } x = RGUI_TERM_START_X(fb_width); @@ -727,7 +1180,7 @@ static void rgui_render(void *data, bool is_idle) if (rgui_framebuf_data) blit_line(x, y, message, - entry_selected ? hover_color : normal_color); + entry_selected ? rgui->colors.hover_color : rgui->colors.normal_color); menu_entry_free(&entry); if (!string_is_empty(entry_path)) @@ -753,7 +1206,6 @@ static void rgui_render(void *data, bool is_idle) if (rgui->mouse_show) { - settings_t *settings = config_get_ptr(); bool cursor_visible = settings->bools.video_fullscreen || !video_driver_has_windowed(); @@ -789,6 +1241,9 @@ static void *rgui_init(void **userdata, bool video_is_threaded) *userdata = rgui; + /* Prepare RGUI colors, to improve performance */ + prepare_rgui_colors(rgui, settings); + /* 4 extra lines to cache the checked background */ rgui_framebuf_data = (uint16_t*) calloc(400 * (240 + 4), sizeof(uint16_t)); @@ -830,7 +1285,6 @@ error: return NULL; } - static void rgui_free(void *data) { const uint8_t *font_fb; diff --git a/menu/drivers/stripes.c b/menu/drivers/stripes.c old mode 100755 new mode 100644 index be2abdd1e5..4717c5577e --- a/menu/drivers/stripes.c +++ b/menu/drivers/stripes.c @@ -1899,7 +1899,6 @@ static void stripes_context_reset_horizontal_list( continue; } - file_list_get_at_offset(stripes->horizontal_list, i, &path, NULL, NULL, NULL); @@ -2047,7 +2046,6 @@ static void stripes_list_open(stripes_handle_t *stripes) stripes_list_open_new(stripes, selection_buf, dir, selection); - entry.duration = STRIPES_DELAY; entry.target_value = stripes->icon_size * -(stripes->depth*2-2); entry.subject = &stripes->x; @@ -2510,7 +2508,6 @@ static int stripes_draw_item( TEXT_ALIGN_LEFT, width, height, stripes->font); - menu_display_set_alpha(color, MIN(node->alpha, stripes->alpha)); if (color[3] != 0) @@ -3076,7 +3073,6 @@ static void stripes_layout_ps3(stripes_handle_t *stripes, int width, int height) stripes->font2_size = 24.0 * scale_factor; new_header_height = 128.0 * scale_factor; - stripes->thumbnail_width = 1024.0 * scale_factor; stripes->left_thumbnail_width = 1024.0 * scale_factor; stripes->savestate_thumbnail_width= 460.0 * scale_factor; @@ -4030,7 +4026,6 @@ static void stripes_list_cache(void *data, enum menu_list_type type, unsigned ac } } - static void stripes_context_destroy(void *data) { unsigned i; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index e3604a42f5..eb07a978f3 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -201,6 +201,11 @@ enum XMB_TEXTURE_INPUT_RB, XMB_TEXTURE_INPUT_LT, XMB_TEXTURE_INPUT_RT, + XMB_TEXTURE_INPUT_ADC, + XMB_TEXTURE_INPUT_BIND_ALL, + XMB_TEXTURE_INPUT_MOUSE, + XMB_TEXTURE_INPUT_LGUN, + XMB_TEXTURE_INPUT_TURBO, XMB_TEXTURE_CHECKMARK, XMB_TEXTURE_MENU_ADD, XMB_TEXTURE_BRIGHTNESS, @@ -490,9 +495,12 @@ static xmb_node_t *xmb_alloc_node(void) { xmb_node_t *node = (xmb_node_t*)malloc(sizeof(*node)); - node->alpha = node->label_alpha = 0; - node->zoom = node->x = node->y = 0; - node->icon = node->content_icon = 0; + if (!node) + return NULL; + + node->alpha = node->label_alpha = 0; + node->zoom = node->x = node->y = 0; + node->icon = node->content_icon = 0; node->fullpath = NULL; return node; @@ -541,6 +549,9 @@ static xmb_node_t *xmb_copy_node(const xmb_node_t *old_node) { xmb_node_t *new_node = (xmb_node_t*)malloc(sizeof(*new_node)); + if (!new_node) + return NULL; + *new_node = *old_node; new_node->fullpath = old_node->fullpath ? strdup(old_node->fullpath) : NULL; @@ -2270,6 +2281,9 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, case MENU_ENUM_LABEL_ADD_TO_FAVORITES: case MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST: return xmb->textures.list[XMB_TEXTURE_ADD_FAVORITE]; + case MENU_ENUM_LABEL_PARENT_DIRECTORY: + case MENU_ENUM_LABEL_UNDO_LOAD_STATE: + case MENU_ENUM_LABEL_UNDO_SAVE_STATE: case MENU_ENUM_LABEL_RESET_CORE_ASSOCIATION: return xmb->textures.list[XMB_TEXTURE_UNDO]; case MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS: @@ -2284,34 +2298,50 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, case MENU_ENUM_LABEL_SHADER_OPTIONS: return xmb->textures.list[XMB_TEXTURE_SHADER_OPTIONS]; case MENU_ENUM_LABEL_ACHIEVEMENT_LIST: - return xmb->textures.list[XMB_TEXTURE_ACHIEVEMENT_LIST]; case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE: return xmb->textures.list[XMB_TEXTURE_ACHIEVEMENT_LIST]; case MENU_ENUM_LABEL_SAVE_STATE: + case MENU_ENUM_LABEL_SAVESTATE_AUTO_SAVE: return xmb->textures.list[XMB_TEXTURE_SAVESTATE]; case MENU_ENUM_LABEL_LOAD_STATE: + case MENU_ENUM_LABEL_CONFIGURATIONS: + case MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS: + case MENU_ENUM_LABEL_REMAP_FILE_LOAD: + case MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE: + case MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE: + case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET: + case MENU_ENUM_LABEL_CHEAT_FILE_LOAD: + case MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND: + case MENU_ENUM_LABEL_SAVESTATE_AUTO_LOAD: return xmb->textures.list[XMB_TEXTURE_LOADSTATE]; - case MENU_ENUM_LABEL_PARENT_DIRECTORY: - case MENU_ENUM_LABEL_UNDO_LOAD_STATE: - case MENU_ENUM_LABEL_UNDO_SAVE_STATE: - return xmb->textures.list[XMB_TEXTURE_UNDO]; case MENU_ENUM_LABEL_TAKE_SCREENSHOT: return xmb->textures.list[XMB_TEXTURE_SCREENSHOT]; case MENU_ENUM_LABEL_DELETE_ENTRY: return xmb->textures.list[XMB_TEXTURE_CLOSE]; case MENU_ENUM_LABEL_RESTART_CONTENT: + case MENU_ENUM_LABEL_REBOOT: + case MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG: + case MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS: + case MENU_ENUM_LABEL_RESTART_RETROARCH: + case MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE: + case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL: return xmb->textures.list[XMB_TEXTURE_RELOAD]; case MENU_ENUM_LABEL_RENAME_ENTRY: return xmb->textures.list[XMB_TEXTURE_RENAME]; case MENU_ENUM_LABEL_RESUME_CONTENT: return xmb->textures.list[XMB_TEXTURE_RESUME]; - case MENU_ENUM_LABEL_FAVORITES: + case MENU_ENUM_LABEL_DIRECTORY_SETTINGS: + case MENU_ENUM_LABEL_SCAN_DIRECTORY: + case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR: + case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR: + case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT: + case MENU_ENUM_LABEL_FAVORITES: /* "Start Directory" */ case MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST: return xmb->textures.list[XMB_TEXTURE_FOLDER]; case MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR: return xmb->textures.list[XMB_TEXTURE_RDB]; - /* Menu collection submenus*/ + /* Menu collection submenus */ case MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST: return xmb->textures.list[XMB_TEXTURE_ZIP]; case MENU_ENUM_LABEL_GOTO_FAVORITES: @@ -2323,210 +2353,183 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, case MENU_ENUM_LABEL_GOTO_MUSIC: return xmb->textures.list[XMB_TEXTURE_MUSIC]; - default: - /* Menu icons are here waiting for theme support*/ - { - settings_t *settings = config_get_ptr(); - if (settings->uints.menu_xmb_theme != XMB_ICON_THEME_FLATUI && - settings->uints.menu_xmb_theme != XMB_ICON_THEME_PIXEL ) - { - switch (enum_idx) - { - /* Menu icons */ - case MENU_ENUM_LABEL_CONTENT_SETTINGS: - case MENU_ENUM_LABEL_UPDATE_ASSETS: - case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME: - case MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME: - case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME: - return xmb->textures.list[XMB_TEXTURE_QUICKMENU]; - case MENU_ENUM_LABEL_START_CORE: - case MENU_ENUM_LABEL_CHEAT_START_OR_CONT: - return xmb->textures.list[XMB_TEXTURE_RUN]; - case MENU_ENUM_LABEL_CORE_LIST: - case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST: - case MENU_ENUM_LABEL_CORE_SETTINGS: - case MENU_ENUM_LABEL_CORE_UPDATER_LIST: - case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE: - case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE: - case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE: - return xmb->textures.list[XMB_TEXTURE_CORE]; - case MENU_ENUM_LABEL_LOAD_CONTENT_LIST: - case MENU_ENUM_LABEL_SCAN_FILE: - return xmb->textures.list[XMB_TEXTURE_FILE]; - case MENU_ENUM_LABEL_ONLINE_UPDATER: - case MENU_ENUM_LABEL_UPDATER_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_UPDATER]; - case MENU_ENUM_LABEL_UPDATE_LAKKA: - return xmb->textures.list[XMB_TEXTURE_MAIN_MENU]; - case MENU_ENUM_LABEL_UPDATE_CHEATS: - return xmb->textures.list[XMB_TEXTURE_CHEAT_OPTIONS]; - case MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST: - return xmb->textures.list[XMB_TEXTURE_IMAGE]; - case MENU_ENUM_LABEL_UPDATE_OVERLAYS: - case MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_OVERLAY]; - case MENU_ENUM_LABEL_UPDATE_CG_SHADERS: - case MENU_ENUM_LABEL_UPDATE_GLSL_SHADERS: - case MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS: - case MENU_ENUM_LABEL_AUTO_SHADERS_ENABLE: - case MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS: - return xmb->textures.list[XMB_TEXTURE_SHADER_OPTIONS]; - case MENU_ENUM_LABEL_INFORMATION: - case MENU_ENUM_LABEL_INFORMATION_LIST: - case MENU_ENUM_LABEL_SYSTEM_INFORMATION: - case MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES: - return xmb->textures.list[XMB_TEXTURE_INFO]; - case MENU_ENUM_LABEL_UPDATE_DATABASES: - case MENU_ENUM_LABEL_DATABASE_MANAGER_LIST: - return xmb->textures.list[XMB_TEXTURE_RDB]; - case MENU_ENUM_LABEL_CURSOR_MANAGER_LIST: - return xmb->textures.list[XMB_TEXTURE_CURSOR]; - case MENU_ENUM_LABEL_HELP_LIST: - case MENU_ENUM_LABEL_HELP_CONTROLS: - case MENU_ENUM_LABEL_HELP_LOADING_CONTENT: - case MENU_ENUM_LABEL_HELP_SCANNING_CONTENT: - case MENU_ENUM_LABEL_HELP_WHAT_IS_A_CORE: - case MENU_ENUM_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD: - case MENU_ENUM_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING: - return xmb->textures.list[XMB_TEXTURE_HELP]; - case MENU_ENUM_LABEL_QUIT_RETROARCH: - return xmb->textures.list[XMB_TEXTURE_EXIT]; - /* Settings icons*/ - case MENU_ENUM_LABEL_DRIVER_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_DRIVERS]; - case MENU_ENUM_LABEL_VIDEO_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_VIDEO]; - case MENU_ENUM_LABEL_AUDIO_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_AUDIO]; - case MENU_ENUM_LABEL_AUDIO_MIXER_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_MIXER]; - case MENU_ENUM_LABEL_INPUT_SETTINGS: - case MENU_ENUM_LABEL_UPDATE_AUTOCONFIG_PROFILES: - case MENU_ENUM_LABEL_INPUT_USER_1_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_2_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_3_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_4_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_5_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_6_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_7_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_8_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_9_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_10_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_11_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_12_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_13_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_14_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_15_BINDS: - case MENU_ENUM_LABEL_INPUT_USER_16_BINDS: - return xmb->textures.list[XMB_TEXTURE_INPUT_SETTINGS]; - case MENU_ENUM_LABEL_LATENCY_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_LATENCY]; - case MENU_ENUM_LABEL_SAVING_SETTINGS: - case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG: - case MENU_ENUM_LABEL_SAVE_NEW_CONFIG: - case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT: - case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_AS: - case MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS: - return xmb->textures.list[XMB_TEXTURE_SAVING]; - case MENU_ENUM_LABEL_LOGGING_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_LOG]; - case MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_FRAMESKIP]; - case MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING: - case MENU_ENUM_LABEL_RECORDING_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_RECORD]; - case MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING: - return xmb->textures.list[XMB_TEXTURE_STREAM]; - case MENU_ENUM_LABEL_QUICK_MENU_STOP_STREAMING: - case MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING: - case MENU_ENUM_LABEL_CHEAT_DELETE_ALL: - case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CORE: - case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME: - case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR: - case MENU_ENUM_LABEL_CORE_DELETE: - return xmb->textures.list[XMB_TEXTURE_CLOSE]; - case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_OSD]; - case MENU_ENUM_LABEL_SHOW_WIMP: - case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_UI]; + case MENU_ENUM_LABEL_CONTENT_SETTINGS: + case MENU_ENUM_LABEL_UPDATE_ASSETS: + case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME: + case MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME: + case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME: + return xmb->textures.list[XMB_TEXTURE_QUICKMENU]; + case MENU_ENUM_LABEL_START_CORE: + case MENU_ENUM_LABEL_CHEAT_START_OR_CONT: + return xmb->textures.list[XMB_TEXTURE_RUN]; + case MENU_ENUM_LABEL_CORE_LIST: + case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST: + case MENU_ENUM_LABEL_CORE_SETTINGS: + case MENU_ENUM_LABEL_CORE_UPDATER_LIST: + case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE: + case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE: + case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE: + return xmb->textures.list[XMB_TEXTURE_CORE]; + case MENU_ENUM_LABEL_LOAD_CONTENT_LIST: + case MENU_ENUM_LABEL_SCAN_FILE: + return xmb->textures.list[XMB_TEXTURE_FILE]; + case MENU_ENUM_LABEL_ONLINE_UPDATER: + case MENU_ENUM_LABEL_UPDATER_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_UPDATER]; + case MENU_ENUM_LABEL_UPDATE_LAKKA: + return xmb->textures.list[XMB_TEXTURE_MAIN_MENU]; + case MENU_ENUM_LABEL_UPDATE_CHEATS: + return xmb->textures.list[XMB_TEXTURE_CHEAT_OPTIONS]; + case MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST: + return xmb->textures.list[XMB_TEXTURE_IMAGE]; + case MENU_ENUM_LABEL_UPDATE_OVERLAYS: + case MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_OVERLAY]; + case MENU_ENUM_LABEL_UPDATE_CG_SHADERS: + case MENU_ENUM_LABEL_UPDATE_GLSL_SHADERS: + case MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS: + case MENU_ENUM_LABEL_AUTO_SHADERS_ENABLE: + case MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS: + return xmb->textures.list[XMB_TEXTURE_SHADER_OPTIONS]; + case MENU_ENUM_LABEL_INFORMATION: + case MENU_ENUM_LABEL_INFORMATION_LIST: + case MENU_ENUM_LABEL_SYSTEM_INFORMATION: + case MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES: + return xmb->textures.list[XMB_TEXTURE_INFO]; + case MENU_ENUM_LABEL_UPDATE_DATABASES: + case MENU_ENUM_LABEL_DATABASE_MANAGER_LIST: + return xmb->textures.list[XMB_TEXTURE_RDB]; + case MENU_ENUM_LABEL_CURSOR_MANAGER_LIST: + return xmb->textures.list[XMB_TEXTURE_CURSOR]; + case MENU_ENUM_LABEL_HELP_LIST: + case MENU_ENUM_LABEL_HELP_CONTROLS: + case MENU_ENUM_LABEL_HELP_LOADING_CONTENT: + case MENU_ENUM_LABEL_HELP_SCANNING_CONTENT: + case MENU_ENUM_LABEL_HELP_WHAT_IS_A_CORE: + case MENU_ENUM_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD: + case MENU_ENUM_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING: + return xmb->textures.list[XMB_TEXTURE_HELP]; + case MENU_ENUM_LABEL_QUIT_RETROARCH: + case MENU_ENUM_LABEL_BLOCK_SRAM_OVERWRITE: + return xmb->textures.list[XMB_TEXTURE_EXIT]; + case MENU_ENUM_LABEL_DRIVER_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_DRIVERS]; + case MENU_ENUM_LABEL_VIDEO_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_VIDEO]; + case MENU_ENUM_LABEL_AUDIO_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_AUDIO]; + case MENU_ENUM_LABEL_AUDIO_MIXER_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_MIXER]; + case MENU_ENUM_LABEL_INPUT_SETTINGS: + case MENU_ENUM_LABEL_UPDATE_AUTOCONFIG_PROFILES: + case MENU_ENUM_LABEL_INPUT_USER_1_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_2_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_3_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_4_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_5_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_6_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_7_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_8_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_9_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_10_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_11_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_12_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_13_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_14_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_15_BINDS: + case MENU_ENUM_LABEL_INPUT_USER_16_BINDS: + case MENU_ENUM_LABEL_START_NET_RETROPAD: + return xmb->textures.list[XMB_TEXTURE_INPUT_SETTINGS]; + case MENU_ENUM_LABEL_LATENCY_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_LATENCY]; + case MENU_ENUM_LABEL_SAVING_SETTINGS: + case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG: + case MENU_ENUM_LABEL_SAVE_NEW_CONFIG: + case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT: + case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_AS: + case MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS: + return xmb->textures.list[XMB_TEXTURE_SAVING]; + case MENU_ENUM_LABEL_LOGGING_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_LOG]; + case MENU_ENUM_LABEL_FASTFORWARD_RATIO: + case MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_FRAMESKIP]; + case MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING: + case MENU_ENUM_LABEL_RECORDING_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_RECORD]; + case MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING: + return xmb->textures.list[XMB_TEXTURE_STREAM]; + case MENU_ENUM_LABEL_QUICK_MENU_STOP_STREAMING: + case MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING: + case MENU_ENUM_LABEL_CHEAT_DELETE_ALL: + case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CORE: + case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME: + case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR: + case MENU_ENUM_LABEL_CORE_DELETE: + return xmb->textures.list[XMB_TEXTURE_CLOSE]; + case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_OSD]; + case MENU_ENUM_LABEL_SHOW_WIMP: + case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_UI]; #ifdef HAVE_LAKKA_SWITCH - case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE: + case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE: #endif #if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) - case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE: - return xmb->textures.list[XMB_TEXTURE_POWER]; + case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE: + return xmb->textures.list[XMB_TEXTURE_POWER]; #endif - case MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_POWER]; - case MENU_ENUM_LABEL_RETRO_ACHIEVEMENTS_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_ACHIEVEMENTS]; - case MENU_ENUM_LABEL_NETWORK_INFORMATION: - case MENU_ENUM_LABEL_NETWORK_SETTINGS: - case MENU_ENUM_LABEL_WIFI_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_NETWORK]; - case MENU_ENUM_LABEL_PLAYLIST_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_PLAYLIST]; - case MENU_ENUM_LABEL_USER_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_USER]; - case MENU_ENUM_LABEL_DIRECTORY_SETTINGS: - case MENU_ENUM_LABEL_SCAN_DIRECTORY: - case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR: - case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR: - case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT: - return xmb->textures.list[XMB_TEXTURE_FOLDER]; - case MENU_ENUM_LABEL_PRIVACY_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_PRIVACY]; - case MENU_ENUM_LABEL_REWIND_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_REWIND]; - case MENU_ENUM_LABEL_QUICK_MENU_OVERRIDE_OPTIONS: - return xmb->textures.list[XMB_TEXTURE_OVERRIDE]; - case MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS: - return xmb->textures.list[XMB_TEXTURE_NOTIFICATIONS]; + case MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_POWER]; + case MENU_ENUM_LABEL_RETRO_ACHIEVEMENTS_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_ACHIEVEMENTS]; + case MENU_ENUM_LABEL_PLAYLIST_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_PLAYLIST]; + case MENU_ENUM_LABEL_USER_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_USER]; + case MENU_ENUM_LABEL_PRIVACY_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_PRIVACY]; + case MENU_ENUM_LABEL_REWIND_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_REWIND]; + case MENU_ENUM_LABEL_QUICK_MENU_OVERRIDE_OPTIONS: + return xmb->textures.list[XMB_TEXTURE_OVERRIDE]; + case MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_NOTIFICATIONS]; #ifdef HAVE_NETWORKING - case MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST: - return xmb->textures.list[XMB_TEXTURE_RUN]; - case MENU_ENUM_LABEL_NETPLAY_DISCONNECT: - return xmb->textures.list[XMB_TEXTURE_CLOSE]; - case MENU_ENUM_LABEL_NETPLAY_ENABLE_CLIENT: - return xmb->textures.list[XMB_TEXTURE_ROOM]; - case MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS: - return xmb->textures.list[XMB_TEXTURE_RELOAD]; + case MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST: + return xmb->textures.list[XMB_TEXTURE_RUN]; + case MENU_ENUM_LABEL_NETPLAY_DISCONNECT: + return xmb->textures.list[XMB_TEXTURE_CLOSE]; + case MENU_ENUM_LABEL_NETPLAY_ENABLE_CLIENT: + return xmb->textures.list[XMB_TEXTURE_ROOM]; + case MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS: + return xmb->textures.list[XMB_TEXTURE_RELOAD]; + case MENU_ENUM_LABEL_NETWORK_INFORMATION: + case MENU_ENUM_LABEL_NETWORK_SETTINGS: + case MENU_ENUM_LABEL_WIFI_SETTINGS: + return xmb->textures.list[XMB_TEXTURE_NETWORK]; #endif - case MENU_ENUM_LABEL_REBOOT: - case MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG: - case MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS: - case MENU_ENUM_LABEL_RESTART_RETROARCH: - return xmb->textures.list[XMB_TEXTURE_RELOAD]; - case MENU_ENUM_LABEL_SHUTDOWN: - return xmb->textures.list[XMB_TEXTURE_SHUTDOWN]; - case MENU_ENUM_LABEL_CONFIGURATIONS: - case MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS: - case MENU_ENUM_LABEL_REMAP_FILE_LOAD: - case MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE: - case MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE: - case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET: - case MENU_ENUM_LABEL_CHEAT_FILE_LOAD: - case MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND: - return xmb->textures.list[XMB_TEXTURE_LOADSTATE]; - case MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES: - case MENU_ENUM_LABEL_SHADER_APPLY_CHANGES: - return xmb->textures.list[XMB_TEXTURE_CHECKMARK]; - case MENU_ENUM_LABEL_CHEAT_ADD_NEW_AFTER: - case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BEFORE: - case MENU_ENUM_LABEL_CHEAT_ADD_NEW_TOP: - case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM: - return xmb->textures.list[XMB_TEXTURE_MENU_ADD]; - case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_TOGGLE: - return xmb->textures.list[XMB_TEXTURE_MENU_APPLY_TOGGLE]; - case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD: - return xmb->textures.list[XMB_TEXTURE_MENU_APPLY_COG]; - default: - break; - } - } - break; - } + case MENU_ENUM_LABEL_SHUTDOWN: + return xmb->textures.list[XMB_TEXTURE_SHUTDOWN]; + case MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES: + case MENU_ENUM_LABEL_SHADER_APPLY_CHANGES: + return xmb->textures.list[XMB_TEXTURE_CHECKMARK]; + case MENU_ENUM_LABEL_CHEAT_ADD_NEW_AFTER: + case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BEFORE: + case MENU_ENUM_LABEL_CHEAT_ADD_NEW_TOP: + case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM: + return xmb->textures.list[XMB_TEXTURE_MENU_ADD]; + case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_TOGGLE: + return xmb->textures.list[XMB_TEXTURE_MENU_APPLY_TOGGLE]; + case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD: + case MENU_ENUM_LABEL_SAVESTATE_AUTO_INDEX: + return xmb->textures.list[XMB_TEXTURE_MENU_APPLY_COG]; + case MENU_ENUM_LABEL_SLOWMOTION_RATIO: + return xmb->textures.list[XMB_TEXTURE_RESUME]; + case MENU_ENUM_LABEL_START_VIDEO_PROCESSOR: + return xmb->textures.list[XMB_TEXTURE_MOVIE]; + default: + break; } switch(type) @@ -2650,24 +2653,38 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, { unsigned input_id; if (type < MENU_SETTINGS_INPUT_DESC_BEGIN) + /* Input User # Binds only */ { input_id = MENU_SETTINGS_INPUT_BEGIN; + if ( type == input_id + 1) + return xmb->textures.list[XMB_TEXTURE_INPUT_ADC]; if ( type == input_id + 2) return xmb->textures.list[XMB_TEXTURE_INPUT_SETTINGS]; + if ( type == input_id + 3) + return xmb->textures.list[XMB_TEXTURE_INPUT_BIND_ALL]; if ( type == input_id + 4) return xmb->textures.list[XMB_TEXTURE_RELOAD]; if ( type == input_id + 5) return xmb->textures.list[XMB_TEXTURE_SAVING]; + if ( type == input_id + 6) + return xmb->textures.list[XMB_TEXTURE_INPUT_MOUSE]; + if ((type > (input_id + 30)) && (type < (input_id + 42))) + return xmb->textures.list[XMB_TEXTURE_INPUT_LGUN]; + if ( type == input_id + 42) + return xmb->textures.list[XMB_TEXTURE_INPUT_TURBO]; + /* align to use the same code of Quickmenu controls */ input_id = input_id + 7; } else { + /* Quickmenu controls repeats the same icons for all users */ input_id = MENU_SETTINGS_INPUT_DESC_BEGIN; while (type > (input_id + 23)) { input_id = (input_id + 24) ; } } + /* This is utilized for both Input # Binds and Quickmenu controls */ if ( type == input_id ) return xmb->textures.list[XMB_TEXTURE_INPUT_BTN_D]; if ( type == (input_id + 1)) @@ -4842,6 +4859,16 @@ static const char *xmb_texture_path(unsigned id) return "input_SELECT.png"; case XMB_TEXTURE_INPUT_START: return "input_START.png"; + case XMB_TEXTURE_INPUT_ADC: + return "input_ADC.png"; + case XMB_TEXTURE_INPUT_BIND_ALL: + return "input_BIND_ALL.png"; + case XMB_TEXTURE_INPUT_MOUSE: + return "input_MOUSE.png"; + case XMB_TEXTURE_INPUT_LGUN: + return "input_LGUN.png"; + case XMB_TEXTURE_INPUT_TURBO: + return "input_TURBO.png"; case XMB_TEXTURE_CHECKMARK: return "menu_check.png"; case XMB_TEXTURE_MENU_ADD: @@ -4976,6 +5003,11 @@ static void xmb_context_reset_background(const char *iconpath) task_push_image_load(path, menu_display_handle_wallpaper_upload, NULL); +#ifdef ORBIS + /* To avoid weird behaviour on orbis with remote host */ + RARCH_LOG("[XMB] after task\n"); + sleep(5); +#endif if (path) free(path); } diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 495f1eab7d..52b4665eb6 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -163,7 +163,6 @@ struct zui_tabbed bool inited; }; - static enum zarch_layout_type zarch_layout = LAY_HOME; static float zarch_zui_strwidth(void *fb_buf, const char *text, float scale) @@ -415,7 +414,6 @@ static bool zarch_zui_tab(zui_t *zui, struct zui_tabbed *tab, return active || (tab->active_id == id); } - static void zarch_zui_render_lay_settings(zui_t *zui) { int width, x1, y1; @@ -945,7 +943,6 @@ static void zarch_frame(void *data, video_frame_info_t *video_info) zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_X), zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_Y)); - if (!zarch_zui_input_state(zui, MENU_ZARCH_PRESSED)) zui->item.active = 0; else if (zui->item.active == 0) diff --git a/menu/drivers_display/menu_display_ctr.c b/menu/drivers_display/menu_display_ctr.c index 4ce9adc381..3713f966d2 100644 --- a/menu/drivers_display/menu_display_ctr.c +++ b/menu/drivers_display/menu_display_ctr.c @@ -59,7 +59,6 @@ static void menu_display_ctr_viewport(menu_display_ctx_draw_t *draw, } - static void menu_display_ctr_draw(menu_display_ctx_draw_t *draw, video_frame_info_t *video_info) { @@ -133,7 +132,6 @@ static void menu_display_ctr_draw(menu_display_ctx_draw_t *draw, GPU_TEXTURE_WRAP_S(GPU_CLAMP_TO_EDGE) | GPU_TEXTURE_WRAP_T(GPU_CLAMP_TO_EDGE), GPU_RGBA8); - GPU_SetViewport(NULL, VIRT_TO_PHYS(ctr->drawbuffers.top.left), 0, 0, CTR_TOP_FRAMEBUFFER_HEIGHT, diff --git a/menu/drivers_display/menu_display_d3d10.c b/menu/drivers_display/menu_display_d3d10.c index 1fcf63f0ca..026bfc70d7 100644 --- a/menu/drivers_display/menu_display_d3d10.c +++ b/menu/drivers_display/menu_display_d3d10.c @@ -262,12 +262,12 @@ static bool menu_display_d3d10_font_init_first( void** font_handle, void* video_data, const char* font_path, - float font_size, + float menu_font_size, bool is_threaded) { font_data_t** handle = (font_data_t**)font_handle; font_data_t* new_handle = font_driver_init_first( - video_data, font_path, font_size, true, + video_data, font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D10_API); if (!new_handle) return false; diff --git a/menu/drivers_display/menu_display_d3d11.c b/menu/drivers_display/menu_display_d3d11.c index 8d8ceb5f2d..33d62f5a10 100644 --- a/menu/drivers_display/menu_display_d3d11.c +++ b/menu/drivers_display/menu_display_d3d11.c @@ -45,14 +45,14 @@ static void* menu_display_d3d11_get_default_mvp(video_frame_info_t *video_info) static void menu_display_d3d11_blend_begin(video_frame_info_t *video_info) { - d3d11_video_t* d3d11 = video_info ? (d3d11_video_t*)video_info->userdata : NULL; + d3d11_video_t* d3d11 = (d3d11_video_t*)video_info->userdata; D3D11SetBlendState(d3d11->context, d3d11->blend_enable, NULL, D3D11_DEFAULT_SAMPLE_MASK); } static void menu_display_d3d11_blend_end(video_frame_info_t *video_info) { - d3d11_video_t* d3d11 = video_info ? (d3d11_video_t*)video_info->userdata : NULL; + d3d11_video_t* d3d11 = (d3d11_video_t*)video_info->userdata; D3D11SetBlendState(d3d11->context, d3d11->blend_disable, NULL, D3D11_DEFAULT_SAMPLE_MASK); } @@ -261,12 +261,12 @@ static bool menu_display_d3d11_font_init_first( void** font_handle, void* video_data, const char* font_path, - float font_size, + float menu_font_size, bool is_threaded) { font_data_t** handle = (font_data_t**)font_handle; font_data_t* new_handle = font_driver_init_first( - video_data, font_path, font_size, true, + video_data, font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D11_API); if (!new_handle) return false; diff --git a/menu/drivers_display/menu_display_d3d12.c b/menu/drivers_display/menu_display_d3d12.c index 75c0650e75..1703cac367 100644 --- a/menu/drivers_display/menu_display_d3d12.c +++ b/menu/drivers_display/menu_display_d3d12.c @@ -45,15 +45,15 @@ static void* menu_display_d3d12_get_default_mvp(video_frame_info_t *video_info) static void menu_display_d3d12_blend_begin(video_frame_info_t *video_info) { - d3d12_video_t* d3d12 = video_info ? (d3d12_video_t*)video_info->userdata : NULL; + d3d12_video_t* d3d12 = (d3d12_video_t*)video_info->userdata; - d3d12->sprites.pipe = d3d12->sprites.pipe_blend; + d3d12->sprites.pipe = d3d12->sprites.pipe_blend; D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe); } static void menu_display_d3d12_blend_end(video_frame_info_t *video_info) { - d3d12_video_t* d3d12 = video_info ? (d3d12_video_t*)video_info->userdata : NULL; + d3d12_video_t* d3d12 = (d3d12_video_t*)video_info->userdata; d3d12->sprites.pipe = d3d12->sprites.pipe_noblend; D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe); @@ -283,12 +283,12 @@ static bool menu_display_d3d12_font_init_first( void** font_handle, void* video_data, const char* font_path, - float font_size, + float menu_font_size, bool is_threaded) { font_data_t** handle = (font_data_t**)font_handle; font_data_t* new_handle = font_driver_init_first( - video_data, font_path, font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D12_API); + video_data, font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D12_API); if (!new_handle) return false; *handle = new_handle; diff --git a/menu/drivers_display/menu_display_d3d9.c b/menu/drivers_display/menu_display_d3d9.c index 4fe2155e61..37faaa120a 100644 --- a/menu/drivers_display/menu_display_d3d9.c +++ b/menu/drivers_display/menu_display_d3d9.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms @@ -297,12 +297,12 @@ static void menu_display_d3d9_clear_color( static bool menu_display_d3d9_font_init_first( void **font_handle, void *video_data, - const char *font_path, float font_size, + const char *font_path, float menu_font_size, bool is_threaded) { font_data_t **handle = (font_data_t**)font_handle; if (!(*handle = font_driver_init_first(video_data, - font_path, font_size, true, + font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D9_API))) return false; diff --git a/menu/drivers_display/menu_display_gdi.c b/menu/drivers_display/menu_display_gdi.c index e4b2f1f746..d2fe232220 100644 --- a/menu/drivers_display/menu_display_gdi.c +++ b/menu/drivers_display/menu_display_gdi.c @@ -75,22 +75,20 @@ static void menu_display_gdi_draw(menu_display_ctx_draw_t *draw, #endif if (!gdi->texDC) - gdi->texDC = CreateCompatibleDC(gdi->winDC); + gdi->texDC = CreateCompatibleDC(gdi->winDC); if (texture->bmp) - { - texture->bmp_old = SelectObject(gdi->texDC, texture->bmp); - } + texture->bmp_old = (HBITMAP)SelectObject(gdi->texDC, texture->bmp); else { /* scale texture data into a bitmap we can easily blit later */ - texture->bmp = CreateCompatibleBitmap(gdi->winDC, draw->width, draw->height); - texture->bmp_old = SelectObject(gdi->texDC, texture->bmp); + texture->bmp = CreateCompatibleBitmap(gdi->winDC, draw->width, draw->height); + texture->bmp_old = (HBITMAP)SelectObject(gdi->texDC, texture->bmp); StretchDIBits(gdi->texDC, 0, 0, draw->width, draw->height, 0, 0, texture->width, texture->height, texture->data, &info, DIB_RGB_COLORS, SRCCOPY); } - gdi->bmp_old = SelectObject(gdi->memDC, gdi->bmp); + gdi->bmp_old = (HBITMAP)SelectObject(gdi->memDC, gdi->bmp); #if _WIN32_WINNT >= 0x0410 /* Win98 */ blend.BlendOp = AC_SRC_OVER; @@ -137,12 +135,12 @@ static void menu_display_gdi_clear_color( static bool menu_display_gdi_font_init_first( void **font_handle, void *video_data, - const char *font_path, float font_size, + const char *font_path, float gdi_font_size, bool is_threaded) { font_data_t **handle = (font_data_t**)font_handle; if (!(*handle = font_driver_init_first(video_data, - font_path, font_size, true, + font_path, gdi_font_size, true, is_threaded, FONT_DRIVER_RENDER_GDI))) return false; diff --git a/menu/drivers_display/menu_display_gl.c b/menu/drivers_display/menu_display_gl.c index 3c5664bae6..385c476af6 100644 --- a/menu/drivers_display/menu_display_gl.c +++ b/menu/drivers_display/menu_display_gl.c @@ -238,12 +238,12 @@ static void menu_display_gl_clear_color( static bool menu_display_gl_font_init_first( void **font_handle, void *video_data, - const char *font_path, float font_size, + const char *font_path, float menu_font_size, bool is_threaded) { font_data_t **handle = (font_data_t**)font_handle; if (!(*handle = font_driver_init_first(video_data, - font_path, font_size, true, + font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_OPENGL_API))) return false; diff --git a/menu/drivers_display/menu_display_metal.m b/menu/drivers_display/menu_display_metal.m index 1d7d4430a0..f6b0eebcfb 100644 --- a/menu/drivers_display/menu_display_metal.m +++ b/menu/drivers_display/menu_display_metal.m @@ -157,4 +157,3 @@ menu_display_ctx_driver_t menu_display_ctx_metal = { .scissor_begin = menu_display_metal_scissor_begin, .scissor_end = menu_display_metal_scissor_end }; - diff --git a/menu/drivers_display/menu_display_null.c b/menu/drivers_display/menu_display_null.c index e8e3ad8faa..1ae4665c8d 100644 --- a/menu/drivers_display/menu_display_null.c +++ b/menu/drivers_display/menu_display_null.c @@ -64,7 +64,7 @@ static void menu_display_null_clear_color( static bool menu_display_null_font_init_first( void **font_handle, void *video_data, - const char *font_path, float font_size, + const char *font_path, float menu_font_size, bool is_threaded) { return true; diff --git a/menu/drivers_display/menu_display_vita2d.c b/menu/drivers_display/menu_display_vita2d.c index d97b3f2437..b1d439cdb6 100644 --- a/menu/drivers_display/menu_display_vita2d.c +++ b/menu/drivers_display/menu_display_vita2d.c @@ -102,7 +102,6 @@ static void menu_display_vita2d_viewport(menu_display_ctx_draw_t *draw, #endif } - static void menu_display_vita2d_draw(menu_display_ctx_draw_t *draw, video_frame_info_t *video_info) { diff --git a/menu/drivers_display/menu_display_vulkan.c b/menu/drivers_display/menu_display_vulkan.c index 6bae63a2d6..022ece580b 100644 --- a/menu/drivers_display/menu_display_vulkan.c +++ b/menu/drivers_display/menu_display_vulkan.c @@ -332,11 +332,11 @@ static void menu_display_vk_blend_end(video_frame_info_t *video_info) static bool menu_display_vk_font_init_first( void **font_handle, void *video_data, const char *font_path, - float font_size, bool is_threaded) + float menu_font_size, bool is_threaded) { font_data_t **handle = (font_data_t**)font_handle; *handle = font_driver_init_first(video_data, - font_path, font_size, true, + font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_VULKAN_API); @@ -349,21 +349,21 @@ static bool menu_display_vk_font_init_first( static void menu_display_vk_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height) { - vk_t *vk = video_info ? (vk_t*)video_info->userdata : NULL; + vk_t *vk = (vk_t*)video_info->userdata; - vk->tracker.use_scissor = true; - vk->tracker.scissor.offset.x = x; - vk->tracker.scissor.offset.y = y; - vk->tracker.scissor.extent.width = width; + vk->tracker.use_scissor = true; + vk->tracker.scissor.offset.x = x; + vk->tracker.scissor.offset.y = y; + vk->tracker.scissor.extent.width = width; vk->tracker.scissor.extent.height = height; - vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT; + vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT; } static void menu_display_vk_scissor_end(video_frame_info_t *video_info) { - vk_t *vk = video_info ? (vk_t*)video_info->userdata : NULL; - vk->tracker.use_scissor = false; - vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT; + vk_t *vk = (vk_t*)video_info->userdata; + vk->tracker.use_scissor = false; + vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT; } menu_display_ctx_driver_t menu_display_ctx_vulkan = { diff --git a/menu/drivers_display/menu_display_wiiu.c b/menu/drivers_display/menu_display_wiiu.c index 42f0c300cf..fdf50010e1 100644 --- a/menu/drivers_display/menu_display_wiiu.c +++ b/menu/drivers_display/menu_display_wiiu.c @@ -60,7 +60,6 @@ static void menu_display_wiiu_viewport(menu_display_ctx_draw_t *draw, } - static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw, video_frame_info_t *video_info) { @@ -115,17 +114,14 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw, break; } - } else if(draw->coords->vertex || draw->coords->color[0] != draw->coords->color[12]) { if (wiiu->vertex_cache_tex.current + 4 > wiiu->vertex_cache_tex.size) return; - tex_shader_vertex_t* v = wiiu->vertex_cache_tex.v + wiiu->vertex_cache_tex.current; - GX2SetShaderMode(GX2_SHADER_MODE_UNIFORM_BLOCK); GX2SetShader(&tex_shader); GX2SetVertexUniformBlock(tex_shader.vs.uniformBlocks[0].offset, @@ -188,7 +184,6 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw, v[i].color.a = draw->coords->color[(i << 2) + 3]; } - if(draw->texture) GX2SetPixelTexture((GX2Texture*)draw->texture, tex_shader.ps.samplerVars[0].location); @@ -221,9 +216,6 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw, return; } - - - GX2SetShaderMode(GX2_SHADER_MODE_GEOMETRY_SHADER); GX2SetShader(&sprite_shader); // GX2SetGeometryShaderInputRingBuffer(wiiu->input_ring_buffer, wiiu->input_ring_buffer_size); diff --git a/menu/menu_animation.c b/menu/menu_animation.c index d55bad6166..fbdb8451ae 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -473,7 +473,7 @@ bool menu_animation_push(menu_animation_ctx_entry_t *entry) return true; } -bool menu_animation_update(float delta_time) +bool menu_animation_update(float anim_delta_time) { unsigned i; @@ -482,8 +482,8 @@ bool menu_animation_update(float delta_time) for(i = 0; i < da_count(anim.list); i++) { - struct tween *tween = da_getptr(anim.list, i); - tween->running_since += delta_time; + struct tween *tween = da_getptr(anim.list, i); + tween->running_since += anim_delta_time; *tween->subject = tween->easing( tween->running_since, @@ -523,7 +523,7 @@ bool menu_animation_update(float delta_time) da_clear(anim.pending); } - anim.in_update = false; + anim.in_update = false; animation_is_active = da_count(anim.list) > 0; return animation_is_active; diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index 717ca7a302..6fccf1a8d4 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -286,6 +286,9 @@ void menu_cbs_init(void *data, int menu_cbs_exit(void); +void cb_generic_download(void *task_data, + void *user_data, const char *err); + RETRO_END_DECLS #endif diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 8e2f2e8c16..60000e98e7 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2,7 +2,7 @@ * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2014-2017 - Jean-André Santoni * Copyright (C) 2015-2017 - Andrés Suárez - * Copyright (C) 2016-2017 - Brad Parker + * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -201,7 +201,6 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) MENU_ENUM_LABEL_CORE_INFO_ENTRY, MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } - if (core_info->display_name) { fill_pathname_join_concat_noext(tmp, @@ -1771,7 +1770,6 @@ static int menu_displaylist_parse_database_entry(menu_handle_t *menu, goto error; } - if (db_info_entry->developer) { for (k = 0; k < db_info_entry->developer->size; k++) @@ -2062,7 +2060,6 @@ static int menu_database_parse_query(file_list_t *list, const char *path, } #endif - static unsigned deferred_push_video_shader_parameters_common( menu_displaylist_info_t *info, struct video_shader *shader, unsigned base_parameter) @@ -2448,7 +2445,6 @@ static int menu_displaylist_parse_settings_internal_enum(void *data, goto loop; #endif - menu_entries_append_enum(info->list, short_description, name, enum_idx, menu_setting_set_flags(setting), 0, 0); count++; @@ -2517,7 +2513,6 @@ static void menu_displaylist_set_new_playlist( sizeof(menu->db_playlist_file)); } - static int menu_displaylist_parse_horizontal_list( menu_handle_t *menu, menu_displaylist_info_t *info) @@ -2619,7 +2614,6 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION_SCREENSHOT, 0, 0); } - if (settings->bools.quick_menu_show_save_load_state #ifdef HAVE_CHEEVOS && !cheevos_hardcore_active @@ -2662,7 +2656,6 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION_LOADSTATE, 0, 0); } - if (settings->bools.quick_menu_show_add_to_favorites) { menu_entries_append_enum(info->list, @@ -2799,7 +2792,6 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION, 0, 0); } - #ifdef HAVE_CHEEVOS if(settings->bools.cheevos_enable) { @@ -4326,6 +4318,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist menu_handle_t *menu = NULL; bool load_content = true; bool use_filebrowser = false; + static bool core_selected = false; unsigned count = 0; int ret = 0; @@ -4755,7 +4748,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist path_playlist[0] = '\0'; - fill_pathname_join( path_playlist, settings->paths.directory_playlist, @@ -5062,6 +5054,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist info->need_sort = true; info->need_refresh = true; info->need_push = true; + core_selected = true; { unsigned cores_names_len = 0; @@ -5252,6 +5245,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist ret = menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, PARSE_ONLY_BOOL, false); + ret = menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT, + PARSE_ONLY_BOOL, false); menu_displaylist_parse_playlist_associations(info); info->need_push = true; @@ -5456,7 +5452,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist if ( setting ) setting->max = cheat_manager_state.total_memory_size>0?cheat_manager_state.total_memory_size-1:0 ; - menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_CHEAT_IDX, PARSE_ONLY_UINT, false); @@ -5569,7 +5564,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); - menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_CHEAT_START_OR_RESTART, PARSE_ONLY_UINT, false); @@ -5648,8 +5642,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist MENU_ENUM_LABEL_CHEAT_BROWSE_MEMORY, PARSE_ONLY_UINT, false); - - setting = menu_setting_find_enum(MENU_ENUM_LABEL_CHEAT_DELETE_MATCH); if (setting) setting->max = cheat_manager_state.num_matches-1; @@ -5994,6 +5986,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION, PARSE_ONLY_BOOL, false) == 0) count++; + if (menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME, + PARSE_ONLY_UINT, false) == 0) + count++; if (menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_ENTRY_NORMAL_COLOR, PARSE_ONLY_HEX, false) == 0) @@ -6807,7 +6803,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist unsigned i; menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); +#if 1 + /* TODO - for developers - + * turn this into #if 0 if you want to be able to see + * the system streams as well. */ for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++) +#else + for (i = 0; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++) +#endif { char msg[128]; char msg_lbl[128]; @@ -7112,6 +7115,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist ret = menu_displaylist_parse_horizontal_content_actions(menu, info); info->need_refresh = true; info->need_push = true; + + if (core_selected) + { + info->need_clear = true; + core_selected = false; + } + break; case DISPLAYLIST_CONTENT_SETTINGS: menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); @@ -7874,7 +7884,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist filebrowser_clear_type(); info->type_default = FILE_TYPE_SHADER; - if (video_shader_is_supported(RARCH_SHADER_CG) && video_shader_get_type_from_ext("cg", &is_preset) != RARCH_SHADER_NONE) @@ -8131,19 +8140,26 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist if (tmp_str_list && tmp_str_list->size > 0) { core_option_manager_t *coreopts = NULL; + const char *val = NULL; rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts); if (coreopts) { + settings_t *settings = config_get_ptr(); unsigned size = (unsigned)tmp_str_list->size; unsigned i = atoi(tmp_str_list->elems[size-1].data); struct core_option *option = NULL; bool checked_found = false; unsigned checked = 0; - const char *val = core_option_manager_get_val(coreopts, i-1); - i--; + if (settings->bools.game_specific_options) + { + val = core_option_manager_get_val(coreopts, i-1); + i--; + } + else + val = core_option_manager_get_val(coreopts, i); option = (struct core_option*)&coreopts->opts[i]; @@ -8439,7 +8455,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); { unsigned i, size = 0; - struct video_display_config *list = video_display_server_get_resolution_list(&size); + struct video_display_config *list = (struct video_display_config*) + video_display_server_get_resolution_list(&size); if (list) { diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 29657d93ae..2f90e38a87 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -85,26 +85,26 @@ float osk_dark[16] = { /* Menu drivers */ static const menu_ctx_driver_t *menu_ctx_drivers[] = { -#if defined(HAVE_OZONE) - &menu_ctx_ozone, -#endif -#if defined(HAVE_XUI) - &menu_ctx_xui, -#endif #if defined(HAVE_MATERIALUI) &menu_ctx_mui, #endif #if defined(HAVE_NUKLEAR) &menu_ctx_nuklear, #endif -#if defined(HAVE_XMB) - &menu_ctx_xmb, +#if defined(HAVE_OZONE) + &menu_ctx_ozone, +#endif +#if defined(HAVE_RGUI) + &menu_ctx_rgui, #endif #if defined(HAVE_STRIPES) &menu_ctx_stripes, #endif -#if defined(HAVE_RGUI) - &menu_ctx_rgui, +#if defined(HAVE_XMB) + &menu_ctx_xmb, +#endif +#if defined(HAVE_XUI) + &menu_ctx_xui, #endif #if defined(HAVE_ZARCH) &menu_ctx_zarch, @@ -451,7 +451,7 @@ void menu_display_font_free(font_data_t *font) * to the menu driver */ font_data_t *menu_display_font( enum application_special_type type, - float font_size, + float menu_font_size, bool is_threaded) { char fontpath[PATH_MAX_LENGTH]; @@ -464,10 +464,10 @@ font_data_t *menu_display_font( fill_pathname_application_special( fontpath, sizeof(fontpath), type); - return menu_display_font_file(fontpath, font_size, is_threaded); + return menu_display_font_file(fontpath, menu_font_size, is_threaded); } -font_data_t *menu_display_font_file(char* fontpath, float font_size, bool is_threaded) +font_data_t *menu_display_font_file(char* fontpath, float menu_font_size, bool is_threaded) { font_data_t *font_data = NULL; if (!menu_disp) @@ -475,7 +475,7 @@ font_data_t *menu_display_font_file(char* fontpath, float font_size, bool is_thr if (!menu_disp->font_init_first((void**)&font_data, video_driver_get_ptr(false), - fontpath, font_size, is_threaded)) + fontpath, menu_font_size, is_threaded)) return NULL; return font_data; @@ -2072,8 +2072,9 @@ static bool menu_driver_init_internal(bool video_is_threaded) if (menu_driver_data) return true; - menu_driver_data = (menu_handle_t*) - menu_driver_ctx->init(&menu_userdata, video_is_threaded); + if (menu_driver_ctx->init) + menu_driver_data = (menu_handle_t*) + menu_driver_ctx->init(&menu_userdata, video_is_threaded); if (!menu_driver_data || !menu_init(menu_driver_data)) goto error; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index dcded3f3b3..681ac785a3 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -127,7 +127,7 @@ enum rarch_menu_ctl_state MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL }; -#define MENU_SETTINGS_AUDIO_MIXER_MAX_STREAMS (AUDIO_MIXER_MAX_STREAMS-1) +#define MENU_SETTINGS_AUDIO_MIXER_MAX_STREAMS (AUDIO_MIXER_MAX_SYSTEM_STREAMS-1) enum menu_settings_type { @@ -230,7 +230,7 @@ enum menu_settings_type MENU_SETTINGS_CHEAT_BEGIN, MENU_SETTINGS_CHEAT_END = MENU_SETTINGS_CHEAT_BEGIN + (MAX_CHEAT_COUNTERS - 1), MENU_SETTINGS_INPUT_BEGIN, - MENU_SETTINGS_INPUT_END = MENU_SETTINGS_INPUT_BEGIN + RARCH_CUSTOM_BIND_LIST_END, + MENU_SETTINGS_INPUT_END = MENU_SETTINGS_INPUT_BEGIN + RARCH_CUSTOM_BIND_LIST_END + 6, MENU_SETTINGS_INPUT_DESC_BEGIN, MENU_SETTINGS_INPUT_DESC_END = MENU_SETTINGS_INPUT_DESC_BEGIN + ((RARCH_FIRST_CUSTOM_BIND + 8) * MAX_USERS), MENU_SETTINGS_INPUT_DESC_KBD_BEGIN, @@ -246,13 +246,51 @@ enum menu_settings_type MENU_SET_SWITCH_GPU_PROFILE, MENU_SET_SWITCH_BRIGHTNESS, #endif -#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) +#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) MENU_SET_SWITCH_CPU_PROFILE, #endif MENU_SETTINGS_LAST }; +enum rgui_color_theme +{ + RGUI_THEME_CUSTOM = 0, + RGUI_THEME_CLASSIC_RED, + RGUI_THEME_CLASSIC_ORANGE, + RGUI_THEME_CLASSIC_YELLOW, + RGUI_THEME_CLASSIC_GREEN, + RGUI_THEME_CLASSIC_BLUE, + RGUI_THEME_CLASSIC_VIOLET, + RGUI_THEME_CLASSIC_GREY, + RGUI_THEME_LEGACY_RED, + RGUI_THEME_DARK_PURPLE, + RGUI_THEME_MIDNIGHT_BLUE, + RGUI_THEME_GOLDEN, + RGUI_THEME_ELECTRIC_BLUE, + RGUI_THEME_APPLE_GREEN, + RGUI_THEME_VOLCANIC_RED, + RGUI_THEME_LAGOON, + RGUI_THEME_BROGRAMMER, + RGUI_THEME_DRACULA, + RGUI_THEME_FAIRYFLOSS, + RGUI_THEME_FLATUI, + RGUI_THEME_GRUVBOX_DARK, + RGUI_THEME_GRUVBOX_LIGHT, + RGUI_THEME_HACKING_THE_KERNEL, + RGUI_THEME_NORD, + RGUI_THEME_NOVA, + RGUI_THEME_ONE_DARK, + RGUI_THEME_PALENIGHT, + RGUI_THEME_SOLARIZED_DARK, + RGUI_THEME_SOLARIZED_LIGHT, + RGUI_THEME_TANGO_DARK, + RGUI_THEME_TANGO_LIGHT, + RGUI_THEME_ZENBURN, + RGUI_THEME_ANTI_ZENBURN, + RGUI_THEME_LAST +}; + enum materialui_color_theme { MATERIALUI_THEME_BLUE = 0, @@ -399,7 +437,6 @@ typedef struct menu_display_ctx_driver void (*scissor_end)(video_frame_info_t *video_info); } menu_display_ctx_driver_t; - typedef struct { unsigned rpl_entry_selection_ptr; diff --git a/menu/menu_entries.c b/menu/menu_entries.c index d9f4bae160..161ada057d 100644 --- a/menu/menu_entries.c +++ b/menu/menu_entries.c @@ -235,7 +235,6 @@ static void menu_list_flush_stack(menu_list_t *list, } } - void menu_entries_get_at_offset(const file_list_t *list, size_t idx, const char **path, const char **label, unsigned *file_type, size_t *entry_idx, const char **alt) @@ -338,7 +337,6 @@ static void menu_entries_build_scroll_indices(file_list_t *list) current_is_dir = is_dir; } - scroll_value = list->size - 1; menu_driver_ctl(MENU_NAVIGATION_CTL_ADD_SCROLL_INDEX, &scroll_value); } diff --git a/menu/menu_input.c b/menu/menu_input.c index 1930307488..71f29e5f3e 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -651,7 +651,6 @@ static int menu_input_mouse_frame( return ret; } - int16_t menu_input_pointer_state(enum menu_input_pointer_state state) { menu_input_t *menu_input = &menu_input_state; @@ -893,4 +892,3 @@ void menu_input_post_iterate(int *ret, unsigned action) menu_entry_free(&entry); } - diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 5bf9a944d2..9fac37f45f 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -2,7 +2,7 @@ * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2014-2017 - Jean-André Santoni - * Copyright (C) 2016-2017 - Brad Parker + * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -52,7 +52,6 @@ #include "../cheevos/cheevos.h" #endif - #include "../frontend/frontend_driver.h" #include "widgets/menu_input_bind_dialog.h" @@ -188,7 +187,6 @@ static int setting_action_ok_bind_all_save_autoconfig(rarch_setting_t *setting, runloop_msg_queue_push( msg_hash_to_str(MSG_AUTOCONFIG_FILE_ERROR_SAVING), 1, 100, true); - return 0; } @@ -578,6 +576,216 @@ static void setting_get_string_representation_uint_menu_timedate_style( } } +static void setting_get_string_representation_uint_rgui_menu_color_theme( + rarch_setting_t *setting, + char *s, size_t len) +{ + if (!setting) + return; + + switch (*setting->value.target.unsigned_integer) + { + case RGUI_THEME_CUSTOM: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM), + len); + break; + case RGUI_THEME_CLASSIC_RED: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED), + len); + break; + case RGUI_THEME_CLASSIC_ORANGE: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE), + len); + break; + case RGUI_THEME_CLASSIC_YELLOW: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW), + len); + break; + case RGUI_THEME_CLASSIC_GREEN: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN), + len); + break; + case RGUI_THEME_CLASSIC_BLUE: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE), + len); + break; + case RGUI_THEME_CLASSIC_VIOLET: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET), + len); + break; + case RGUI_THEME_CLASSIC_GREY: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY), + len); + break; + case RGUI_THEME_LEGACY_RED: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED), + len); + break; + case RGUI_THEME_DARK_PURPLE: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE), + len); + break; + case RGUI_THEME_MIDNIGHT_BLUE: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE), + len); + break; + case RGUI_THEME_GOLDEN: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GOLDEN), + len); + break; + case RGUI_THEME_ELECTRIC_BLUE: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE), + len); + break; + case RGUI_THEME_APPLE_GREEN: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN), + len); + break; + case RGUI_THEME_VOLCANIC_RED: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED), + len); + break; + case RGUI_THEME_LAGOON: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON), + len); + break; + case RGUI_THEME_BROGRAMMER: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_BROGRAMMER), + len); + break; + case RGUI_THEME_DRACULA: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA), + len); + break; + case RGUI_THEME_FAIRYFLOSS: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS), + len); + break; + case RGUI_THEME_FLATUI: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI), + len); + break; + case RGUI_THEME_GRUVBOX_DARK: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK), + len); + break; + case RGUI_THEME_GRUVBOX_LIGHT: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT), + len); + break; + case RGUI_THEME_HACKING_THE_KERNEL: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL), + len); + break; + case RGUI_THEME_NORD: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NORD), + len); + break; + case RGUI_THEME_NOVA: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NOVA), + len); + break; + case RGUI_THEME_ONE_DARK: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK), + len); + break; + case RGUI_THEME_PALENIGHT: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_PALENIGHT), + len); + break; + case RGUI_THEME_SOLARIZED_DARK: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK), + len); + break; + case RGUI_THEME_SOLARIZED_LIGHT: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT), + len); + break; + case RGUI_THEME_TANGO_DARK: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK), + len); + break; + case RGUI_THEME_TANGO_LIGHT: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT), + len); + break; + case RGUI_THEME_ZENBURN: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ZENBURN), + len); + break; + case RGUI_THEME_ANTI_ZENBURN: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ANTI_ZENBURN), + len); + break; + } +} + static void setting_get_string_representation_uint_xmb_icon_theme( rarch_setting_t *setting, char *s, size_t len) @@ -792,8 +1000,6 @@ static void setting_get_string_representation_uint_xmb_menu_color_theme( } #endif - - #ifdef HAVE_OZONE static void setting_get_string_representation_uint_ozone_menu_color_theme( rarch_setting_t *setting, @@ -1042,7 +1248,6 @@ static int setting_action_left_libretro_device_type( return 0; } - static int setting_uint_action_left_crt_switch_resolution_super( rarch_setting_t *setting, bool wraparound) { @@ -1090,7 +1295,6 @@ static int setting_action_left_bind_device(rarch_setting_t *setting, bool wrapar return 0; } - static int setting_action_left_mouse_index(rarch_setting_t *setting, bool wraparound) { settings_t *settings = config_get_ptr(); @@ -1228,7 +1432,6 @@ static int setting_string_action_left_driver(rarch_setting_t *setting, return 0; } - #ifdef HAVE_NETWORKING static int setting_string_action_left_netplay_mitm_server( rarch_setting_t *setting, bool wraparound) @@ -2024,7 +2227,6 @@ void menu_settings_list_current_add_enum_value_idx( (*list)[idx].enum_value_idx = enum_idx; } - int menu_setting_generic(rarch_setting_t *setting, bool wraparound) { uint64_t flags = setting->flags; @@ -2342,7 +2544,6 @@ static int setting_action_start_bind_device(rarch_setting_t *setting) return 0; } - static int setting_action_start_custom_viewport_width(rarch_setting_t *setting) { video_viewport_t vp; @@ -2395,8 +2596,6 @@ static int setting_action_start_custom_viewport_height(rarch_setting_t *setting) return 0; } - - static int setting_action_start_analog_dpad_mode(rarch_setting_t *setting) { if (!setting) @@ -2618,7 +2817,6 @@ static void get_string_representation_bind_device(rarch_setting_t *setting, char strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISABLED), len); } - /** * menu_setting_get_label: * @list : File list on which to perform the search @@ -3576,7 +3774,6 @@ static bool setting_append_list( &subgroup_info, parent_group); - if (settings->bools.history_list_enable) { CONFIG_ACTION( @@ -4300,7 +4497,6 @@ static bool setting_append_list( bool_entries[i].flags); } - END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group); } @@ -4558,7 +4754,6 @@ static bool setting_append_list( &setting_get_string_representation_uint_autosave_interval; #endif - END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group); } @@ -4687,8 +4882,6 @@ static bool setting_append_list( START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group); - - config_uint_cbs(cheat_manager_state.working_cheat.idx, CHEAT_IDX, NULL,NULL, 0,&setting_get_string_representation_uint,0,cheat_manager_get_size()-1,1) ; @@ -4896,7 +5089,6 @@ static bool setting_append_list( (*list)[list_info->index - 1].get_string_representation = &setting_get_string_representation_uint_cheat_exact; (*list)[list_info->index - 1].action_ok = &cheat_manager_search_exact; - CONFIG_UINT( list, list_info, &cheat_manager_state.dummy, @@ -5059,7 +5251,6 @@ static bool setting_append_list( (*list)[list_info->index - 1].action_right = &setting_uint_action_right_with_refresh; (*list)[list_info->index - 1].get_string_representation = &setting_get_string_representation_uint_cheat_browse_address; - END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group); break; @@ -5136,8 +5327,6 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); - - CONFIG_BOOL( list, list_info, &settings->bools.video_framecount_show, @@ -6581,7 +6770,6 @@ static bool setting_append_list( END_SUB_GROUP(list, list_info, parent_group); - START_SUB_GROUP( list, list_info, @@ -7514,7 +7702,6 @@ static bool setting_append_list( settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED); } - CONFIG_BOOL( list, list_info, &settings->bools.menu_pause_libretro, @@ -7634,7 +7821,22 @@ static bool setting_append_list( SD_FLAG_NONE ); - /* These colors are hints. The menu driver is not required to use them. */ + CONFIG_UINT( + list, list_info, + &settings->uints.menu_rgui_color_theme, + MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME, + rgui_color_theme, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_ok = &setting_action_ok_uint; + (*list)[list_info->index - 1].get_string_representation = + &setting_get_string_representation_uint_rgui_menu_color_theme; + menu_settings_list_current_add_range(list, list_info, 0, RGUI_THEME_LAST-1, 1, true, true); + CONFIG_HEX( list, list_info, &settings->uints.menu_entry_normal_color, @@ -7676,7 +7878,7 @@ static bool setting_append_list( general_read_handler); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED); - + CONFIG_HEX( list, list_info, &settings->uints.menu_bg_dark_color, @@ -7690,7 +7892,7 @@ static bool setting_append_list( general_read_handler); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED); - + CONFIG_HEX( list, list_info, &settings->uints.menu_bg_light_color, @@ -7704,7 +7906,7 @@ static bool setting_append_list( general_read_handler); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED); - + CONFIG_HEX( list, list_info, &settings->uints.menu_border_dark_color, @@ -7718,7 +7920,7 @@ static bool setting_append_list( general_read_handler); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED); - + CONFIG_HEX( list, list_info, &settings->uints.menu_border_light_color, @@ -7759,7 +7961,6 @@ static bool setting_append_list( #endif } - END_SUB_GROUP(list, list_info, parent_group); START_SUB_GROUP(list, list_info, "Navigation", &group_info, &subgroup_info, parent_group); @@ -7848,7 +8049,6 @@ static bool setting_append_list( ); #endif - END_SUB_GROUP(list, list_info, parent_group); START_SUB_GROUP(list, list_info, "Display", &group_info, &subgroup_info, parent_group); @@ -8207,7 +8407,6 @@ static bool setting_append_list( general_read_handler, SD_FLAG_LAKKA_ADVANCED); - #ifdef HAVE_LAKKA CONFIG_BOOL( list, list_info, @@ -8704,7 +8903,6 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); - #ifdef HAVE_IMAGEVIEWER CONFIG_BOOL( list, list_info, @@ -9264,6 +9462,22 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.playlist_use_old_format, + MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT, + MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, + playlist_use_old_format, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE + ); + END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group); @@ -9756,7 +9970,6 @@ static bool setting_append_list( &subgroup_info, parent_group); - #if defined(HAVE_NETWORK_CMD) CONFIG_BOOL( list, list_info, @@ -9830,7 +10043,6 @@ static bool setting_append_list( snprintf(s1, sizeof(s1), "%s_user_p%d", msg_hash_to_str(MENU_ENUM_LABEL_NETWORK_REMOTE_ENABLE), user + 1); snprintf(s2, sizeof(s2), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE), user + 1); - CONFIG_BOOL_ALT( list, list_info, &settings->bools.network_remote_enable_user[user], @@ -10669,7 +10881,6 @@ static bool setting_append_list( break; } - return true; } diff --git a/menu/menu_shader.c b/menu/menu_shader.c index 1dbb2aaf71..c547bfc26c 100644 --- a/menu/menu_shader.c +++ b/menu/menu_shader.c @@ -208,7 +208,9 @@ bool menu_shader_manager_set_preset(void *data, } config_file_free(conf); +#ifdef HAVE_MENU menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh); +#endif return true; } @@ -341,7 +343,7 @@ bool menu_shader_manager_save_preset( if (!string_is_empty(basename)) strlcpy(preset_path, buffer, sizeof(preset_path)); - if (config_file_write(conf, preset_path)) + if (config_file_write(conf, preset_path, true)) { RARCH_LOG("Saved shader preset to %s.\n", preset_path); if (apply) @@ -361,7 +363,7 @@ bool menu_shader_manager_save_preset( fill_pathname_join(preset_path, dirs[d], buffer, sizeof(preset_path)); - if (config_file_write(conf, preset_path)) + if (config_file_write(conf, preset_path, true)) { RARCH_LOG("Saved shader preset to %s.\n", preset_path); if (apply) @@ -394,7 +396,10 @@ int menu_shader_manager_clear_num_passes(void) if (shader->passes) shader->passes = 0; +#ifdef HAVE_MENU menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh); +#endif + video_shader_resolve_parameters(NULL, shader); return 0; diff --git a/menu/widgets/menu_filebrowser.c b/menu/widgets/menu_filebrowser.c index 4175bcb9ba..3475f316fe 100644 --- a/menu/widgets/menu_filebrowser.c +++ b/menu/widgets/menu_filebrowser.c @@ -110,7 +110,6 @@ void filebrowser_parse(menu_displaylist_info_t *info, unsigned type_data) true, settings->bools.show_hidden_files, true, false); } - switch (filebrowser_types) { case FILEBROWSER_SCAN_DIR: diff --git a/menu/widgets/menu_input_bind_dialog.c b/menu/widgets/menu_input_bind_dialog.c index b10df5f55c..fae4213551 100644 --- a/menu/widgets/menu_input_bind_dialog.c +++ b/menu/widgets/menu_input_bind_dialog.c @@ -391,7 +391,6 @@ static bool menu_input_key_bind_poll_find_trigger_pad( return false; } - static bool menu_input_key_bind_poll_find_hold_pad( struct menu_bind_state *new_state, struct retro_keybind * output, diff --git a/menu/widgets/menu_input_dialog.c b/menu/widgets/menu_input_dialog.c index 1017c4c4d5..37c61699ff 100644 --- a/menu/widgets/menu_input_dialog.c +++ b/menu/widgets/menu_input_dialog.c @@ -21,6 +21,12 @@ #include "../menu_driver.h" #include "../../input/input_driver.h" +#ifdef HAVE_LIBNX +#include +#include "../../switch_performance_profiles.h" +#include "menu_osk.h" +#endif + static const char **menu_input_dialog_keyboard_buffer = {NULL}; static bool menu_input_dialog_keyboard_display = false; static unsigned menu_input_dialog_keyboard_type = 0; @@ -84,8 +90,74 @@ unsigned menu_input_dialog_get_kb_idx(void) return menu_input_dialog_keyboard_idx; } +#ifdef HAVE_LIBNX +#define LIBNX_SWKBD_LIMIT 500 /* enforced by HOS */ +extern u32 __nx_applet_type; +extern void libnx_apply_overclock(); +#endif + bool menu_input_dialog_get_display_kb(void) { +#ifdef HAVE_LIBNX + /* swkbd only works on "real" titles */ + if (__nx_applet_type != AppletType_Application && __nx_applet_type != AppletType_SystemApplication) + return menu_input_dialog_keyboard_display; + + if (!menu_input_dialog_keyboard_display) + return false; + + SwkbdConfig kbd; + + pcvSetClockRate(PcvModule_Cpu, SWITCH_CPU_SPEEDS_VALUES[SWITCH_DEFAULT_CPU_PROFILE]); + + Result rc = swkbdCreate(&kbd, 0); + + if (R_SUCCEEDED(rc)) + { + char buf[LIBNX_SWKBD_LIMIT] = {'\0'}; + swkbdConfigMakePresetDefault(&kbd); + + swkbdConfigSetGuideText(&kbd, menu_input_dialog_keyboard_label); + + rc = swkbdShow(&kbd, buf, sizeof(buf)); + + swkbdClose(&kbd); + + /* RetroArch uses key-by-key input + so we need to simulate it */ + for (int i = 0; i < LIBNX_SWKBD_LIMIT; i++) + { + /* In case a previous "Enter" press closed the keyboard */ + if (!menu_input_dialog_keyboard_display) + break; + + if (buf[i] == '\n' || buf[i] == '\0') + input_keyboard_event(true, '\n', '\n', 0, RETRO_DEVICE_KEYBOARD); + else + { + /* input_keyboard_line_append expects a null-terminated + string, so just make one (yes, the touch keyboard is + a list of "null-terminated characters") */ + char oldchar = buf[i+1]; + buf[i+1] = '\0'; + input_keyboard_line_append(&buf[i]); + buf[i+1] = oldchar; + } + } + + /* fail-safe */ + if (menu_input_dialog_keyboard_display) + input_keyboard_event(true, '\n', '\n', 0, RETRO_DEVICE_KEYBOARD); + + libnx_apply_overclock(); + return false; + } + else + { + libnx_apply_overclock(); + return menu_input_dialog_keyboard_display; + } +#endif return menu_input_dialog_keyboard_display; } diff --git a/movie.c b/movie.c index acc0e7554c..b6a9a94390 100644 --- a/movie.c +++ b/movie.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "configuration.h" #include "movie.h" @@ -34,42 +33,8 @@ #include "command.h" #include "file_path_special.h" -struct bsv_movie -{ - intfstream_t *file; - - /* A ring buffer keeping track of positions - * in the file for each frame. */ - size_t *frame_pos; - size_t frame_mask; - size_t frame_ptr; - - size_t min_file_pos; - - size_t state_size; - uint8_t *state; - - bool playback; - bool first_rewind; - bool did_rewind; -}; - -struct bsv_state -{ - bool movie_start_recording; - bool movie_start_playback; - bool movie_playback; - bool eof_exit; - bool movie_end; - - /* Movie playback/recording support. */ - char movie_path[PATH_MAX_LENGTH]; - /* Immediate playback/recording. */ - char movie_start_path[PATH_MAX_LENGTH]; -}; - -static bsv_movie_t *bsv_movie_state_handle = NULL; -static struct bsv_state bsv_movie_state; +bsv_movie_t *bsv_movie_state_handle = NULL; +struct bsv_state bsv_movie_state; static bool bsv_movie_init_playback(bsv_movie_t *handle, const char *path) { @@ -259,28 +224,6 @@ error: return NULL; } -/* Used for rewinding while playback/record. */ -void bsv_movie_set_frame_start(void) -{ - if (bsv_movie_state_handle) - bsv_movie_state_handle->frame_pos[bsv_movie_state_handle->frame_ptr] - = intfstream_tell(bsv_movie_state_handle->file); -} - -void bsv_movie_set_frame_end(void) -{ - if (!bsv_movie_state_handle) - return; - - bsv_movie_state_handle->frame_ptr = - (bsv_movie_state_handle->frame_ptr + 1) - & bsv_movie_state_handle->frame_mask; - - bsv_movie_state_handle->first_rewind = - !bsv_movie_state_handle->did_rewind; - bsv_movie_state_handle->did_rewind = false; -} - static void bsv_movie_frame_rewind(bsv_movie_t *handle) { handle->did_rewind = true; @@ -413,11 +356,6 @@ bool bsv_movie_is_playback_off(void) return bsv_movie_state_handle && !bsv_movie_state.movie_playback; } -bool bsv_movie_is_end_of_file(void) -{ - return bsv_movie_state.movie_end && bsv_movie_state.eof_exit; -} - bool bsv_movie_ctl(enum bsv_ctl_state state, void *data) { switch (state) diff --git a/movie.h b/movie.h index 14372d84fe..d96bf2d108 100644 --- a/movie.h +++ b/movie.h @@ -22,6 +22,8 @@ #include #include +#include +#include RETRO_BEGIN_DECLS @@ -56,6 +58,40 @@ enum bsv_ctl_state BSV_MOVIE_CTL_UNSET_END }; +struct bsv_state +{ + bool movie_start_recording; + bool movie_start_playback; + bool movie_playback; + bool eof_exit; + bool movie_end; + + /* Movie playback/recording support. */ + char movie_path[PATH_MAX_LENGTH]; + /* Immediate playback/recording. */ + char movie_start_path[PATH_MAX_LENGTH]; +}; + +struct bsv_movie +{ + intfstream_t *file; + + /* A ring buffer keeping track of positions + * in the file for each frame. */ + size_t *frame_pos; + size_t frame_mask; + size_t frame_ptr; + + size_t min_file_pos; + + size_t state_size; + uint8_t *state; + + bool playback; + bool first_rewind; + bool did_rewind; +}; + void bsv_movie_deinit(void); bool bsv_movie_init(void); @@ -68,20 +104,18 @@ void bsv_movie_set_path(const char *path); void bsv_movie_set_start_path(const char *path); -void bsv_movie_set_frame_start(void); - -void bsv_movie_set_frame_end(void); - bool bsv_movie_get_input(int16_t *bsv_data); -bool bsv_movie_is_end_of_file(void); - bool bsv_movie_ctl(enum bsv_ctl_state state, void *data); bool bsv_movie_check(void); bool bsv_movie_init_handle(const char *path, enum rarch_movie_type type); +extern bsv_movie_t *bsv_movie_state_handle; + +extern struct bsv_state bsv_movie_state; + RETRO_END_DECLS #endif diff --git a/msg_hash.c b/msg_hash.c index a9e7e7e5b2..2a629e0a09 100644 --- a/msg_hash.c +++ b/msg_hash.c @@ -211,6 +211,8 @@ uint32_t msg_hash_calculate(const char *s) #define MENU_VALUE_FILE_JPEG_CAPS 0x7c87010bU #define MENU_VALUE_FILE_PNG 0x0b889deaU #define MENU_VALUE_FILE_PNG_CAPS 0x0b88118aU +#define MENU_VALUE_FILE_GONG 0x7c977150U +#define MENU_VALUE_FILE_GONG_CAPS 0x7c8558d0U #define MENU_VALUE_FILE_TGA 0x0b88ae01U #define MENU_VALUE_FILE_BMP 0x0b886244U @@ -390,6 +392,11 @@ enum msg_file_type msg_hash_to_file_type(uint32_t hash) return FILE_TYPE_TGA; case MENU_VALUE_FILE_BMP: return FILE_TYPE_BMP; +#endif +#ifdef HAVE_EASTEREGG + case MENU_VALUE_FILE_GONG: + case MENU_VALUE_FILE_GONG_CAPS: + return FILE_TYPE_GONG; #endif case HASH_EXTENSION_CUE: case HASH_EXTENSION_CUE_UPPERCASE: diff --git a/msg_hash.h b/msg_hash.h index f61866d90f..a1226afcd2 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis - * Copyright (C) 2016-2017 - Brad Parker + * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -141,6 +141,8 @@ enum msg_file_type FILE_TYPE_DIRECT_LOAD, + FILE_TYPE_GONG, + FILE_TYPE_LAST }; @@ -189,6 +191,7 @@ enum msg_hash_enums MSG_RESAMPLER_QUALITY_NORMAL, MSG_RESAMPLER_QUALITY_HIGHER, MSG_RESAMPLER_QUALITY_HIGHEST, + MSG_DISCORD_CONNECTION_REQUEST, MSG_ADDED_TO_FAVORITES, MSG_RESET_CORE_ASSOCIATION, MSG_CORE_ASSOCIATION_RESET, @@ -480,6 +483,40 @@ enum msg_hash_enums MENU_LABEL(MATERIALUI_ICONS_ENABLE), + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GOLDEN, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_BROGRAMMER, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NORD, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NOVA, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_PALENIGHT, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ZENBURN, + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ANTI_ZENBURN, + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_WHITE, MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_BLACK, @@ -776,7 +813,6 @@ enum msg_hash_enums MENU_LABEL(VIDEO_SHARED_CONTEXT), MENU_LABEL(VIDEO_THREADED), - MENU_LABEL(VIDEO_SWAP_INTERVAL), MENU_LABEL(VIDEO_FULLSCREEN), MENU_LABEL(VIDEO_MONITOR_INDEX), @@ -789,7 +825,6 @@ enum msg_hash_enums MENU_ENUM_LABEL_CONTENT_ACTIONS, - /* Menu settings */ MENU_LABEL(MENU_SHOW_LOAD_CORE), MENU_LABEL(MENU_SHOW_LOAD_CONTENT), @@ -851,6 +886,7 @@ enum msg_hash_enums MENU_LABEL(TIMEDATE_ENABLE), MENU_LABEL(TIMEDATE_STYLE), MENU_LABEL(BATTERY_LEVEL_ENABLE), + MENU_LABEL(RGUI_MENU_COLOR_THEME), MENU_LABEL(XMB_MENU_COLOR_THEME), MENU_LABEL(OZONE_MENU_COLOR_THEME), MENU_LABEL(MATERIALUI_MENU_COLOR_THEME), @@ -976,7 +1012,6 @@ enum msg_hash_enums MENU_ENUM_LABEL_PLAYLIST_SETTINGS_BEGIN, - MENU_ENUM_LABEL_VALUE_CHEEVOS_SETTINGS, MENU_LABEL(CHEEVOS_USERNAME), @@ -1933,6 +1968,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG, MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL, MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG, + MENU_ENUM_LABEL_CB_DISCORD_AVATAR, /* Sublabels */ MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY, @@ -1984,6 +2020,8 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_LIST_MAX_COUNT, MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_GRID_MAX_COUNT, MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_STARTUP_PLAYLIST, + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE, + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT, MENU_ENUM_LABEL_VALUE_QT_MENU_TOOLS, MENU_ENUM_LABEL_VALUE_QT_MENU_HELP, MENU_ENUM_LABEL_VALUE_QT_MENU_DOCK_CONTENT_BROWSER, @@ -2087,6 +2125,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_PACK_DOWNLOADED_SUCCESSFULLY, MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_PLAYLIST_THUMBNAIL_PROGRESS, MENU_ENUM_LABEL_VALUE_QT_CORE_OPTIONS, + MENU_ENUM_LABEL_VALUE_QT_ITEMS_COUNT, MENU_LABEL(MIDI_INPUT), MENU_LABEL(MIDI_OUTPUT), @@ -2192,6 +2231,7 @@ enum msg_hash_enums #endif MENU_ENUM_LABEL_VALUE_HOLD_START, + MENU_LABEL(PLAYLIST_USE_OLD_FORMAT), MSG_LAST }; diff --git a/network/netplay/netplay.h b/network/netplay/netplay.h index 23536bdbbc..6fe9eeb9d5 100644 --- a/network/netplay/netplay.h +++ b/network/netplay/netplay.h @@ -15,7 +15,6 @@ * If not, see . */ - #ifndef __RARCH_NETPLAY_H #define __RARCH_NETPLAY_H diff --git a/network/netplay/netplay_discovery.c b/network/netplay/netplay_discovery.c index 0b347ca548..8fb1d4feac 100644 --- a/network/netplay/netplay_discovery.c +++ b/network/netplay/netplay_discovery.c @@ -68,6 +68,7 @@ struct ad_packet char core_version[NETPLAY_HOST_STR_LEN]; char content[NETPLAY_HOST_LONGSTR_LEN]; char content_crc[NETPLAY_HOST_STR_LEN]; + char subsystem_name[NETPLAY_HOST_STR_LEN]; }; static bool netplay_lan_ad_client(void); @@ -247,6 +248,8 @@ bool netplay_lan_ad_server(netplay_t *netplay) unsigned k = 0; char reply_addr[NETPLAY_HOST_STR_LEN], port_str[6]; struct addrinfo *our_addr, hints = {0}; + struct string_list *subsystem = path_get_subsystem_list(); + char buf[4096]; net_ifinfo_t interfaces; @@ -313,11 +316,36 @@ bool netplay_lan_ad_server(netplay_t *netplay) reply_addr, interfaces.entries[k].host); /* Now build our response */ + buf[0] = '\0'; content_crc = content_get_crc(); memset(&ad_packet_buffer, 0, sizeof(struct ad_packet)); memcpy(&ad_packet_buffer, "RANS", 4); + if (subsystem) + { + unsigned i; + + for (i = 0; i < subsystem->size; i++) + { + strlcat(buf, path_basename(subsystem->elems[i].data), NETPLAY_HOST_LONGSTR_LEN); + if (i < subsystem->size - 1) + strlcat(buf, "|", NETPLAY_HOST_LONGSTR_LEN); + } + strlcpy(ad_packet_buffer.content, buf, + NETPLAY_HOST_LONGSTR_LEN); + strlcpy(ad_packet_buffer.subsystem_name, path_get(RARCH_PATH_SUBSYSTEM), + NETPLAY_HOST_STR_LEN); + } + else + { + strlcpy(ad_packet_buffer.content, !string_is_empty( + path_basename(path_get(RARCH_PATH_BASENAME))) + ? path_basename(path_get(RARCH_PATH_BASENAME)) : "N/A", + NETPLAY_HOST_LONGSTR_LEN); + strlcpy(ad_packet_buffer.subsystem_name, "N/A", NETPLAY_HOST_STR_LEN); + } + strlcpy(ad_packet_buffer.address, interfaces.entries[k].host, NETPLAY_HOST_STR_LEN); ad_packet_buffer.protocol_version = @@ -325,10 +353,6 @@ bool netplay_lan_ad_server(netplay_t *netplay) ad_packet_buffer.port = htonl(netplay->tcp_port); strlcpy(ad_packet_buffer.retroarch_version, PACKAGE_VERSION, NETPLAY_HOST_STR_LEN); - strlcpy(ad_packet_buffer.content, !string_is_empty( - path_basename(path_get(RARCH_PATH_BASENAME))) - ? path_basename(path_get(RARCH_PATH_BASENAME)) : "N/A", - NETPLAY_HOST_LONGSTR_LEN); strlcpy(ad_packet_buffer.nick, netplay->nick, NETPLAY_HOST_STR_LEN); strlcpy(ad_packet_buffer.frontend, frontend, NETPLAY_HOST_STR_LEN); @@ -393,7 +417,7 @@ static bool netplay_lan_ad_client(void) struct timeval tmp_tv = {0}; if (lan_ad_client_fd < 0) - return false; + return false; /* Check for any ad queries */ while (1) @@ -492,6 +516,8 @@ static bool netplay_lan_ad_client(void) NETPLAY_HOST_STR_LEN); strlcpy(host->content, ad_packet_buffer.content, NETPLAY_HOST_LONGSTR_LEN); + strlcpy(host->subsystem_name, ad_packet_buffer.subsystem_name, + NETPLAY_HOST_LONGSTR_LEN); strlcpy(host->frontend, ad_packet_buffer.frontend, NETPLAY_HOST_STR_LEN); diff --git a/network/netplay/netplay_discovery.h b/network/netplay/netplay_discovery.h index 27b910915c..aeedf60a87 100644 --- a/network/netplay/netplay_discovery.h +++ b/network/netplay/netplay_discovery.h @@ -13,7 +13,6 @@ * If not, see . */ - #ifndef __RARCH_NETPLAY_DISCOVERY_H #define __RARCH_NETPLAY_DISCOVERY_H @@ -44,6 +43,7 @@ struct netplay_host char core_version[NETPLAY_HOST_STR_LEN]; char retroarch_version[NETPLAY_HOST_STR_LEN]; char content[NETPLAY_HOST_LONGSTR_LEN]; + char subsystem_name[NETPLAY_HOST_LONGSTR_LEN]; int content_crc; int port; }; @@ -83,6 +83,7 @@ struct netplay_room bool lan; bool fixed; char retroarch_version[PATH_MAX_LENGTH]; + char subsystem_name[PATH_MAX_LENGTH]; char country[PATH_MAX_LENGTH]; struct netplay_room *next; }; diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index db201ae222..ae0767a7cf 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -41,6 +41,7 @@ #include "../../file_path_special.h" #include "../../paths.h" #include "../../command.h" +#include "../../dynamic.h" #include "../../retroarch.h" /* Only used before init_netplay */ @@ -272,7 +273,6 @@ bool init_netplay_deferred(const char* server, unsigned port) return netplay_client_deferred; } - /** * netplay_poll: * @netplay : pointer to netplay object @@ -640,15 +640,6 @@ static void netplay_announce_cb(void *task_data, void *user_data, const char *er { RARCH_LOG("[netplay] announcing netplay game... \n"); -#ifdef HAVE_DISCORD - if (discord_is_inited) - { - discord_userdata_t userdata; - userdata.status = DISCORD_PRESENCE_NETPLAY_HOSTING; - command_event(CMD_EVENT_DISCORD_UPDATE, &userdata); - } -#endif - if (task_data) { unsigned i, ip_len, port_len; @@ -794,6 +785,15 @@ static void netplay_announce_cb(void *task_data, void *user_data, const char *er free(host_string); } +#ifdef HAVE_DISCORD + if (discord_is_inited) + { + discord_userdata_t userdata; + userdata.status = DISCORD_PRESENCE_NETPLAY_HOSTING; + command_event(CMD_EVENT_DISCORD_UPDATE, &userdata); + } +#endif + string_list_free(lines); free(buf); free(task_data); @@ -851,25 +851,48 @@ void netplay_get_architecture(char *frontend_architecture, size_t size) static void netplay_announce(void) { - char buf [4600]; + char buf[4600]; char frontend_architecture[PATH_MAX_LENGTH]; - char url [2048] = "http://lobby.libretro.com/add/"; + char url[2048] = "http://lobby.libretro.com/add/"; char *username = NULL; char *corename = NULL; char *gamename = NULL; + char *subsystemname = NULL; char *coreversion = NULL; char *frontend_ident = NULL; settings_t *settings = config_get_ptr(); struct retro_system_info *system = runloop_get_libretro_system_info(); uint32_t content_crc = content_get_crc(); + struct string_list *subsystem = path_get_subsystem_list(); + + buf[0] = '\0'; + + if (subsystem) + { + unsigned i; + + for (i = 0; i < subsystem->size; i++) + { + strlcat(buf, path_basename(subsystem->elems[i].data), sizeof(buf)); + if (i < subsystem->size - 1) + strlcat(buf, "|", sizeof(buf)); + } + net_http_urlencode(&gamename, buf); + net_http_urlencode(&subsystemname, path_get(RARCH_PATH_SUBSYSTEM)); + content_crc = 0; + } + else + { + net_http_urlencode(&gamename, + !string_is_empty(path_basename(path_get(RARCH_PATH_BASENAME))) ? + path_basename(path_get(RARCH_PATH_BASENAME)) : "N/A"); + net_http_urlencode(&subsystemname, "N/A"); + } netplay_get_architecture(frontend_architecture, sizeof(frontend_architecture)); net_http_urlencode(&username, settings->paths.username); net_http_urlencode(&corename, system->library_name); - net_http_urlencode(&gamename, - !string_is_empty(path_basename(path_get(RARCH_PATH_BASENAME))) ? - path_basename(path_get(RARCH_PATH_BASENAME)) : "N/A"); net_http_urlencode(&coreversion, system->library_version); net_http_urlencode(&frontend_ident, frontend_architecture); @@ -877,14 +900,15 @@ static void netplay_announce(void) snprintf(buf, sizeof(buf), "username=%s&core_name=%s&core_version=%s&" "game_name=%s&game_crc=%08X&port=%d&mitm_server=%s" - "&has_password=%d&has_spectate_password=%d&force_mitm=%d&retroarch_version=%s&frontend=%s", + "&has_password=%d&has_spectate_password=%d&force_mitm=%d" + "&retroarch_version=%s&frontend=%s&subsystem_name=%s", username, corename, coreversion, gamename, content_crc, settings->uints.netplay_port, settings->arrays.netplay_mitm_server, *settings->paths.netplay_password ? 1 : 0, *settings->paths.netplay_spectate_password ? 1 : 0, settings->bools.netplay_use_mitm_server, - PACKAGE_VERSION, frontend_architecture); + PACKAGE_VERSION, frontend_architecture, subsystemname); #if 0 RARCH_LOG("[netplay] announcement URL: %s\n", buf); #endif @@ -1115,7 +1139,6 @@ static void netplay_force_future(netplay_t *netplay) netplay->run_ptr = netplay->self_ptr; netplay->run_frame_count = netplay->self_frame_count; - /* We need to ignore any intervening data from the other side, * and never rewind past this */ netplay_update_unread_ptr(netplay); @@ -1485,8 +1508,6 @@ bool init_netplay(void *direct_host, const char *server, unsigned port) return false; } - - /** * netplay_driver_ctl * diff --git a/network/netplay/netplay_private.h b/network/netplay/netplay_private.h index d607b5e84f..d5f64150e4 100644 --- a/network/netplay/netplay_private.h +++ b/network/netplay/netplay_private.h @@ -569,7 +569,6 @@ struct netplay bool crcs_valid; }; - /*************************************************************** * NETPLAY-BUF.C **************************************************************/ @@ -639,7 +638,6 @@ void netplay_recv_reset(struct socket_buffer *sbuf); */ void netplay_recv_flush(struct socket_buffer *sbuf); - /*************************************************************** * NETPLAY-DELTA.C **************************************************************/ @@ -685,7 +683,6 @@ netplay_input_state_t netplay_input_state_for(netplay_input_state_t *list, */ uint32_t netplay_expected_input_size(netplay_t *netplay, uint32_t devices); - /*************************************************************** * NETPLAY-DISCOVERY.C **************************************************************/ @@ -697,7 +694,6 @@ uint32_t netplay_expected_input_size(netplay_t *netplay, uint32_t devices); */ bool netplay_lan_ad_server(netplay_t *netplay); - /*************************************************************** * NETPLAY-FRONTEND.C **************************************************************/ @@ -749,7 +745,6 @@ bool netplay_handshake_init_send(netplay_t *netplay, bool netplay_handshake(netplay_t *netplay, struct netplay_connection *connection, bool *had_input); - /*************************************************************** * NETPLAY-INIT.C **************************************************************/ @@ -803,7 +798,6 @@ netplay_t *netplay_new(void *direct_host, const char *server, uint16_t port, */ void netplay_free(netplay_t *netplay); - /*************************************************************** * NETPLAY-IO.C **************************************************************/ @@ -914,7 +908,6 @@ void netplay_announce_nat_traversal(netplay_t *netplay); */ void netplay_init_nat_traversal(netplay_t *netplay); - /*************************************************************** * NETPLAY-KEYBOARD.C **************************************************************/ @@ -941,7 +934,6 @@ uint32_t netplay_key_hton(unsigned key); * netplay_key_hton */ void netplay_key_hton_init(void); - /*************************************************************** * NETPLAY-SYNC.C **************************************************************/ diff --git a/network/netplay/netplay_room_parse.c b/network/netplay/netplay_room_parse.c index c339d37edc..813a765803 100644 --- a/network/netplay/netplay_room_parse.c +++ b/network/netplay/netplay_room_parse.c @@ -288,6 +288,11 @@ static JSON_Parser_HandlerResult JSON_CALL ObjectMemberHandler(JSON_Parser parse pCtx->cur_field = strdup(pValue); pCtx->cur_member = &rooms->cur->frontend; } + else if (string_is_equal(pValue, "subsystem_name")) + { + pCtx->cur_field = strdup(pValue); + pCtx->cur_member = &rooms->cur->subsystem_name; + } } } diff --git a/no-xib.diff b/no-xib.diff index 2ed24e09bd..a77def0009 100644 --- a/no-xib.diff +++ b/no-xib.diff @@ -169,4 +169,3 @@ index 5dde6f9..37cd066 100644 + return NSApplicationMain(argc, (const char **) argv); } - diff --git a/paths.c b/paths.c index 67a71840c2..8758020347 100644 --- a/paths.c +++ b/paths.c @@ -173,7 +173,7 @@ void path_set_redirect(void) { fill_pathname_dir(global->name.savefile, !string_is_empty(path_main_basename) ? path_main_basename : - system ? system->library_name : NULL, + system && !string_is_empty(system->library_name) ? system->library_name : "", file_path_str(FILE_PATH_SRM_EXTENSION), sizeof(global->name.savefile)); RARCH_LOG("%s \"%s\".\n", @@ -185,7 +185,7 @@ void path_set_redirect(void) { fill_pathname_dir(global->name.savestate, !string_is_empty(path_main_basename) ? path_main_basename : - system ? system->library_name : NULL, + system && !string_is_empty(system->library_name) ? system->library_name : "", file_path_str(FILE_PATH_STATE_EXTENSION), sizeof(global->name.savestate)); RARCH_LOG("%s \"%s\".\n", @@ -195,7 +195,9 @@ void path_set_redirect(void) if (path_is_directory(global->name.cheatfile)) { - fill_pathname_dir(global->name.cheatfile, path_main_basename, + /* FIXME: Should this optionally use system->library_name like the others? */ + fill_pathname_dir(global->name.cheatfile, + !string_is_empty(path_main_basename) ? path_main_basename : "", file_path_str(FILE_PATH_STATE_EXTENSION), sizeof(global->name.cheatfile)); RARCH_LOG("%s \"%s\".\n", @@ -258,7 +260,6 @@ void path_set_special(char **argv, unsigned num_content) char str[PATH_MAX_LENGTH]; global_t *global = global_get_ptr(); - /* First content file is the significant one. */ path_set_basename(argv[0]); @@ -311,7 +312,7 @@ static bool path_init_subsystem(void) /* For subsystems, we know exactly which RAM types are supported. */ info = libretro_find_subsystem_info( - subsystem_data, + system->subsystem.data, system->subsystem.size, path_get(RARCH_PATH_SUBSYSTEM)); @@ -424,7 +425,6 @@ static void path_init_savefile_internal(void) } } - void path_fill_names(void) { global_t *global = global_get_ptr(); @@ -779,6 +779,10 @@ enum rarch_content_type path_is_media_type(const char *path) case FILE_TYPE_XM: return RARCH_CONTENT_MUSIC; #endif +#ifdef HAVE_EASTEREGG + case FILE_TYPE_GONG: + return RARCH_CONTENT_GONG; +#endif case FILE_TYPE_NONE: default: diff --git a/paths.h b/paths.h index fd8e0659ef..15c49fa511 100644 --- a/paths.h +++ b/paths.h @@ -28,7 +28,8 @@ enum rarch_content_type RARCH_CONTENT_NONE = 0, RARCH_CONTENT_MOVIE, RARCH_CONTENT_MUSIC, - RARCH_CONTENT_IMAGE + RARCH_CONTENT_IMAGE, + RARCH_CONTENT_GONG }; enum rarch_path_type diff --git a/performance_counters.h b/performance_counters.h index 9a72a4ade6..9aedbbd5e7 100644 --- a/performance_counters.h +++ b/performance_counters.h @@ -108,4 +108,3 @@ int rarch_timer_get_timeout(rarch_timer_t *timer); RETRO_END_DECLS #endif - diff --git a/pkg/360/Arial_12.rdf b/pkg/360/Arial_12.rdf index 8321cbd73a..6b8137e9be 100644 --- a/pkg/360/Arial_12.rdf +++ b/pkg/360/Arial_12.rdf @@ -15,4 +15,3 @@ /> - diff --git a/pkg/android/phoenix/ant.properties b/pkg/android/phoenix/ant.properties index b0971e891e..73031c7a72 100644 --- a/pkg/android/phoenix/ant.properties +++ b/pkg/android/phoenix/ant.properties @@ -14,4 +14,3 @@ # 'key.store' for the location of your keystore and # 'key.alias' for the name of the key to use. # The password will be asked during the build when you use the 'release' target. - diff --git a/pkg/android/phoenix/version_increment.py b/pkg/android/phoenix/version_increment.py index fbd58ff906..21a8575828 100644 --- a/pkg/android/phoenix/version_increment.py +++ b/pkg/android/phoenix/version_increment.py @@ -17,4 +17,3 @@ dom1.documentElement.setAttribute("android:versionName", versionName) with open("AndroidManifest.xml", 'wb') as f: for line in dom1.toxml("utf-8"): f.write(line) - diff --git a/pkg/android/phoenix64/version_increment.py b/pkg/android/phoenix64/version_increment.py index fbd58ff906..21a8575828 100644 --- a/pkg/android/phoenix64/version_increment.py +++ b/pkg/android/phoenix64/version_increment.py @@ -17,4 +17,3 @@ dom1.documentElement.setAttribute("android:versionName", versionName) with open("AndroidManifest.xml", 'wb') as f: for line in dom1.toxml("utf-8"): f.write(line) - diff --git a/pkg/apple/Metal.xcconfig b/pkg/apple/Metal.xcconfig index 1168500099..d25bda59e9 100644 --- a/pkg/apple/Metal.xcconfig +++ b/pkg/apple/Metal.xcconfig @@ -6,4 +6,3 @@ // OTHER_CFLAGS = $(inherited) -DHAVE_MAIN -DHAVE_COCOA_METAL - diff --git a/pkg/apple/OSX/en.lproj/InfoPlist.strings b/pkg/apple/OSX/en.lproj/InfoPlist.strings index 477b28ff8f..b92732c79e 100644 --- a/pkg/apple/OSX/en.lproj/InfoPlist.strings +++ b/pkg/apple/OSX/en.lproj/InfoPlist.strings @@ -1,2 +1 @@ /* Localized versions of Info.plist keys */ - diff --git a/pkg/apple/iOS/BUILDING b/pkg/apple/iOS/BUILDING index 425322feeb..3893be8fc1 100644 --- a/pkg/apple/iOS/BUILDING +++ b/pkg/apple/iOS/BUILDING @@ -50,4 +50,3 @@ Paths: Simulator: To test in iOS Simulator you will need to create the '/var/mobile' directory on you computer, and give yourself full access to it. - diff --git a/pkg/apple/iOS/en.lproj/InfoPlist.strings b/pkg/apple/iOS/en.lproj/InfoPlist.strings index 477b28ff8f..b92732c79e 100644 --- a/pkg/apple/iOS/en.lproj/InfoPlist.strings +++ b/pkg/apple/iOS/en.lproj/InfoPlist.strings @@ -1,2 +1 @@ /* Localized versions of Info.plist keys */ - diff --git a/pkg/emscripten/README.md b/pkg/emscripten/README.md index 54cace8981..4cb0b9242c 100644 --- a/pkg/emscripten/README.md +++ b/pkg/emscripten/README.md @@ -40,4 +40,3 @@ cd ${ROOT_WWW_PATH}/assets/cores ``` That should be it, you can add more cores to the list by editing index.html - diff --git a/pkg/emscripten/libretro/indexer b/pkg/emscripten/libretro/indexer index 64ada095cd..5544f481cb 100644 --- a/pkg/emscripten/libretro/indexer +++ b/pkg/emscripten/libretro/indexer @@ -32,4 +32,3 @@ rdSync = (dpath, tree, name) -> fs_listing = rdSync(process.cwd(), {}, '/') console.log(JSON.stringify(fs_listing)) - diff --git a/pkg/msvc-uwp/RetroArch-msvc2017-UWP-cores-nonfree/RetroArch-msvc2017-UWP-cores-nonfree.vcxproj b/pkg/msvc-uwp/RetroArch-msvc2017-UWP-cores-nonfree/RetroArch-msvc2017-UWP-cores-nonfree.vcxproj index 07b6a388d8..ce015f68d1 100644 --- a/pkg/msvc-uwp/RetroArch-msvc2017-UWP-cores-nonfree/RetroArch-msvc2017-UWP-cores-nonfree.vcxproj +++ b/pkg/msvc-uwp/RetroArch-msvc2017-UWP-cores-nonfree/RetroArch-msvc2017-UWP-cores-nonfree.vcxproj @@ -118,7 +118,7 @@ - ..\msvc2017-UWP\RetroArch-msvc2017-UWP_TemporaryKey.pfx + ..\RetroArch-msvc2017-UWP\RetroArch-UWP_TemporaryKey.pfx False False Always diff --git a/pkg/msvc-uwp/RetroArch-msvc2017-UWP/Bundle.Mapping.txt b/pkg/msvc-uwp/RetroArch-msvc2017-UWP/Bundle.Mapping.txt index 5e48e1ae47..ba39b44f25 100644 --- a/pkg/msvc-uwp/RetroArch-msvc2017-UWP/Bundle.Mapping.txt +++ b/pkg/msvc-uwp/RetroArch-msvc2017-UWP/Bundle.Mapping.txt @@ -1,2 +1,2 @@ [ExternalPackages] -"..\AppPackages\RetroArch-UWP-cores-nonfree\RetroArch-UWP-cores-nonfree_1.0.0.0_Test\RetroArch-UWP-cores-nonfree_1.0.0.0_x86_x64_arm.appxbundle" +"..\AppPackages\RetroArch-msvc2017-UWP-cores-nonfree\RetroArch-msvc2017-UWP-cores-nonfree_1.0.0.0_Test\RetroArch-msvc2017-UWP-cores-nonfree_1.0.0.0_x86_x64_arm.appxbundle" diff --git a/pkg/msvc-uwp/RetroArch-msvc2017-UWP/RetroArch-msvc2017-UWP_TemporaryKey.pfx b/pkg/msvc-uwp/RetroArch-msvc2017-UWP/RetroArch-UWP_TemporaryKey.pfx similarity index 100% rename from pkg/msvc-uwp/RetroArch-msvc2017-UWP/RetroArch-msvc2017-UWP_TemporaryKey.pfx rename to pkg/msvc-uwp/RetroArch-msvc2017-UWP/RetroArch-UWP_TemporaryKey.pfx diff --git a/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj b/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj index f228bad8bf..702cbaa14b 100644 --- a/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj +++ b/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj @@ -281,7 +281,7 @@ true - $(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\ + $(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\QtNetwork;$(QtDirectory)\msvc2017_64\include\QtConcurrent;$(QtDirectory)\msvc2017_64\include\ $(DXSDK_DIR)Lib\x64;$(QtDirectory)\msvc2017_64\lib;$(LibraryPath) AllRules.ruleset @@ -290,7 +290,7 @@ true - $(CG_INC_PATH);$(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\ + $(CG_INC_PATH);$(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\QtNetwork;$(QtDirectory)\msvc2017_64\include\QtConcurrent;$(QtDirectory)\msvc2017_64\include\ $(DXSDK_DIR)Lib\x64;$(CG_LIB64_PATH);$(QtDirectory)\msvc2017_64\lib;$(LibraryPath) AllRules.ruleset @@ -349,7 +349,7 @@ false - $(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\ + $(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\QtNetwork;$(QtDirectory)\msvc2017_64\include\QtConcurrent;$(QtDirectory)\msvc2017_64\include\ $(DXSDK_DIR)Lib\x64;$(QtDirectory)\msvc2017_64\lib;$(LibraryPath) AllRules.ruleset @@ -358,7 +358,7 @@ false - $(CG_INC_PATH);$(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\ + $(CG_INC_PATH);$(IncludePath);$(DXSDK_DIR)Include;$(QtDirectory)\msvc2017_64\include\QtCore;$(QtDirectory)\msvc2017_64\include\QtWidgets;$(QtDirectory)\msvc2017_64\include\QtGui;$(QtDirectory)\msvc2017_64\include\QtNetwork;$(QtDirectory)\msvc2017_64\include\QtConcurrent;$(QtDirectory)\msvc2017_64\include\ $(DXSDK_DIR)Lib\x64;$(CG_LIB64_PATH);$(QtDirectory)\msvc2017_64\lib;$(LibraryPath) AllRules.ruleset @@ -423,7 +423,7 @@ Console true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB_PATH) @@ -444,7 +444,7 @@ Console true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB_PATH) @@ -506,7 +506,7 @@ Console true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB64_PATH) @@ -527,7 +527,7 @@ Console true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB64_PATH) @@ -604,7 +604,7 @@ true true true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB_PATH) @@ -630,7 +630,7 @@ true true true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB_PATH) @@ -707,7 +707,7 @@ true true true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB64_PATH) @@ -733,7 +733,7 @@ true true true - msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;qtmain.lib;Qt5Widgets.lib;Qt5Gui.lib;Qt5Core.lib;Qt5Network.lib;Qt5Concurrent.lib;%(AdditionalDependencies) $(CG_LIB64_PATH) @@ -759,48 +759,17 @@ CompileAsC CompileAsC - - + /bigobj %(AdditionalOptions) /bigobj %(AdditionalOptions) /bigobj %(AdditionalOptions) /bigobj %(AdditionalOptions) - - true - true - false - false - true - false - false - true - true - true - false - false - true - false - false - true - - - true - true - false - false - true - false - false - true - true - true - false - false - true - false - false - true + + /bigobj %(AdditionalOptions) + /bigobj %(AdditionalOptions) + /bigobj %(AdditionalOptions) + /bigobj %(AdditionalOptions) @@ -813,36 +782,386 @@ false false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + true + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + true + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + true + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + true + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + true + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + true + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + true + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + false + false + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false true @@ -857,42 +1176,42 @@ false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" false false - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false false false false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - moc.exe "%(FullPath)" > "$(ProjectDir)MetaObjects\moc_%(Filename).cpp" - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - QT: Generate $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp - $(ProjectDir)MetaObjects\moc_%(Filename).cpp + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp" + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp + %(RootDir)%(Directory)moc_%(Filename).cpp false false true diff --git a/pkg/msvc/msvc-6/RetroArch/RetroArch.dsw b/pkg/msvc/msvc-6/RetroArch/RetroArch.dsw index 8d6fcf058b..e91af3a2e4 100644 --- a/pkg/msvc/msvc-6/RetroArch/RetroArch.dsw +++ b/pkg/msvc/msvc-6/RetroArch/RetroArch.dsw @@ -26,4 +26,3 @@ Package=<3> }}} ############################################################################### - diff --git a/pkg/pandora/scripts/env-vars.sh b/pkg/pandora/scripts/env-vars.sh index d80a46b155..f65e26a0c8 100755 --- a/pkg/pandora/scripts/env-vars.sh +++ b/pkg/pandora/scripts/env-vars.sh @@ -19,4 +19,3 @@ export SDL_OMAP_LAYER_SIZE="pixelperfect" # load the libstdc++ from gcc-4.7 because phoenix and some cores don't build in anything less # preload latest notaz SDL that knows what "pixelperfect" is export LD_PRELOAD=${HOME}/lib/libstdc++.so.6:$HOME/lib/libSDL-1.2.so.0.11.3 - diff --git a/pkg/pandora/scripts/retroarch-phoenix.sh b/pkg/pandora/scripts/retroarch-phoenix.sh index 8fb49dc8af..8f5b91d898 100755 --- a/pkg/pandora/scripts/retroarch-phoenix.sh +++ b/pkg/pandora/scripts/retroarch-phoenix.sh @@ -3,4 +3,3 @@ source "$(dirname $0)/env-vars.sh" exec retroarch-phoenix "${@}" - diff --git a/pkg/pandora/scripts/retroarch.sh b/pkg/pandora/scripts/retroarch.sh index 7387441dfe..c23a63b16d 100755 --- a/pkg/pandora/scripts/retroarch.sh +++ b/pkg/pandora/scripts/retroarch.sh @@ -63,4 +63,3 @@ if [[ "${ROM}" =~ \.(zip|rar|7z)$ ]] && [[ ! "${FILTER}" =~ ^Arcade ]] ; then else exec retroarch "${ROM}" -L "${HOME}/lib/${BACKEND}" "${@}" fi - diff --git a/pkg/sailfishos/retroarch-sailfishos.spec b/pkg/sailfishos/retroarch-sailfishos.spec index 56c5e8824b..29de5dfc93 100644 --- a/pkg/sailfishos/retroarch-sailfishos.spec +++ b/pkg/sailfishos/retroarch-sailfishos.spec @@ -82,6 +82,3 @@ sed -i \ %{_prefix}/share/icons/hicolor/86x86/apps/retroarch.* %{_prefix}/share/doc/retroarch/* %changelog - - - diff --git a/pkg/vita/assets/livearea/contents/template.xml b/pkg/vita/assets/livearea/contents/template.xml index 193d265b09..b6c4fc36f8 100644 --- a/pkg/vita/assets/livearea/contents/template.xml +++ b/pkg/vita/assets/livearea/contents/template.xml @@ -16,4 +16,3 @@ - diff --git a/playlist.c b/playlist.c index fba39fee5f..52510d0765 100644 --- a/playlist.c +++ b/playlist.c @@ -1,6 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2018-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -20,14 +21,17 @@ #include #include +#include #include #include #include #include #include +#include #include "playlist.h" #include "verbosity.h" +#include "configuration.h" #ifndef PLAYLIST_ENTRIES #define PLAYLIST_ENTRIES 6 @@ -52,6 +56,21 @@ struct content_playlist char *conf_path; struct playlist_entry *entries; }; + +typedef struct +{ + JSON_Parser parser; + JSON_Writer writer; + RFILE *file; + playlist_t *playlist; + struct playlist_entry *current_entry; + unsigned array_depth; + unsigned object_depth; + char **current_entry_val; + char *current_meta_string; + bool in_items; +} JSONContext; + static playlist_t *playlist_cached = NULL; typedef int (playlist_sort_fun_t)( @@ -119,10 +138,11 @@ void playlist_delete_index(playlist_t *playlist, if (!playlist) return; + playlist->size = playlist->size - 1; + memmove(playlist->entries + idx, playlist->entries + idx + 1, (playlist->size - idx) * sizeof(struct playlist_entry)); - playlist->size = playlist->size - 1; playlist->modified = true; } @@ -388,10 +408,38 @@ success: return true; } +static JSON_Writer_HandlerResult JSONOutputHandler(JSON_Writer writer, const char *pBytes, size_t length) +{ + JSONContext *context = (JSONContext*)JSON_Writer_GetUserData(writer); + + (void)writer; /* unused */ + return filestream_write(context->file, pBytes, length) == length ? JSON_Writer_Continue : JSON_Writer_Abort; +} + +static void JSONLogError(JSONContext *pCtx) +{ + if (pCtx->parser && JSON_Parser_GetError(pCtx->parser) != JSON_Error_AbortedByHandler) + { + JSON_Error error = JSON_Parser_GetError(pCtx->parser); + JSON_Location errorLocation = { 0, 0, 0 }; + (void)JSON_Parser_GetErrorLocation(pCtx->parser, &errorLocation); + RARCH_WARN("Error: Invalid JSON at line %d, column %d (input byte %d) - %s.\n", + (int)errorLocation.line + 1, + (int)errorLocation.column + 1, + (int)errorLocation.byte, + JSON_ErrorString(error)); + } + else if (pCtx->writer && JSON_Writer_GetError(pCtx->writer) != JSON_Error_AbortedByHandler) + { + RARCH_WARN("Error: could not write output - %s.\n", JSON_ErrorString(JSON_Writer_GetError(pCtx->writer))); + } +} + void playlist_write_file(playlist_t *playlist) { size_t i; RFILE *file = NULL; + settings_t *settings = config_get_ptr(); if (!playlist || !playlist->modified) return; @@ -405,20 +453,124 @@ void playlist_write_file(playlist_t *playlist) return; } - for (i = 0; i < playlist->size; i++) - filestream_printf(file, "%s\n%s\n%s\n%s\n%s\n%s\n", - playlist->entries[i].path ? playlist->entries[i].path : "", - playlist->entries[i].label ? playlist->entries[i].label : "", - playlist->entries[i].core_path, - playlist->entries[i].core_name, - playlist->entries[i].crc32 ? playlist->entries[i].crc32 : "", - playlist->entries[i].db_name ? playlist->entries[i].db_name : "" - ); + if (settings->bools.playlist_use_old_format) + { + for (i = 0; i < playlist->size; i++) + filestream_printf(file, "%s\n%s\n%s\n%s\n%s\n%s\n", + playlist->entries[i].path ? playlist->entries[i].path : "", + playlist->entries[i].label ? playlist->entries[i].label : "", + playlist->entries[i].core_path, + playlist->entries[i].core_name, + playlist->entries[i].crc32 ? playlist->entries[i].crc32 : "", + playlist->entries[i].db_name ? playlist->entries[i].db_name : "" + ); + } + else + { + JSONContext context = {0}; + context.writer = JSON_Writer_Create(NULL); + context.file = file; + + if (!context.writer) + { + RARCH_ERR("Failed to create JSON writer\n"); + goto end; + } + + JSON_Writer_SetOutputEncoding(context.writer, JSON_UTF8); + JSON_Writer_SetOutputHandler(context.writer, &JSONOutputHandler); + JSON_Writer_SetUserData(context.writer, &context); + + JSON_Writer_WriteStartObject(context.writer); + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 2); + JSON_Writer_WriteString(context.writer, "version", strlen("version"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteString(context.writer, "1.0", strlen("1.0"), JSON_UTF8); + JSON_Writer_WriteComma(context.writer); + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 2); + JSON_Writer_WriteString(context.writer, "items", strlen("items"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteStartArray(context.writer); + JSON_Writer_WriteNewLine(context.writer); + + for (i = 0; i < playlist->size; i++) + { + JSON_Writer_WriteSpace(context.writer, 4); + JSON_Writer_WriteStartObject(context.writer); + + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 6); + JSON_Writer_WriteString(context.writer, "path", strlen("path"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteString(context.writer, playlist->entries[i].path ? playlist->entries[i].path : "", playlist->entries[i].path ? strlen(playlist->entries[i].path) : 0, JSON_UTF8); + JSON_Writer_WriteComma(context.writer); + + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 6); + JSON_Writer_WriteString(context.writer, "label", strlen("label"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteString(context.writer, playlist->entries[i].label ? playlist->entries[i].label : "", playlist->entries[i].label ? strlen(playlist->entries[i].label) : 0, JSON_UTF8); + JSON_Writer_WriteComma(context.writer); + + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 6); + JSON_Writer_WriteString(context.writer, "core_path", strlen("core_path"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteString(context.writer, playlist->entries[i].core_path, strlen(playlist->entries[i].core_path), JSON_UTF8); + JSON_Writer_WriteComma(context.writer); + + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 6); + JSON_Writer_WriteString(context.writer, "core_name", strlen("core_name"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteString(context.writer, playlist->entries[i].core_name, strlen(playlist->entries[i].core_name), JSON_UTF8); + JSON_Writer_WriteComma(context.writer); + + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 6); + JSON_Writer_WriteString(context.writer, "crc32", strlen("crc32"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteString(context.writer, playlist->entries[i].crc32 ? playlist->entries[i].crc32 : "", playlist->entries[i].crc32 ? strlen(playlist->entries[i].crc32) : 0, JSON_UTF8); + JSON_Writer_WriteComma(context.writer); + + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteSpace(context.writer, 6); + JSON_Writer_WriteString(context.writer, "db_name", strlen("db_name"), JSON_UTF8); + JSON_Writer_WriteColon(context.writer); + JSON_Writer_WriteSpace(context.writer, 1); + JSON_Writer_WriteString(context.writer, playlist->entries[i].db_name ? playlist->entries[i].db_name : "", playlist->entries[i].db_name ? strlen(playlist->entries[i].db_name) : 0, JSON_UTF8); + JSON_Writer_WriteNewLine(context.writer); + + JSON_Writer_WriteSpace(context.writer, 4); + JSON_Writer_WriteEndObject(context.writer); + + if (i < playlist->size - 1) + JSON_Writer_WriteComma(context.writer); + + JSON_Writer_WriteNewLine(context.writer); + } + + JSON_Writer_WriteSpace(context.writer, 2); + JSON_Writer_WriteEndArray(context.writer); + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_WriteEndObject(context.writer); + JSON_Writer_WriteNewLine(context.writer); + JSON_Writer_Free(context.writer); + } playlist->modified = false; RARCH_LOG("Written to playlist file: %s\n", playlist->conf_path); - +end: filestream_close(file); } @@ -490,15 +642,184 @@ size_t playlist_size(playlist_t *playlist) return playlist->size; } +static JSON_Parser_HandlerResult JSONStartArrayHandler(JSON_Parser parser) +{ + JSONContext *pCtx = (JSONContext*)JSON_Parser_GetUserData(parser); + + pCtx->array_depth++; + + if (pCtx->object_depth == 1) + { + if (string_is_equal(pCtx->current_meta_string, "items") && pCtx->array_depth == 1) + { + pCtx->in_items = true; + } + } + + return JSON_Parser_Continue; +} + +static JSON_Parser_HandlerResult JSONEndArrayHandler(JSON_Parser parser) +{ + JSONContext *pCtx = (JSONContext*)JSON_Parser_GetUserData(parser); + + retro_assert(pCtx->array_depth > 0); + + pCtx->array_depth--; + + if (pCtx->object_depth == 1) + { + if (pCtx->in_items && string_is_equal(pCtx->current_meta_string, "items") && pCtx->array_depth == 0) + { + free(pCtx->current_meta_string); + pCtx->current_meta_string = NULL; + pCtx->in_items = false; + } + } + + return JSON_Parser_Continue; +} + +static JSON_Parser_HandlerResult JSONStartObjectHandler(JSON_Parser parser) +{ + JSONContext *pCtx = (JSONContext*)JSON_Parser_GetUserData(parser); + + pCtx->object_depth++; + + if (pCtx->in_items && pCtx->object_depth == 2) + { + if (pCtx->array_depth == 1) + { + if (pCtx->playlist->size < pCtx->playlist->cap) + { + pCtx->current_entry = &pCtx->playlist->entries[pCtx->playlist->size]; + } + else + { + /* hit max item limit */ + return JSON_Parser_Abort; + } + } + } + + return JSON_Parser_Continue; +} + +static JSON_Parser_HandlerResult JSONEndObjectHandler(JSON_Parser parser) +{ + JSONContext *pCtx = (JSONContext*)JSON_Parser_GetUserData(parser); + + if (pCtx->in_items && pCtx->object_depth == 2) + { + if (pCtx->array_depth == 1) + { + pCtx->playlist->size++; + } + } + + retro_assert(pCtx->object_depth > 0); + + pCtx->object_depth--; + + return JSON_Parser_Continue; +} + +static JSON_Parser_HandlerResult JSONStringHandler(JSON_Parser parser, char *pValue, size_t length, JSON_StringAttributes attributes) +{ + JSONContext *pCtx = (JSONContext*)JSON_Parser_GetUserData(parser); + (void)attributes; /* unused */ + + if (pCtx->in_items && pCtx->object_depth == 2) + { + if (pCtx->array_depth == 1) + { + if (pCtx->current_entry_val && length && !string_is_empty(pValue)) + { + *pCtx->current_entry_val = strdup(pValue); + } + else + { + /* must be a value for an unknown member we aren't tracking, skip it */ + } + } + } + else if (pCtx->object_depth == 1) + { + if (pCtx->array_depth == 0) + { + if (pCtx->current_meta_string && length && !string_is_empty(pValue)) + { + /* handle any top-level playlist metadata here */ + /*RARCH_LOG("found meta: %s = %s\n", pCtx->current_meta_string, pValue);*/ + + free(pCtx->current_meta_string); + } + } + } + + pCtx->current_entry_val = NULL; + + return JSON_Parser_Continue; +} + +static JSON_Parser_HandlerResult JSONObjectMemberHandler(JSON_Parser parser, char *pValue, size_t length, JSON_StringAttributes attributes) +{ + JSONContext *pCtx = (JSONContext*)JSON_Parser_GetUserData(parser); + (void)attributes; /* unused */ + + if (pCtx->in_items && pCtx->object_depth == 2) + { + if (pCtx->array_depth == 1) + { + if (pCtx->current_entry_val) + { + /* something went wrong */ + RARCH_WARN("JSON parsing failed at line %d.\n", __LINE__); + return JSON_Parser_Abort; + } + + if (length) + { + if (string_is_equal(pValue, "path")) + pCtx->current_entry_val = &pCtx->current_entry->path; + else if (string_is_equal(pValue, "label")) + pCtx->current_entry_val = &pCtx->current_entry->label; + else if (string_is_equal(pValue, "core_path")) + pCtx->current_entry_val = &pCtx->current_entry->core_path; + else if (string_is_equal(pValue, "core_name")) + pCtx->current_entry_val = &pCtx->current_entry->core_name; + else if (string_is_equal(pValue, "crc32")) + pCtx->current_entry_val = &pCtx->current_entry->crc32; + else if (string_is_equal(pValue, "db_name")) + pCtx->current_entry_val = &pCtx->current_entry->db_name; + else + { + /* ignore unknown members */ + } + } + } + } + else if (pCtx->object_depth == 1) + { + if (pCtx->array_depth == 0) + { + if (length) + { + pCtx->current_meta_string = strdup(pValue); + } + } + } + + return JSON_Parser_Continue; +} static bool playlist_read_file( playlist_t *playlist, const char *path) { unsigned i; - char buf[PLAYLIST_ENTRIES][1024]; - intfstream_t *file = intfstream_open_file( - path, RETRO_VFS_FILE_ACCESS_READ, - RETRO_VFS_FILE_ACCESS_HINT_NONE); + bool new_format = true; + RFILE *file = filestream_open(path, + RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE); /* If playlist file does not exist, * create an empty playlist instead. @@ -506,52 +827,158 @@ static bool playlist_read_file( if (!file) return true; - for (i = 0; i < PLAYLIST_ENTRIES; i++) - buf[i][0] = '\0'; - - for (playlist->size = 0; playlist->size < playlist->cap; ) + /* Detect format of playlist */ { - unsigned i; - struct playlist_entry *entry = NULL; - for (i = 0; i < PLAYLIST_ENTRIES; i++) + char buf[16] = {0}; + int64_t bytes_read = filestream_read(file, buf, 15); + + /* Empty playlist file */ + if (bytes_read == 0) { - char *last = NULL; - *buf[i] = '\0'; - - if (!intfstream_gets(file, buf[i], sizeof(buf[i]))) - goto end; - - /* Read playlist entry and terminate string with NUL character - * regardless of Windows or Unix line endings - */ - if((last = strrchr(buf[i], '\r'))) - *last = '\0'; - else if((last = strrchr(buf[i], '\n'))) - *last = '\0'; + filestream_close(file); + return true; } - entry = &playlist->entries[playlist->size]; + filestream_seek(file, 0, SEEK_SET); - if (!*buf[2] || !*buf[3]) - continue; + if (bytes_read == 15) + { + if (string_is_equal(buf, "{\n \"version\": ")) + { + /* new playlist format detected */ + /*RARCH_LOG("New playlist format detected.\n");*/ + new_format = true; + } + else + { + /* old playlist format detected */ + /*RARCH_LOG("Old playlist format detected.\n");*/ + new_format = false; + } + } + else + { + /* corrupt playlist? */ + RARCH_ERR("Could not detect playlist format.\n"); + } + } - if (*buf[0]) - entry->path = strdup(buf[0]); - if (*buf[1]) - entry->label = strdup(buf[1]); + if (new_format) + { + JSONContext context = {0}; + context.parser = JSON_Parser_Create(NULL); + context.file = file; + context.playlist = playlist; - entry->core_path = strdup(buf[2]); - entry->core_name = strdup(buf[3]); - if (*buf[4]) - entry->crc32 = strdup(buf[4]); - if (*buf[5]) - entry->db_name = strdup(buf[5]); - playlist->size++; + if (!context.parser) + { + RARCH_ERR("Failed to create JSON parser\n"); + goto end; + } + + /*JSON_Parser_SetTrackObjectMembers(context.parser, JSON_True);*/ + JSON_Parser_SetAllowBOM(context.parser, JSON_True); + JSON_Parser_SetAllowComments(context.parser, JSON_True); + JSON_Parser_SetAllowSpecialNumbers(context.parser, JSON_True); + JSON_Parser_SetAllowHexNumbers(context.parser, JSON_True); + JSON_Parser_SetAllowUnescapedControlCharacters(context.parser, JSON_True); + JSON_Parser_SetReplaceInvalidEncodingSequences(context.parser, JSON_True); + + /*JSON_Parser_SetNullHandler(context.parser, &JSONNullHandler); + JSON_Parser_SetBooleanHandler(context.parser, &JSONBooleanHandler); + JSON_Parser_SetNumberHandler(context.parser, &JSONNumberHandler); + JSON_Parser_SetSpecialNumberHandler(context.parser, &JSONSpecialNumberHandler); + JSON_Parser_SetArrayItemHandler(context.parser, &JSONArrayItemHandler);*/ + + JSON_Parser_SetStringHandler(context.parser, &JSONStringHandler); + JSON_Parser_SetStartObjectHandler(context.parser, &JSONStartObjectHandler); + JSON_Parser_SetEndObjectHandler(context.parser, &JSONEndObjectHandler); + JSON_Parser_SetObjectMemberHandler(context.parser, &JSONObjectMemberHandler); + JSON_Parser_SetStartArrayHandler(context.parser, &JSONStartArrayHandler); + JSON_Parser_SetEndArrayHandler(context.parser, &JSONEndArrayHandler); + JSON_Parser_SetUserData(context.parser, &context); + + while (!filestream_eof(file)) + { + char chunk[4096] = {0}; + int64_t length = filestream_read(file, chunk, sizeof(chunk)); + + if (!length && !filestream_eof(file)) + { + RARCH_WARN("Could not read JSON input.\n"); + JSON_Parser_Free(context.parser); + goto end; + } + + if (!JSON_Parser_Parse(context.parser, chunk, length, JSON_False)) + { + RARCH_WARN("Error parsing chunk:\n---snip---\n%s\n---snip---\n", chunk); + JSONLogError(&context); + JSON_Parser_Free(context.parser); + goto end; + } + } + + if (!JSON_Parser_Parse(context.parser, NULL, 0, JSON_True)) + { + RARCH_WARN("Error parsing JSON.\n"); + JSONLogError(&context); + JSON_Parser_Free(context.parser); + goto end; + } + + JSON_Parser_Free(context.parser); + } + else + { + char buf[PLAYLIST_ENTRIES][1024] = {{0}}; + + for (i = 0; i < PLAYLIST_ENTRIES; i++) + buf[i][0] = '\0'; + + for (playlist->size = 0; playlist->size < playlist->cap; ) + { + unsigned i; + struct playlist_entry *entry = NULL; + for (i = 0; i < PLAYLIST_ENTRIES; i++) + { + char *last = NULL; + *buf[i] = '\0'; + + if (!filestream_gets(file, buf[i], sizeof(buf[i]))) + goto end; + + /* Read playlist entry and terminate string with NUL character + * regardless of Windows or Unix line endings + */ + if((last = strrchr(buf[i], '\r'))) + *last = '\0'; + else if((last = strrchr(buf[i], '\n'))) + *last = '\0'; + } + + entry = &playlist->entries[playlist->size]; + + if (!*buf[2] || !*buf[3]) + continue; + + if (*buf[0]) + entry->path = strdup(buf[0]); + if (*buf[1]) + entry->label = strdup(buf[1]); + + entry->core_path = strdup(buf[2]); + entry->core_name = strdup(buf[3]); + if (*buf[4]) + entry->crc32 = strdup(buf[4]); + if (*buf[5]) + entry->db_name = strdup(buf[5]); + playlist->size++; + } } end: - intfstream_close(file); - free(file); + filestream_close(file); return true; } diff --git a/ps2/compat_ctype.c b/ps2/compat_files/compat_ctype.c similarity index 96% rename from ps2/compat_ctype.c rename to ps2/compat_files/compat_ctype.c index 4dbd400cea..83e80394f7 100644 --- a/ps2/compat_ctype.c +++ b/ps2/compat_files/compat_ctype.c @@ -20,7 +20,13 @@ #define ULLONG_MAX UINT64_C(0xffffffffffffffff) -/* Do not link from libc */ +/* All the functions included in this file either could be: + - Because the PS2SDK doesn't contains this specific functionality + - Because the PS2SDK implementation is wrong + + Overrriding these methods here, make that the RetroArch will execute this code + rather than the code in the linked libraries + */ int islower(int c) { diff --git a/ps2/compat_files/time.c b/ps2/compat_files/time.c new file mode 100644 index 0000000000..2a7e672892 --- /dev/null +++ b/ps2/compat_files/time.c @@ -0,0 +1,114 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2019 - Francisco Javier Trujillo Mata - fjtrujy + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +/* This file improve the content of the original time.c file that belong to the PS2SDK. +The original time.c contains 4 non-static methods + +void _ps2sdk_time_init(void); +void _ps2sdk_time_deinit(void); +clock_t clock(void); +time_t time(time_t *t); + +So we need to duplicate all the method because this way the compiler will avoid to import +the code that belong to the PS2SDK */ + +#include +#include +#include +#include +#include +#include + +#define STARTING_YEAR 2000 +#define MIN_SUPPORTED_YEAR 1970 +#define MAX_SUPPORTED_YEAR 2108 +#define SECS_MIN 60L +#define MINS_HOUR 60L +#define HOURS_DAY 24L +#define DAYS_YEAR 365L +#define DEC(x) (10*(x/16)+(x%16)) +int _days[] = {-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364}; + +static time_t _gmtotime_t ( + int yr, /* 0 based */ + int mo, /* 1 based */ + int dy, /* 1 based */ + int hr, + int mn, + int sc + ) +{ + int passed_years; + long passed_days; + long passed_seconds_current_day; + time_t seconds_from_1970 = -1; + + if ((yr >= MIN_SUPPORTED_YEAR) || (yr <= MAX_SUPPORTED_YEAR)) { + passed_years = (long)yr - MIN_SUPPORTED_YEAR; /* Years after 1970 */ + /* Calculate days for these years */ + passed_days = passed_years * DAYS_YEAR; + passed_days += (passed_years >> 2) * (DAYS_YEAR + 1); /* passed leap years */ + passed_days += dy + _days[mo - 1]; /* passed days in the year */ + if ( !(yr & 3) && (mo > 2) ) { + passed_days++; /* if current year, is a leap year */ + } + passed_seconds_current_day = (((hr * MINS_HOUR) + mn) * SECS_MIN) + sc; + seconds_from_1970 = (passed_days * HOURS_DAY * MINS_HOUR * SECS_MIN) + passed_seconds_current_day; + } + + return seconds_from_1970; +} + +time_t ps2_time(time_t *t) { + time_t tim; + sceCdCLOCK clocktime; /* defined in libcdvd.h */ + + sceCdReadClock(&clocktime); /* libcdvd.a */ + configConvertToLocalTime(&clocktime); + + tim = _gmtotime_t (DEC(clocktime.year)+ STARTING_YEAR, + DEC(clocktime.month), + DEC(clocktime.day), + DEC(clocktime.hour), + DEC(clocktime.minute), + DEC(clocktime.second)); + + if(t) + *t = tim; + + return tim; +} + +/* Protected methods in libc */ +void _ps2sdk_time_init(void) +{ + SDL_Init(SDL_INIT_TIMER); +} + +/* Protected methods in libc */ +void _ps2sdk_time_deinit(void) +{ + SDL_QuitSubSystem(SDL_INIT_TIMER); +} + +clock_t clock(void) +{ + return SDL_GetTicks(); +} + +time_t time(time_t *t) { + time_t tim = -1; + /* TODO: This function need to be implemented again because the SDK one is not working fine */ + return time; +} diff --git a/ps2/include/stdint.h b/ps2/include/stdint.h index e9f805b7d3..cc2582c1f3 100644 --- a/ps2/include/stdint.h +++ b/ps2/include/stdint.h @@ -27,7 +27,7 @@ typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long uint64_t; -#define STDIN_FILENO 0 /* standard input file descriptor */ +#define STDIN_FILENO 0 /* standard input file descriptor */ #define STDOUT_FILENO 1 /* standard output file descriptor */ #define STDERR_FILENO 2 /* standard error file descriptor */ @@ -41,4 +41,4 @@ typedef unsigned long uint64_t; #define UINT32_C(val) val##ui #define UINT64_C(val) val##ul -#endif //STDINT_H +#endif /* STDINT_H */ diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 9d2312797d..4b2dbb4954 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -184,6 +184,12 @@ else check_lib '' DYLIB "$DYLIB" dlopen fi +if [ "$HAVE_CXX" != 'yes' ]; then + HAVE_DISCORD='no' + HAVE_QT='no' + HAVE_VULKAN='no' +fi + check_lib '' NETWORKING "$SOCKETLIB" socket "" "$SOCKETHEADER" if [ "$HAVE_NETWORKING" = 'yes' ]; then @@ -277,22 +283,15 @@ check_val '' SDL2 -lSDL2 SDL2 check_enabled QT 'Qt companion' -if [ "$HAVE_QT" != 'no' ] && [ "$MOC_PATH" != 'none' ]; then +if [ "$HAVE_QT" != 'no' ]; then check_pkgconf QT5CORE Qt5Core 5.2 check_pkgconf QT5GUI Qt5Gui 5.2 check_pkgconf QT5WIDGETS Qt5Widgets 5.2 check_pkgconf QT5CONCURRENT Qt5Concurrent 5.2 check_pkgconf QT5NETWORK Qt5Network 5.2 #check_pkgconf QT5WEBENGINE Qt5WebEngine 5.4 - check_pkgconf OPENSSL openssl 1.0.0 - check_val '' QT5CORE -lQt5Core QT5CORE - check_val '' QT5GUI -lQt5Gui QT5GUI - check_val '' QT5WIDGETS -lQt5Widgets QT5WIDGETS - check_val '' QT5CONCURRENT -lQt5Concurrent QT5CONCURRENT - check_val '' QT5NETWORK -lQt5Network QT5NETWORK - #check_val '' QT5WEBENGINE -lQt5WebEngine QT5WEBENGINE - check_val '' OPENSSL -lssl OPENSSL + # pkg-config is needed to reliably find Qt5 libraries. if [ "$HAVE_QT5CORE" = "no" ] || [ "$HAVE_QT5GUI" = "no" ] || [ "$HAVE_QT5WIDGETS" = "no" ] || [ "$HAVE_QT5CONCURRENT" = "no" ] || [ "$HAVE_QT5NETWORK" = "no" ]; then die : 'Notice: Not building Qt support, required libraries were not found.' @@ -301,6 +300,8 @@ if [ "$HAVE_QT" != 'no' ] && [ "$MOC_PATH" != 'none' ]; then HAVE_QT=yes fi + check_pkgconf OPENSSL openssl 1.0.0 + #if [ "$HAVE_QT5WEBENGINE" = "no" ]; then # die : 'Notice: Qt5WebEngine not found, disabling web browser support.' #fi @@ -562,29 +563,24 @@ fi check_pkgconf PYTHON python3 -if [ "$HAVE_MATERIALUI" != 'no' ] || [ "$HAVE_XMB" != 'no' ] || [ "$HAVE_ZARCH" != 'no' ] || [ "$HAVE_OZONE" != 'no' ]; then - if [ "$HAVE_RGUI" = 'no' ]; then - HAVE_MATERIALUI=no - HAVE_XMB=no - HAVE_STRIPES=no - HAVE_ZARCH=no - HAVE_OZONE=no - die : 'Notice: RGUI not available, MaterialUI, XMB, Ozone and ZARCH will also be disabled.' - elif [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES" = 'no' ] && [ "$HAVE_VULKAN" = 'no' ]; then +if [ "$HAVE_MENU" != 'no' ]; then + if [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES" = 'no' ] && [ "$HAVE_VULKAN" = 'no' ]; then if [ "$OS" = 'Win32' ]; then HAVE_SHADERPIPELINE=no HAVE_VULKAN=no - die : 'Notice: Hardware rendering context not available.' - elif [ "$HAVE_CACA" = 'yes' ] || [ "$HAVE_SIXEL" = 'yes' ]; then - die : 'Notice: Hardware rendering context not available.' else + if [ "$HAVE_CACA" != 'yes' ] && [ "$HAVE_SIXEL" != 'yes' ] && + [ "$HAVE_SDL" != 'yes' ] && [ "$HAVE_SDL2" != 'yes' ]; then + HAVE_RGUI=no + fi HAVE_MATERIALUI=no + HAVE_OZONE=no HAVE_XMB=no + HAVE_NUKLEAR=no HAVE_STRIPES=no HAVE_ZARCH=no - HAVE_OZONE=no - die : 'Notice: Hardware rendering context not available, XMB, MaterialUI, Ozone and ZARCH will also be disabled.' fi + die : 'Notice: Hardware rendering context not available.' fi fi @@ -605,16 +601,3 @@ fi if [ "$HAVE_V4L2" != 'no' ] && [ "$HAVE_VIDEOPROCESSOR" != 'no' ]; then HAVE_VIDEO_PROCESSOR=yes fi - -# Creates config.mk and config.h. -add_define MAKEFILE GLOBAL_CONFIG_DIR "$GLOBAL_CONFIG_DIR" -set -- $(set | grep ^HAVE_) -while [ $# -gt 0 ]; do - tmpvar="${1%=*}" - shift 1 - var="${tmpvar#HAVE_}" - vars="${vars} $var" -done -VARS="$(printf %s "$vars" | tr ' ' '\n' | $SORT)" -create_config_make config.mk $(printf %s "$VARS") -create_config_header config.h $(printf %s "$VARS") diff --git a/qb/config.moc.sh b/qb/config.moc.sh new file mode 100644 index 0000000000..7ae6f27418 --- /dev/null +++ b/qb/config.moc.sh @@ -0,0 +1,4 @@ +QT_VERSION=qt5 +QT_FLAGS="$QT5CORE_CFLAGS $QT5CORE_LIBS" + +add_define MAKEFILE QT_VERSION "$QT_VERSION" diff --git a/qb/config.params.sh b/qb/config.params.sh index 0ed6fb676a..d1b178569a 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -7,7 +7,8 @@ HAVE_OPENGLES_CFLAGS= # C-flags for custom GLES library HAVE_CACA=no # Libcaca support HAVE_SIXEL=no # Libsixel support HAVE_LIBRETRODB=yes # Libretrodb support -HAVE_RGUI=yes # RGUI menu +HAVE_MENU=yes # Enable menu drivers +HAVE_RGUI=auto # RGUI menu HAVE_MATERIALUI=auto # MaterialUI menu HAVE_XMB=auto # XMB menu HAVE_OZONE=auto # Ozone menu @@ -135,3 +136,4 @@ HAVE_OSMESA=no # Off-screen Mesa rendering HAVE_VIDEOPROCESSOR=auto # Enable video processor core HAVE_VIDEOCORE=auto # Broadcom Videocore 4 support HAVE_DRMINGW=no # DrMingw exception handler +HAVE_EASTEREGG=yes # Easter egg diff --git a/qb/qb.comp.sh b/qb/qb.comp.sh index 902afac3c5..58740d4d80 100644 --- a/qb/qb.comp.sh +++ b/qb/qb.comp.sh @@ -87,26 +87,6 @@ if [ "$OS" = "Win32" ]; then echo "$echobuf ... $WINDRES" fi -if [ "$HAVE_QT" != "no" ]; then - echobuf="Checking for moc" - if [ -z "$MOC" ]; then - MOC_PATH="none" - for moc in moc-qt5 moc; do - MOC="$(exists "$moc")" || MOC="" - [ "${MOC}" ] && { - MOC_PATH="$MOC" - break - } - done - fi - - echo "$echobuf ... $MOC_PATH" - - if [ "$MOC_PATH" = "none" ]; then - die : 'Warning: moc not found, Qt companion support will be disabled.' - fi -fi - if [ -z "$PKG_CONF_PATH" ]; then PKG_CONF_PATH="none" for pkgconf in pkgconf pkg-config; do diff --git a/qb/qb.libs.sh b/qb/qb.libs.sh index 9ea78a7c1e..0ecc808080 100644 --- a/qb/qb.libs.sh +++ b/qb/qb.libs.sh @@ -242,8 +242,21 @@ create_config_make() printf %s\\n "Creating make config: $outfile" - { [ "$HAVE_CC" = 'yes' ] && printf %s\\n "CC = $CC" "CFLAGS = $CFLAGS" - [ "$HAVE_CXX" = 'yes' ] && printf %s\\n "CXX = $CXX" "CXXFLAGS = $CXXFLAGS" + { if [ "$HAVE_CC" = 'yes' ]; then + printf %s\\n "CC = $CC" + + if [ "${CFLAGS}" ]; then + printf %s\\n "CFLAGS = $CFLAGS" + fi + fi + + if [ "$HAVE_CXX" = 'yes' ]; then + printf %s\\n "CXX = $CXX" + + if [ "${CXXFLAGS}" ]; then + printf %s\\n "CXXFLAGS = $CXXFLAGS" + fi + fi printf %s\\n "WINDRES = $WINDRES" \ "MOC = $MOC" \ diff --git a/qb/qb.make.sh b/qb/qb.make.sh new file mode 100644 index 0000000000..376f011c6f --- /dev/null +++ b/qb/qb.make.sh @@ -0,0 +1,12 @@ +# Creates config.mk and config.h. +add_define MAKEFILE GLOBAL_CONFIG_DIR "$GLOBAL_CONFIG_DIR" +set -- $(set | grep ^HAVE_) +while [ $# -gt 0 ]; do + tmpvar="${1%=*}" + shift 1 + var="${tmpvar#HAVE_}" + vars="${vars} $var" +done +VARS="$(printf %s "$vars" | tr ' ' '\n' | $SORT)" +create_config_make config.mk $(printf %s "$VARS") +create_config_header config.h $(printf %s "$VARS") diff --git a/qb/qb.moc.sh b/qb/qb.moc.sh new file mode 100644 index 0000000000..48ec950989 --- /dev/null +++ b/qb/qb.moc.sh @@ -0,0 +1,58 @@ +. qb/config.moc.sh + +TEMP_MOC=.moc.h +TEMP_CPP=.moc.cpp + +# Checking for working moc +cat << EOF > "$TEMP_MOC" +#include +class Test : public QObject +{ +public: + Q_OBJECT + QTimeZone tz; +}; +EOF + +HAVE_MOC=no +if [ "$HAVE_QT" = "yes" ]; then + moc_works=0 + if [ "$MOC" ]; then + QT_SELECT="$QT_VERSION" \ + "$MOC" -o "$TEMP_CPP" "$TEMP_MOC" >/dev/null 2>&1 && + "$CXX" -o "$TEMP_EXE" $(printf %s "$QT_FLAGS") \ + -fPIC -c "$TEMP_CPP" >/dev/null 2>&1 && + moc_works=1 + else + for moc in "moc-$QT_VERSION" moc; do + MOC="$(exists "$moc")" || MOC="" + if [ "$MOC" ]; then + QT_SELECT="$QT_VERSION" \ + "$MOC" -o "$TEMP_CPP" "$TEMP_MOC" >/dev/null 2>&1 || + continue + "$CXX" -o "$TEMP_EXE" $(printf %s "$QT_FLAGS") \ + -fPIC -c "$TEMP_CPP" >/dev/null 2>&1 && { + moc_works=1 + break + } + fi + done + fi + + moc_status='does not work' + if [ "$moc_works" = '1' ]; then + moc_status='works' + HAVE_MOC='yes' + elif [ -z "$MOC" ]; then + moc_status='not found' + fi + + printf %s\\n "Checking for moc ... $MOC $moc_status" + + if [ "$HAVE_MOC" != 'yes' ]; then + HAVE_QT='no' + die : 'Warning: moc not found, Qt companion support will be disabled.' + fi +fi + +rm -f -- "$TEMP_CPP" "$TEMP_EXE" "$TEMP_MOC" diff --git a/record/record_driver.c b/record/record_driver.c index e92f0d8724..5d672e1585 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -155,7 +155,6 @@ const record_driver_t *ffemu_find_backend(const char *ident) return NULL; } - /** * gfx_ctx_init_first: * @backend : Recording backend handle. @@ -406,12 +405,14 @@ bool recording_init(void) if (streaming_is_enabled()) { params.config = settings->paths.path_stream_config; - params.preset = settings->uints.video_stream_quality; + params.preset = (enum record_config_type) + settings->uints.video_stream_quality; } else { params.config = settings->paths.path_record_config; - params.preset = settings->uints.video_record_quality; + params.preset = (enum record_config_type) + settings->uints.video_record_quality; } } diff --git a/retroarch.c b/retroarch.c index 5e92fec952..b523c6d747 100644 --- a/retroarch.c +++ b/retroarch.c @@ -58,10 +58,6 @@ #include "config.h" #endif -#ifdef HAVE_COMMAND -#include "command.h" -#endif - #ifdef HAVE_MENU #include "menu/menu_driver.h" #include "menu/menu_input.h" @@ -90,6 +86,7 @@ #endif #include "autosave.h" +#include "command.h" #include "config.features.h" #include "content.h" #include "core_type.h" @@ -123,8 +120,6 @@ #include "retroarch.h" -#include "command.h" - #ifdef HAVE_RUNAHEAD #include "runahead/run_ahead.h" #endif @@ -206,13 +201,11 @@ const void *MAGIC_POINTER = (void*)(uintpt static retro_bits_t has_set_libretro_device; static bool has_set_core = false; -static bool has_set_username = false; #ifdef HAVE_DISCORD bool discord_is_inited = false; #endif static bool rarch_is_inited = false; static bool rarch_error_on_init = false; -static bool rarch_block_config_read = false; static bool rarch_force_fullscreen = false; static bool rarch_is_switching_display_mode = false; static bool has_set_verbosity = false; @@ -235,13 +228,9 @@ static bool rarch_use_sram = false; static bool rarch_ups_pref = false; static bool rarch_bps_pref = false; static bool rarch_ips_pref = false; -static bool rarch_patch_blocked = false; -static bool rarch_first_start = true; -static bool runloop_force_nonblock = false; static bool runloop_paused = false; static bool runloop_idle = false; -static bool runloop_exec = false; static bool runloop_slowmotion = false; bool runloop_fastmotion = false; static bool runloop_shutdown_initiated = false; @@ -252,11 +241,7 @@ static bool runloop_remaps_core_active = false; static bool runloop_remaps_game_active = false; static bool runloop_remaps_content_dir_active = false; static bool runloop_game_options_active = false; -static bool runloop_missing_bios = false; static bool runloop_autosave = false; -#ifdef HAVE_DYNAMIC -static bool core_set_on_cmdline = false; -#endif static rarch_system_info_t runloop_system; static struct retro_frame_time_callback runloop_frame_time; static retro_keyboard_event_t runloop_key_event = NULL; @@ -279,12 +264,7 @@ static retro_time_t frame_limit_last_time = 0.0; extern bool input_driver_flushing_input; -#ifdef HAVE_DYNAMIC -bool retroarch_core_set_on_cmdline(void) -{ - return core_set_on_cmdline; -} -#endif +static char launch_arguments[4096]; #ifdef HAVE_THREADS void runloop_msg_queue_lock(void) @@ -344,7 +324,6 @@ static void retroarch_override_setting_free_state(void) } } - static void global_free(void) { global_t *global = NULL; @@ -355,14 +334,14 @@ static void global_free(void) command_event(CMD_EVENT_RECORD_DEINIT, NULL); command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); - rarch_block_config_read = false; + rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); rarch_is_sram_load_disabled = false; rarch_is_sram_save_disabled = false; rarch_use_sram = false; - rarch_bps_pref = false; - rarch_ips_pref = false; - rarch_ups_pref = false; - rarch_patch_blocked = false; + rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_PATCH_BLOCKED, NULL); runloop_overrides_active = false; runloop_remaps_core_active = false; runloop_remaps_game_active = false; @@ -377,8 +356,8 @@ static void global_free(void) { if (!string_is_empty(global->name.remapfile)) free(global->name.remapfile); + memset(global, 0, sizeof(struct global)); } - memset(global, 0, sizeof(struct global)); retroarch_override_setting_free_state(); } @@ -638,6 +617,7 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) { const char *optstring = NULL; bool explicit_menu = false; + unsigned i; global_t *global = global_get_ptr(); const struct option opts[] = { @@ -690,6 +670,14 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; + /* Copy the args into a buffer so launch arguments can be reused */ + for (i = 0; i < (unsigned)argc; i++) + { + strlcat(launch_arguments, argv[i], sizeof(launch_arguments)); + strlcat(launch_arguments, " ", sizeof(launch_arguments)); + } + string_trim_whitespace_left(launch_arguments); + /* Handling the core type is finicky. Based on the arguments we pass in, * we handle it differently. * Some current cases which track desired behavior and how it is supposed to work: @@ -719,10 +707,10 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) retroarch_override_setting_free_state(); - has_set_username = false; - rarch_ups_pref = false; - rarch_ips_pref = false; - rarch_bps_pref = false; + rarch_ctl(RARCH_CTL_USERNAME_UNSET, NULL); + rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL); *global->name.ups = '\0'; *global->name.bps = '\0'; *global->name.ips = '\0'; @@ -734,6 +722,11 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) optstring = "hs:fvS:A:c:U:DN:d:" BSV_MOVIE_ARG NETPLAY_ARG DYNAMIC_ARG FFMPEG_RECORD_ARG; +#ifdef ORBIS + argv = &(argv[2]); + argc = argc - 2; +#endif + #ifndef HAVE_MENU if (argc == 1) { @@ -745,52 +738,55 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) /* First pass: Read the config file path and any directory overrides, so * they're in place when we load the config */ - for (;;) + if (argc) { - int c = getopt_long(argc, argv, optstring, opts, NULL); + for (;;) + { + int c = getopt_long(argc, argv, optstring, opts, NULL); #if 0 - fprintf(stderr, "c is: %c (%d), optarg is: [%s]\n", c, c, string_is_empty(optarg) ? "" : optarg); + fprintf(stderr, "c is: %c (%d), optarg is: [%s]\n", c, c, string_is_empty(optarg) ? "" : optarg); #endif - if (c == -1) - break; - - switch (c) - { - case 'h': - retroarch_print_help(argv[0]); - exit(0); - - case 'c': - RARCH_LOG("Set config file to : %s\n", optarg); - path_set(RARCH_PATH_CONFIG, optarg); + if (c == -1) break; - case RA_OPT_APPENDCONFIG: - path_set(RARCH_PATH_CONFIG_APPEND, optarg); - break; + switch (c) + { + case 'h': + retroarch_print_help(argv[0]); + exit(0); - case 's': - strlcpy(global->name.savefile, optarg, - sizeof(global->name.savefile)); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL); - break; + case 'c': + RARCH_LOG("Set config file to : %s\n", optarg); + path_set(RARCH_PATH_CONFIG, optarg); + break; - case 'S': - strlcpy(global->name.savestate, optarg, - sizeof(global->name.savestate)); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_STATE_PATH, NULL); - break; + case RA_OPT_APPENDCONFIG: + path_set(RARCH_PATH_CONFIG_APPEND, optarg); + break; - /* Must handle '?' otherwise you get an infinite loop */ - case '?': - retroarch_print_help(argv[0]); - retroarch_fail(1, "retroarch_parse_input()"); - break; - /* All other arguments are handled in the second pass */ + case 's': + strlcpy(global->name.savefile, optarg, + sizeof(global->name.savefile)); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL); + break; + + case 'S': + strlcpy(global->name.savestate, optarg, + sizeof(global->name.savestate)); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_STATE_PATH, NULL); + break; + + /* Must handle '?' otherwise you get an infinite loop */ + case '?': + retroarch_print_help(argv[0]); + retroarch_fail(1, "retroarch_parse_input()"); + break; + /* All other arguments are handled in the second pass */ + } } } @@ -799,346 +795,345 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) /* Second pass: All other arguments override the config file */ optind = 1; - for (;;) + + if (argc) { - int c = getopt_long(argc, argv, optstring, opts, NULL); - - if (c == -1) - break; - - switch (c) + for (;;) { - case 'd': - { - unsigned new_port; - unsigned id = 0; - struct string_list *list = string_split(optarg, ":"); - int port = 0; + int c = getopt_long(argc, argv, optstring, opts, NULL); - if (list && list->size == 2) + if (c == -1) + break; + + switch (c) + { + case 'd': { - port = (int)strtol(list->elems[0].data, NULL, 0); - id = (unsigned)strtoul(list->elems[1].data, NULL, 0); + unsigned new_port; + unsigned id = 0; + struct string_list *list = string_split(optarg, ":"); + int port = 0; + + if (list && list->size == 2) + { + port = (int)strtol(list->elems[0].data, NULL, 0); + id = (unsigned)strtoul(list->elems[1].data, NULL, 0); + } + string_list_free(list); + + if (port < 1 || port > MAX_USERS) + { + RARCH_ERR("%s\n", msg_hash_to_str(MSG_VALUE_CONNECT_DEVICE_FROM_A_VALID_PORT)); + retroarch_print_help(argv[0]); + retroarch_fail(1, "retroarch_parse_input()"); + } + new_port = port -1; + + input_config_set_device(new_port, id); + + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); } - string_list_free(list); + break; - if (port < 1 || port > MAX_USERS) + case 'A': { - RARCH_ERR("%s\n", msg_hash_to_str(MSG_VALUE_CONNECT_DEVICE_FROM_A_VALID_PORT)); + unsigned new_port; + int port = (int)strtol(optarg, NULL, 0); + + if (port < 1 || port > MAX_USERS) + { + RARCH_ERR("Connect dualanalog to a valid port.\n"); + retroarch_print_help(argv[0]); + retroarch_fail(1, "retroarch_parse_input()"); + } + new_port = port - 1; + + input_config_set_device(new_port, RETRO_DEVICE_ANALOG); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); + } + break; + + case 'f': + rarch_force_fullscreen = true; + break; + + case 'v': + verbosity_enable(); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_VERBOSITY, NULL); + break; + + case 'N': + { + unsigned new_port; + int port = (int)strtol(optarg, NULL, 0); + + if (port < 1 || port > MAX_USERS) + { + RARCH_ERR("%s\n", + msg_hash_to_str(MSG_DISCONNECT_DEVICE_FROM_A_VALID_PORT)); + retroarch_print_help(argv[0]); + retroarch_fail(1, "retroarch_parse_input()"); + } + new_port = port - 1; + input_config_set_device(port - 1, RETRO_DEVICE_NONE); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); + } + break; + + case 'r': + strlcpy(global->record.path, optarg, + sizeof(global->record.path)); + if (recording_is_enabled()) + recording_set_state(true); + break; + + #ifdef HAVE_DYNAMIC + case 'L': + if (path_is_directory(optarg)) + { + settings_t *settings = config_get_ptr(); + + path_clear(RARCH_PATH_CORE); + strlcpy(settings->paths.directory_libretro, optarg, + sizeof(settings->paths.directory_libretro)); + + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO, NULL); + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL); + RARCH_WARN("Using old --libretro behavior. " + "Setting libretro_directory to \"%s\" instead.\n", + optarg); + } + else if (filestream_exists(optarg)) + { + + rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, optarg); + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO, NULL); + + /* We requested explicit core, so use PLAIN core type. */ + retroarch_set_current_core_type(CORE_TYPE_PLAIN, false); + } + else + { + RARCH_WARN("--libretro argument \"%s\" is neither a file nor directory. Ignoring.\n", + optarg); + } + + break; + #endif + case 'P': + case 'R': + bsv_movie_set_start_path(optarg); + + if (c == 'P') + bsv_movie_ctl(BSV_MOVIE_CTL_SET_START_PLAYBACK, NULL); + else + bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_START_PLAYBACK, NULL); + + if (c == 'R') + bsv_movie_ctl(BSV_MOVIE_CTL_SET_START_RECORDING, NULL); + else + bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_START_RECORDING, NULL); + break; + + case 'M': + if (string_is_equal(optarg, "noload-nosave")) + { + rarch_is_sram_load_disabled = true; + rarch_is_sram_save_disabled = true; + } + else if (string_is_equal(optarg, "noload-save")) + rarch_is_sram_load_disabled = true; + else if (string_is_equal(optarg, "load-nosave")) + rarch_is_sram_save_disabled = true; + else if (string_is_not_equal(optarg, "load-save")) + { + RARCH_ERR("Invalid argument in --sram-mode.\n"); retroarch_print_help(argv[0]); retroarch_fail(1, "retroarch_parse_input()"); } - new_port = port -1; + break; - input_config_set_device(new_port, id); - - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); - } - break; - - case 'A': - { - unsigned new_port; - int port = (int)strtol(optarg, NULL, 0); - - if (port < 1 || port > MAX_USERS) - { - RARCH_ERR("Connect dualanalog to a valid port.\n"); - retroarch_print_help(argv[0]); - retroarch_fail(1, "retroarch_parse_input()"); - } - new_port = port - 1; - - input_config_set_device(new_port, RETRO_DEVICE_ANALOG); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); - } - break; - - case 'f': - rarch_force_fullscreen = true; - break; - - case 'v': - verbosity_enable(); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_VERBOSITY, NULL); - break; - - case 'N': - { - unsigned new_port; - int port = (int)strtol(optarg, NULL, 0); - - if (port < 1 || port > MAX_USERS) - { - RARCH_ERR("%s\n", - msg_hash_to_str(MSG_DISCONNECT_DEVICE_FROM_A_VALID_PORT)); - retroarch_print_help(argv[0]); - retroarch_fail(1, "retroarch_parse_input()"); - } - new_port = port - 1; - input_config_set_device(port - 1, RETRO_DEVICE_NONE); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); - } - break; - - case 'r': - strlcpy(global->record.path, optarg, - sizeof(global->record.path)); - if (recording_is_enabled()) - recording_set_state(true); - break; - -#ifdef HAVE_DYNAMIC - case 'L': - if (path_is_directory(optarg)) - { - settings_t *settings = config_get_ptr(); - - if (rarch_first_start) - core_set_on_cmdline = true; - - path_clear(RARCH_PATH_CORE); - strlcpy(settings->paths.directory_libretro, optarg, - sizeof(settings->paths.directory_libretro)); - - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO, NULL); - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL); - RARCH_WARN("Using old --libretro behavior. " - "Setting libretro_directory to \"%s\" instead.\n", - optarg); - } - else if (filestream_exists(optarg)) - { - if (rarch_first_start) - core_set_on_cmdline = true; - - rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, optarg); - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO, NULL); - - /* We requested explicit core, so use PLAIN core type. */ - retroarch_set_current_core_type(CORE_TYPE_PLAIN, false); - } - else - { - RARCH_WARN("--libretro argument \"%s\" is neither a file nor directory. Ignoring.\n", - optarg); - } - - break; -#endif - case 'P': - case 'R': - bsv_movie_set_start_path(optarg); - - if (c == 'P') - bsv_movie_ctl(BSV_MOVIE_CTL_SET_START_PLAYBACK, NULL); - else - bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_START_PLAYBACK, NULL); - - if (c == 'R') - bsv_movie_ctl(BSV_MOVIE_CTL_SET_START_RECORDING, NULL); - else - bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_START_RECORDING, NULL); - break; - - case 'M': - if (string_is_equal(optarg, "noload-nosave")) - { - rarch_is_sram_load_disabled = true; - rarch_is_sram_save_disabled = true; - } - else if (string_is_equal(optarg, "noload-save")) - rarch_is_sram_load_disabled = true; - else if (string_is_equal(optarg, "load-nosave")) - rarch_is_sram_save_disabled = true; - else if (string_is_not_equal(optarg, "load-save")) - { - RARCH_ERR("Invalid argument in --sram-mode.\n"); - retroarch_print_help(argv[0]); - retroarch_fail(1, "retroarch_parse_input()"); - } - break; - -#ifdef HAVE_NETWORKING - case 'H': - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_MODE, NULL); - netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_SERVER, NULL); - break; - - case 'C': - { - settings_t *settings = config_get_ptr(); + #ifdef HAVE_NETWORKING + case 'H': retroarch_override_setting_set( RARCH_OVERRIDE_SETTING_NETPLAY_MODE, NULL); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL); - netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); - strlcpy(settings->paths.netplay_server, optarg, - sizeof(settings->paths.netplay_server)); - } - break; + netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_SERVER, NULL); + break; - case RA_OPT_STATELESS: - { - settings_t *settings = config_get_ptr(); + case 'C': + { + settings_t *settings = config_get_ptr(); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_MODE, NULL); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL); + netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); + strlcpy(settings->paths.netplay_server, optarg, + sizeof(settings->paths.netplay_server)); + } + break; - configuration_set_bool(settings, - settings->bools.netplay_stateless_mode, true); + case RA_OPT_STATELESS: + { + settings_t *settings = config_get_ptr(); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE, NULL); - } - break; + configuration_set_bool(settings, + settings->bools.netplay_stateless_mode, true); - case RA_OPT_CHECK_FRAMES: - { - settings_t *settings = config_get_ptr(); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES, NULL); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE, NULL); + } + break; - configuration_set_int(settings, - settings->ints.netplay_check_frames, - (int)strtoul(optarg, NULL, 0)); - } - break; + case RA_OPT_CHECK_FRAMES: + { + settings_t *settings = config_get_ptr(); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES, NULL); - case RA_OPT_PORT: - { - settings_t *settings = config_get_ptr(); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT, NULL); - configuration_set_uint(settings, - settings->uints.netplay_port, - (int)strtoul(optarg, NULL, 0)); - } - break; + configuration_set_int(settings, + settings->ints.netplay_check_frames, + (int)strtoul(optarg, NULL, 0)); + } + break; -#if defined(HAVE_NETWORK_CMD) - case RA_OPT_COMMAND: -#ifdef HAVE_COMMAND - if (command_network_send((const char*)optarg)) + case RA_OPT_PORT: + { + settings_t *settings = config_get_ptr(); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT, NULL); + configuration_set_uint(settings, + settings->uints.netplay_port, + (int)strtoul(optarg, NULL, 0)); + } + break; + + #if defined(HAVE_NETWORK_CMD) + case RA_OPT_COMMAND: + #ifdef HAVE_COMMAND + if (command_network_send((const char*)optarg)) + exit(0); + else + retroarch_fail(1, "network_cmd_send()"); + #endif + break; + #endif + + #endif + + case RA_OPT_BPS: + strlcpy(global->name.bps, optarg, + sizeof(global->name.bps)); + rarch_bps_pref = true; + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_BPS_PREF, NULL); + break; + + case 'U': + strlcpy(global->name.ups, optarg, + sizeof(global->name.ups)); + rarch_ups_pref = true; + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_UPS_PREF, NULL); + break; + + case RA_OPT_IPS: + strlcpy(global->name.ips, optarg, + sizeof(global->name.ips)); + rarch_ips_pref = true; + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_IPS_PREF, NULL); + break; + + case RA_OPT_NO_PATCH: + rarch_ctl(RARCH_CTL_SET_PATCH_BLOCKED, NULL); + break; + + case 'D': + frontend_driver_detach_console(); + break; + + case RA_OPT_MENU: + explicit_menu = true; + break; + + case RA_OPT_NICK: + { + settings_t *settings = config_get_ptr(); + + rarch_ctl(RARCH_CTL_USERNAME_SET, NULL); + + strlcpy(settings->paths.username, optarg, + sizeof(settings->paths.username)); + } + break; + + case RA_OPT_SIZE: + if (sscanf(optarg, "%ux%u", + recording_driver_get_width(), + recording_driver_get_height()) != 2) + { + RARCH_ERR("Wrong format for --size.\n"); + retroarch_print_help(argv[0]); + retroarch_fail(1, "retroarch_parse_input()"); + } + break; + + case RA_OPT_RECORDCONFIG: + strlcpy(global->record.config, optarg, + sizeof(global->record.config)); + break; + + case RA_OPT_MAX_FRAMES: + runloop_max_frames = (unsigned)strtoul(optarg, NULL, 10); + break; + + case RA_OPT_MAX_FRAMES_SCREENSHOT: + runloop_max_frames_screenshot = true; + break; + + case RA_OPT_MAX_FRAMES_SCREENSHOT_PATH: + strlcpy(runloop_max_frames_screenshot_path, optarg, sizeof(runloop_max_frames_screenshot_path)); + break; + + case RA_OPT_SUBSYSTEM: + path_set(RARCH_PATH_SUBSYSTEM, optarg); + break; + + case RA_OPT_FEATURES: + retroarch_print_features(); exit(0); - else - retroarch_fail(1, "network_cmd_send()"); -#endif - break; -#endif -#endif + case RA_OPT_EOF_EXIT: + bsv_movie_ctl(BSV_MOVIE_CTL_SET_END_EOF, NULL); + break; - case RA_OPT_BPS: - strlcpy(global->name.bps, optarg, - sizeof(global->name.bps)); - rarch_bps_pref = true; - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_BPS_PREF, NULL); - break; + case RA_OPT_VERSION: + retroarch_print_version(); + exit(0); - case 'U': - strlcpy(global->name.ups, optarg, - sizeof(global->name.ups)); - rarch_ups_pref = true; - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_UPS_PREF, NULL); - break; + #ifdef HAVE_FILE_LOGGER + case RA_OPT_LOG_FILE: + retro_main_log_file_init(optarg); + break; + #endif - case RA_OPT_IPS: - strlcpy(global->name.ips, optarg, - sizeof(global->name.ips)); - rarch_ips_pref = true; - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_IPS_PREF, NULL); - break; + case 'c': + case 'h': + case RA_OPT_APPENDCONFIG: + case 's': + case 'S': + break; /* Handled in the first pass */ - case RA_OPT_NO_PATCH: - rarch_ctl(RARCH_CTL_SET_PATCH_BLOCKED, NULL); - break; - - case 'D': - frontend_driver_detach_console(); - break; - - case RA_OPT_MENU: - explicit_menu = true; - break; - - case RA_OPT_NICK: - { - settings_t *settings = config_get_ptr(); - - has_set_username = true; - - strlcpy(settings->paths.username, optarg, - sizeof(settings->paths.username)); - } - break; - - case RA_OPT_SIZE: - if (sscanf(optarg, "%ux%u", - recording_driver_get_width(), - recording_driver_get_height()) != 2) - { - RARCH_ERR("Wrong format for --size.\n"); + case '?': retroarch_print_help(argv[0]); retroarch_fail(1, "retroarch_parse_input()"); - } - break; - case RA_OPT_RECORDCONFIG: - strlcpy(global->record.config, optarg, - sizeof(global->record.config)); - break; - - case RA_OPT_MAX_FRAMES: - runloop_max_frames = (unsigned)strtoul(optarg, NULL, 10); - break; - - case RA_OPT_MAX_FRAMES_SCREENSHOT: - runloop_max_frames_screenshot = true; - break; - - case RA_OPT_MAX_FRAMES_SCREENSHOT_PATH: - strlcpy(runloop_max_frames_screenshot_path, optarg, sizeof(runloop_max_frames_screenshot_path)); - break; - - case RA_OPT_SUBSYSTEM: - path_set(RARCH_PATH_SUBSYSTEM, optarg); - break; - - case RA_OPT_FEATURES: - retroarch_print_features(); - exit(0); - - case RA_OPT_EOF_EXIT: - bsv_movie_ctl(BSV_MOVIE_CTL_SET_END_EOF, NULL); - break; - - case RA_OPT_VERSION: - retroarch_print_version(); - exit(0); - -#ifdef HAVE_FILE_LOGGER - case RA_OPT_LOG_FILE: - retro_main_log_file_init(optarg); - break; -#endif - - case 'c': - case 'h': - case RA_OPT_APPENDCONFIG: - case 's': - case 'S': - break; /* Handled in the first pass */ - - case '?': - retroarch_print_help(argv[0]); - retroarch_fail(1, "retroarch_parse_input()"); - - default: - RARCH_ERR("%s\n", msg_hash_to_str(MSG_ERROR_PARSING_ARGUMENTS)); - retroarch_fail(1, "retroarch_parse_input()"); + default: + RARCH_ERR("%s\n", msg_hash_to_str(MSG_ERROR_PARSING_ARGUMENTS)); + retroarch_fail(1, "retroarch_parse_input()"); + } } } @@ -1299,6 +1294,12 @@ static void retroarch_main_init_media(void) retroarch_set_current_core_type(CORE_TYPE_IMAGEVIEWER, false); } break; +#endif +#ifdef HAVE_EASTEREGG + case RARCH_CONTENT_GONG: + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO, NULL); + retroarch_set_current_core_type(CORE_TYPE_GONG, false); + break; #endif default: break; @@ -1383,9 +1384,12 @@ bool retroarch_main_init(int argc, char *argv[]) /* Handle core initialization failure */ if (init_failed) { -#ifdef HAVE_MENU /* Check if menu was active prior to core initialization */ - if (menu_driver_is_alive()) + if (!content_launched_from_cli() +#ifdef HAVE_MENU + || menu_driver_is_alive() +#endif + ) { /* Attempt initializing dummy core */ current_core_type = CORE_TYPE_DUMMY; @@ -1393,7 +1397,6 @@ bool retroarch_main_init(int argc, char *argv[]) goto error; } else -#endif { /* Fall back to regular error handling */ goto error; @@ -1430,17 +1433,12 @@ bool retroarch_main_init(int argc, char *argv[]) } #endif - if (rarch_first_start) - rarch_first_start = false; return true; error: command_event(CMD_EVENT_CORE_DEINIT, NULL); rarch_is_inited = false; - if (rarch_first_start) - rarch_first_start = false; - return false; } @@ -1521,6 +1519,12 @@ error: bool rarch_ctl(enum rarch_ctl_state state, void *data) { + static bool runloop_force_nonblock = false; + static bool has_set_username = false; + static bool rarch_block_config_read = false; + static bool rarch_patch_blocked = false; + static bool runloop_missing_bios = false; /* TODO/FIXME - not used right now? */ + switch(state) { case RARCH_CTL_IS_PATCH_BLOCKED: @@ -1562,7 +1566,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) has_set_username = false; rarch_is_inited = false; rarch_error_on_init = false; - rarch_block_config_read = false; + rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); retroarch_msg_queue_deinit(); driver_uninit(DRIVERS_CMD_ALL); @@ -1584,7 +1588,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) global_free(); break; case RARCH_CTL_MAIN_DEINIT: - if (!rarch_is_inited) + if (!rarch_ctl(RARCH_CTL_IS_INITED, NULL)) return false; command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); command_event(CMD_EVENT_COMMAND_DEINIT, NULL); @@ -1615,7 +1619,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) #endif break; case RARCH_CTL_INIT: - if (rarch_is_inited) + if (rarch_ctl(RARCH_CTL_IS_INITED, NULL)) driver_uninit(DRIVERS_CMD_ALL); #ifdef HAVE_THREAD_STORAGE @@ -1709,7 +1713,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) runloop_system.mmaps.descriptors = NULL; runloop_system.mmaps.num_descriptors = 0; - runloop_key_event = NULL; + rarch_ctl(RARCH_CTL_UNSET_KEY_EVENT, NULL); runloop_frontend_key_event = NULL; audio_driver_unset_callback(); @@ -1889,6 +1893,9 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) case RARCH_CTL_SET_SHUTDOWN: runloop_shutdown_initiated = true; break; + case RARCH_CTL_UNSET_SHUTDOWN: + runloop_shutdown_initiated = false; + break; case RARCH_CTL_IS_SHUTDOWN: return runloop_shutdown_initiated; case RARCH_CTL_DATA_DEINIT: @@ -2004,6 +2011,9 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) *key_event = &runloop_key_event; } break; + case RARCH_CTL_UNSET_KEY_EVENT: + runloop_key_event = NULL; + break; case RARCH_CTL_FRONTEND_KEY_EVENT_GET: { retro_keyboard_event_t **key_event = @@ -2371,7 +2381,7 @@ void retroarch_fail(int error_code, const char *error) bool retroarch_main_quit(void) { - if (!runloop_shutdown_initiated) + if (!rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL)) { command_event(CMD_EVENT_AUTOSAVE_STATE, NULL); command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL); @@ -2379,7 +2389,7 @@ bool retroarch_main_quit(void) command_event(CMD_EVENT_RESTORE_REMAPS, NULL); } - runloop_shutdown_initiated = true; + rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL); rarch_menu_running_finished(); #ifdef HAVE_DISCORD @@ -2396,7 +2406,6 @@ global_t *global_get_ptr(void) return &g_extern; } - void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush) @@ -2429,7 +2438,6 @@ void runloop_msg_queue_push(const char *msg, #endif } - void runloop_get_status(bool *is_paused, bool *is_idle, bool *is_slowmotion, bool *is_perfcnt_enable) { @@ -2453,6 +2461,8 @@ bool runloop_msg_queue_pull(const char **ret) return true; } +#define bsv_movie_is_end_of_file() (bsv_movie_state.movie_end && bsv_movie_state.eof_exit) + /* Time to exit out of the main loop? * Reasons for exiting: * a) Shutdown environment callback was invoked. @@ -2562,28 +2572,38 @@ static bool input_driver_toggle_button_combo( static enum runloop_state runloop_check_state( settings_t *settings, bool input_nonblock_state, + bool runloop_is_paused, + float fastforward_ratio, unsigned *sleep_ms) { input_bits_t current_input; #ifdef HAVE_MENU static input_bits_t last_input = {{0}}; #endif - static bool old_fs_toggle_pressed= false; + static bool old_quit_key = false; + static bool quit_key = false; + static bool trig_quit_key = false; + static bool runloop_exec = false; static bool old_focus = true; bool is_focused = false; bool is_alive = false; uint64_t frame_count = 0; bool focused = true; bool pause_nonactive = settings->bools.pause_nonactive; + bool rarch_is_initialized = rarch_ctl(RARCH_CTL_IS_INITED, NULL); bool fs_toggle_triggered = false; #ifdef HAVE_MENU bool menu_driver_binding_state = menu_driver_is_binding_state(); bool menu_is_alive = menu_driver_is_alive(); + unsigned menu_toggle_gamepad_combo = settings->uints.input_menu_toggle_gamepad_combo; +#ifdef HAVE_EASTEREGG + static uint64_t seq = 0; +#endif #endif #ifdef HAVE_LIBNX - // Should be called once per frame - if(!appletMainLoop()) + /* Should be called once per frame */ + if (!appletMainLoop()) return RUNLOOP_STATE_QUIT; #endif @@ -2599,9 +2619,9 @@ static enum runloop_state runloop_check_state( #ifdef HAVE_MENU last_input = current_input; if ( - ((settings->uints.input_menu_toggle_gamepad_combo != INPUT_TOGGLE_NONE) && + ((menu_toggle_gamepad_combo != INPUT_TOGGLE_NONE) && input_driver_toggle_button_combo( - settings->uints.input_menu_toggle_gamepad_combo, &last_input))) + menu_toggle_gamepad_combo, &last_input))) BIT256_SET(current_input, RARCH_MENU_TOGGLE); #endif @@ -2611,7 +2631,7 @@ static enum runloop_state runloop_check_state( if (bits_any_set(current_input.data, ARRAY_SIZE(current_input.data))) { BIT256_CLEAR_ALL(current_input); - if (runloop_paused) + if (runloop_is_paused) BIT256_SET(current_input, RARCH_PAUSE_TOGGLE); input_driver_flushing_input = true; } @@ -2648,17 +2668,18 @@ static enum runloop_state runloop_check_state( /* Check fullscreen toggle */ { - bool fs_toggle_pressed = BIT256_GET( + static bool old_fs_toggle_pressed = false; + bool fs_toggle_pressed = BIT256_GET( current_input, RARCH_FULLSCREEN_TOGGLE_KEY); - fs_toggle_triggered = fs_toggle_pressed && !old_fs_toggle_pressed; + fs_toggle_triggered = fs_toggle_pressed && !old_fs_toggle_pressed; if (fs_toggle_triggered) { - bool fullscreen_toggled = !runloop_paused + bool fullscreen_toggled = !runloop_is_paused #ifdef HAVE_MENU || menu_is_alive; #else -; + ; #endif if (fullscreen_toggled) @@ -2680,7 +2701,6 @@ static enum runloop_state runloop_check_state( old_pressed = pressed; } - #ifdef HAVE_OVERLAY { static char prev_overlay_restore = false; @@ -2701,11 +2721,9 @@ static enum runloop_state runloop_check_state( /* Check quit key */ { - static bool old_quit_key = false; - bool quit_key = BIT256_GET( + quit_key = BIT256_GET( current_input, RARCH_QUIT_KEY); - bool trig_quit_key = quit_key && !old_quit_key; - + trig_quit_key = quit_key && !old_quit_key; old_quit_key = quit_key; if (time_to_exit(trig_quit_key)) @@ -2749,125 +2767,148 @@ static enum runloop_state runloop_check_state( content_info.environ_get = NULL; if (!task_push_start_dummy_core(&content_info)) - { - old_quit_key = quit_key; - retroarch_main_quit(); - return RUNLOOP_STATE_QUIT; - } + goto quit; /* Loads dummy core instead of exiting RetroArch completely. * Aborts core shutdown if invoked. */ - runloop_shutdown_initiated = false; + rarch_ctl(RARCH_CTL_UNSET_SHUTDOWN, NULL); runloop_core_shutdown_initiated = false; } else - { - old_quit_key = quit_key; - retroarch_main_quit(); - return RUNLOOP_STATE_QUIT; - } + goto quit; } } #ifdef HAVE_MENU if (menu_is_alive) { + enum menu_action action; static input_bits_t old_input = {{0}}; - static enum menu_action old_action = MENU_ACTION_CANCEL; + static enum menu_action + old_action = MENU_ACTION_CANCEL; + bool focused = false; + input_bits_t trigger_input = current_input; + global_t *global = global_get_ptr(); menu_ctx_iterate_t iter; retro_ctx.poll_cb(); + bits_clear_bits(trigger_input.data, old_input.data, + ARRAY_SIZE(trigger_input.data)); + action = (enum menu_action)menu_event(¤t_input, &trigger_input); + focused = pause_nonactive ? is_focused : true; + focused = focused && !ui_companion_is_on_foreground(); + + iter.action = action; + + if (global) { - enum menu_action action; - bool focused = false; - input_bits_t trigger_input = current_input; - global_t *global = global_get_ptr(); - - bits_clear_bits(trigger_input.data, old_input.data, - ARRAY_SIZE(trigger_input.data)); - - action = (enum menu_action)menu_event(¤t_input, &trigger_input); - focused = pause_nonactive ? is_focused : true; - focused = focused && !ui_companion_is_on_foreground(); - - iter.action = action; - - if ( global ) + if (action == old_action) { - if ( action == old_action ) + retro_time_t press_time = cpu_features_get_time_usec(); + if (action == MENU_ACTION_NOOP) + global->menu.noop_press_time = press_time - global->menu.noop_start_time; + else + global->menu.action_press_time = press_time - global->menu.action_start_time; + } + else + { + if (action == MENU_ACTION_NOOP) { - if ( action == MENU_ACTION_NOOP ) - global->menu.noop_press_time = cpu_features_get_time_usec() - global->menu.noop_start_time ; + global->menu.noop_start_time = cpu_features_get_time_usec(); + global->menu.noop_press_time = 0; + if (global->menu.prev_action == old_action) + global->menu.action_start_time = global->menu.prev_start_time; else - global->menu.action_press_time = cpu_features_get_time_usec() - global->menu.action_start_time ; + global->menu.action_start_time = cpu_features_get_time_usec(); } else { - if ( action == MENU_ACTION_NOOP ) + if (global->menu.prev_action == action && + global->menu.noop_press_time < 200000) /* 250ms */ { - global->menu.noop_start_time = cpu_features_get_time_usec() ; - global->menu.noop_press_time = 0 ; - if ( global->menu.prev_action == old_action ) - global->menu.action_start_time = global->menu.prev_start_time; - else - global->menu.action_start_time = cpu_features_get_time_usec(); + global->menu.action_start_time = global->menu.prev_start_time; + global->menu.action_press_time = cpu_features_get_time_usec() - global->menu.action_start_time; } else { - if ( global->menu.prev_action == action && - global->menu.noop_press_time < 200000) /* 250ms */ - { - global->menu.action_start_time = global->menu.prev_start_time ; - global->menu.action_press_time = cpu_features_get_time_usec() - global->menu.action_start_time; - } - else - { - global->menu.prev_start_time = cpu_features_get_time_usec() ; - global->menu.prev_action = action; - global->menu.action_press_time = 0; - } + global->menu.prev_start_time = cpu_features_get_time_usec(); + global->menu.prev_action = action; + global->menu.action_press_time = 0; } } } - - if (!menu_driver_iterate(&iter)) - rarch_menu_running_finished(); - - if (focused || !runloop_idle) - { - bool libretro_running = menu_display_libretro_running( - rarch_is_inited, - (current_core_type == CORE_TYPE_DUMMY)); - - menu_driver_render(runloop_idle, rarch_is_inited, - (current_core_type == CORE_TYPE_DUMMY) - ) - ; - if (settings->bools.audio_enable_menu && - !libretro_running) - audio_driver_menu_sample(); - } - - old_input = current_input; - old_action = action; - - if (!focused) - return RUNLOOP_STATE_POLLED_AND_SLEEP; - - if (action == MENU_ACTION_QUIT && !menu_driver_binding_state) - return RUNLOOP_STATE_QUIT; } + if (!menu_driver_iterate(&iter)) + rarch_menu_running_finished(); + + if (focused || !runloop_idle) + { + bool libretro_running = menu_display_libretro_running( + rarch_is_initialized, + (current_core_type == CORE_TYPE_DUMMY)); + + menu_driver_render(runloop_idle, rarch_is_initialized, + (current_core_type == CORE_TYPE_DUMMY) + ) + ; + if (settings->bools.audio_enable_menu && + !libretro_running) + audio_driver_menu_sample(); + +#ifdef HAVE_EASTEREGG + { + bool library_name_is_empty = string_is_empty(runloop_system.info.library_name); + + if (library_name_is_empty && trigger_input.data[0]) + { + seq |= trigger_input.data[0] & 0xF0; + + if (seq == 1157460427127406720ULL) + { + content_ctx_info_t content_info; + content_info.argc = 0; + content_info.argv = NULL; + content_info.args = NULL; + content_info.environ_get = NULL; + + task_push_start_builtin_core( + &content_info, + CORE_TYPE_GONG, NULL, NULL); + } + + seq <<= 8; + } + else if (!library_name_is_empty) + seq = 0; + } +#endif + } + + old_input = current_input; + old_action = action; + + if (!focused) + return RUNLOOP_STATE_POLLED_AND_SLEEP; + + if (action == MENU_ACTION_QUIT && !menu_driver_binding_state) + return RUNLOOP_STATE_QUIT; + if (runloop_idle) return RUNLOOP_STATE_POLLED_AND_SLEEP; } else +#endif + { +#if defined(HAVE_MENU) && defined(HAVE_EASTEREGG) + seq = 0; #endif if (runloop_idle) return RUNLOOP_STATE_SLEEP; + } /* Check game focus toggle */ { @@ -2888,9 +2929,7 @@ static enum runloop_state runloop_check_state( current_input, RARCH_UI_COMPANION_TOGGLE); if (pressed && !old_pressed) - { command_event(CMD_EVENT_UI_COMPANION_TOGGLE, (void*)(intptr_t)0); - } old_pressed = pressed; } @@ -2899,14 +2938,17 @@ static enum runloop_state runloop_check_state( /* Check menu toggle */ { static bool old_pressed = false; + char *menu_driver = settings->arrays.menu_driver; bool pressed = BIT256_GET( - current_input, RARCH_MENU_TOGGLE); + current_input, RARCH_MENU_TOGGLE) && + !string_is_equal(menu_driver, "null"); if (menu_event_kb_is_set(RETROK_F1) == 1) { if (menu_driver_is_alive()) { - if (rarch_is_inited && (current_core_type != CORE_TYPE_DUMMY)) + if (rarch_is_initialized && + (current_core_type != CORE_TYPE_DUMMY)) { rarch_menu_running_finished(); menu_event_kb_set(false, RETROK_F1); @@ -2919,7 +2961,8 @@ static enum runloop_state runloop_check_state( { if (menu_driver_is_alive()) { - if (rarch_is_inited && (current_core_type != CORE_TYPE_DUMMY)) + if (rarch_is_initialized && + (current_core_type != CORE_TYPE_DUMMY)) rarch_menu_running_finished(); } else @@ -2936,7 +2979,7 @@ static enum runloop_state runloop_check_state( if (menu_driver_is_alive()) { - if (!settings->bools.menu_throttle_framerate && !settings->floats.fastforward_ratio) + if (!settings->bools.menu_throttle_framerate && !fastforward_ratio) return RUNLOOP_STATE_MENU_ITERATE; return RUNLOOP_STATE_END; @@ -3072,7 +3115,7 @@ static enum runloop_state runloop_check_state( * unpause the libretro core. */ /* FRAMEADVANCE will set us into pause mode. */ - pause_pressed |= !runloop_paused && trig_frameadvance; + pause_pressed |= !runloop_is_paused && trig_frameadvance; if (focused && pause_pressed && !old_pause_pressed) command_event(CMD_EVENT_PAUSE_TOGGLE, NULL); @@ -3085,7 +3128,7 @@ static enum runloop_state runloop_check_state( old_pause_pressed = pause_pressed; old_frameadvance = frameadvance_pressed; - if (runloop_paused) + if (runloop_is_paused) { check_is_oneshot = trig_frameadvance || BIT256_GET(current_input, RARCH_REWIND); @@ -3123,7 +3166,7 @@ static enum runloop_state runloop_check_state( if (input_nonblock_state) { input_driver_unset_nonblock_state(); - runloop_fastmotion = false; + runloop_fastmotion = false; fastforward_after_frames = 1; } else @@ -3143,7 +3186,7 @@ static enum runloop_state runloop_check_state( else { input_driver_unset_nonblock_state(); - runloop_fastmotion = false; + runloop_fastmotion = false; fastforward_after_frames = 1; } driver_set_nonblock_state(); @@ -3167,23 +3210,20 @@ static enum runloop_state runloop_check_state( bool should_slot_decrease = BIT256_GET( current_input, RARCH_STATE_SLOT_MINUS); bool should_set = false; + int cur_state_slot = settings->ints.state_slot; /* Checks if the state increase/decrease keys have been pressed * for this frame. */ if (should_slot_increase && !old_should_slot_increase) { - int new_state_slot = settings->ints.state_slot + 1; - - configuration_set_int(settings, settings->ints.state_slot, new_state_slot); + configuration_set_int(settings, settings->ints.state_slot, cur_state_slot + 1); should_set = true; } else if (should_slot_decrease && !old_should_slot_decrease) { - int new_state_slot = settings->ints.state_slot - 1; - - if (settings->ints.state_slot > 0) - configuration_set_int(settings, settings->ints.state_slot, new_state_slot); + if (cur_state_slot > 0) + configuration_set_int(settings, settings->ints.state_slot, cur_state_slot - 1); should_set = true; } @@ -3226,8 +3266,8 @@ static enum runloop_state runloop_check_state( #ifdef HAVE_CHEEVOS cheevos_hardcore_active = settings->bools.cheevos_enable - && settings->bools.cheevos_hardcore_mode_enable - && cheevos_loaded && !cheevos_hardcore_paused; + && settings->bools.cheevos_hardcore_mode_enable + && cheevos_loaded && !cheevos_hardcore_paused; if (cheevos_hardcore_active && cheevos_state_loaded_flag) { @@ -3244,7 +3284,7 @@ static enum runloop_state runloop_check_state( s[0] = '\0'; if (state_manager_check_rewind(BIT256_GET(current_input, RARCH_REWIND), - settings->uints.rewind_granularity, runloop_paused, s, sizeof(s), &t)) + settings->uints.rewind_granularity, runloop_is_paused, s, sizeof(s), &t)) runloop_msg_queue_push(s, 0, t, true); } @@ -3261,12 +3301,12 @@ static enum runloop_state runloop_check_state( current_input, RARCH_SLOWMOTION_HOLD_KEY); if (new_slowmotion_button_state && !old_slowmotion_button_state) - { - if (runloop_slowmotion) - runloop_slowmotion = false; - else - runloop_slowmotion = true; - } + { + if (runloop_slowmotion) + runloop_slowmotion = false; + else + runloop_slowmotion = true; + } else if (old_slowmotion_hold_button_state != new_slowmotion_hold_button_state) { if (new_slowmotion_hold_button_state) @@ -3432,6 +3472,11 @@ static enum runloop_state runloop_check_state( } return RUNLOOP_STATE_ITERATE; + +quit: + old_quit_key = quit_key; + retroarch_main_quit(); + return RUNLOOP_STATE_QUIT; } void runloop_set(enum runloop_action action) @@ -3470,8 +3515,12 @@ void runloop_unset(enum runloop_action action) int runloop_iterate(unsigned *sleep_ms) { unsigned i; + bool runloop_is_paused = runloop_paused; bool input_nonblock_state = input_driver_is_nonblock_state(); settings_t *settings = config_get_ptr(); + float fastforward_ratio = settings->floats.fastforward_ratio; + unsigned video_frame_delay = settings->uints.video_frame_delay; + bool vrr_runloop_enable = settings->bools.vrr_runloop_enable; unsigned max_users = *(input_driver_get_uint(INPUT_ACTION_MAX_USERS)); #ifdef HAVE_DISCORD @@ -3483,24 +3532,25 @@ int runloop_iterate(unsigned *sleep_ms) { /* Updates frame timing if frame timing callback is in use by the core. * Limits frame time if fast forward ratio throttle is enabled. */ - - retro_time_t current = cpu_features_get_time_usec(); - retro_time_t delta = current - runloop_frame_time_last; - bool is_locked_fps = (runloop_paused || - input_nonblock_state) | - !!recording_data; - - - if (!runloop_frame_time_last || is_locked_fps) - delta = runloop_frame_time.reference; - - if (!is_locked_fps && runloop_slowmotion) - delta /= settings->floats.slowmotion_ratio; - - runloop_frame_time_last = current; + retro_usec_t runloop_last_frame_time = runloop_frame_time_last; + retro_time_t current = cpu_features_get_time_usec(); + bool is_locked_fps = (runloop_is_paused || input_nonblock_state) + | !!recording_data; + retro_time_t delta = (!runloop_last_frame_time || is_locked_fps) ? + runloop_frame_time.reference + : (current - runloop_last_frame_time); if (is_locked_fps) runloop_frame_time_last = 0; + else + { + float slowmotion_ratio = settings->floats.slowmotion_ratio; + + runloop_frame_time_last = current; + + if (runloop_slowmotion) + delta /= slowmotion_ratio; + } runloop_frame_time.callback(delta); } @@ -3509,6 +3559,8 @@ int runloop_iterate(unsigned *sleep_ms) runloop_check_state( settings, input_nonblock_state, + runloop_is_paused, + fastforward_ratio, sleep_ms)) { case RUNLOOP_STATE_QUIT: @@ -3537,7 +3589,10 @@ int runloop_iterate(unsigned *sleep_ms) if (runloop_autosave) autosave_lock(); - bsv_movie_set_frame_start(); + /* Used for rewinding while playback/record. */ + if (bsv_movie_state_handle) + bsv_movie_state_handle->frame_pos[bsv_movie_state_handle->frame_ptr] + = intfstream_tell(bsv_movie_state_handle->file); camera_driver_poll(); @@ -3555,26 +3610,31 @@ int runloop_iterate(unsigned *sleep_ms) input_push_analog_dpad(auto_binds, dpad_mode); } - if ((settings->uints.video_frame_delay > 0) && !input_nonblock_state) - retro_sleep(settings->uints.video_frame_delay); + if ((video_frame_delay > 0) && !input_nonblock_state) + retro_sleep(video_frame_delay); #ifdef HAVE_RUNAHEAD - /* Run Ahead Feature replaces the call to core_run in this loop */ - if (settings->bools.run_ahead_enabled && settings->uints.run_ahead_frames > 0 + { + unsigned run_ahead_num_frames = settings->uints.run_ahead_frames; + /* Run Ahead Feature replaces the call to core_run in this loop */ + if (settings->bools.run_ahead_enabled && run_ahead_num_frames > 0 #ifdef HAVE_NETWORKING - && !netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL) + && !netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL) #endif - ) - run_ahead(settings->uints.run_ahead_frames, settings->bools.run_ahead_secondary_instance); - else + ) + run_ahead(run_ahead_num_frames, settings->bools.run_ahead_secondary_instance); + else + core_run(); + } +#else + core_run(); #endif - core_run(); #ifdef HAVE_CHEEVOS if (runloop_check_cheevos()) cheevos_test(); #endif - cheat_manager_apply_retro_cheats() ; + cheat_manager_apply_retro_cheats(); #ifdef HAVE_DISCORD if (discord_is_inited) @@ -3599,18 +3659,27 @@ int runloop_iterate(unsigned *sleep_ms) input_pop_analog_dpad(auto_binds); } - bsv_movie_set_frame_end(); + if (bsv_movie_state_handle) + { + bsv_movie_state_handle->frame_ptr = + (bsv_movie_state_handle->frame_ptr + 1) + & bsv_movie_state_handle->frame_mask; + + bsv_movie_state_handle->first_rewind = + !bsv_movie_state_handle->did_rewind; + bsv_movie_state_handle->did_rewind = false; + } if (runloop_autosave) autosave_unlock(); /* Condition for max speed x0.0 when vrr_runloop is off to skip that part */ - if (settings->floats.fastforward_ratio || settings->bools.vrr_runloop_enable) + if (fastforward_ratio || vrr_runloop_enable) end: { retro_time_t to_sleep_ms; - if (settings->bools.vrr_runloop_enable) + if (vrr_runloop_enable) { struct retro_system_av_info *av_info = video_viewport_get_system_av_info(); @@ -3631,12 +3700,12 @@ int runloop_iterate(unsigned *sleep_ms) } /* Fast Forward for max speed x0.0 */ - if (!settings->floats.fastforward_ratio && runloop_fastmotion) + if (!fastforward_ratio && runloop_fastmotion) return 0; frame_limit_minimum_time = (retro_time_t)roundf(1000000.0f / (av_info->timing.fps * - (runloop_fastmotion ? settings->floats.fastforward_ratio : 1.0f))); + (runloop_fastmotion ? fastforward_ratio : 1.0f))); } to_sleep_ms = ( @@ -3645,7 +3714,7 @@ int runloop_iterate(unsigned *sleep_ms) if (to_sleep_ms > 0) { - *sleep_ms = (unsigned)to_sleep_ms; + *sleep_ms = (unsigned)to_sleep_ms; /* Combat jitter a bit. */ frame_limit_last_time += frame_limit_minimum_time; return 1; @@ -3667,3 +3736,8 @@ struct retro_system_info *runloop_get_libretro_system_info(void) struct retro_system_info *system = &runloop_system.info; return system; } + +char *get_retroarch_launch_arguments(void) +{ + return launch_arguments; +} diff --git a/retroarch.cfg b/retroarch.cfg index da36413bda..c15033ef2a 100644 --- a/retroarch.cfg +++ b/retroarch.cfg @@ -888,3 +888,6 @@ # Enable Sustained Performance Mode in Android 7.0+ # sustained_performance_mode = true + +# File format to use when writing playlists to disk +# playlist_use_old_format = false diff --git a/retroarch.h b/retroarch.h index 50f481ea6c..da182d72fe 100644 --- a/retroarch.h +++ b/retroarch.h @@ -35,7 +35,6 @@ RETRO_BEGIN_DECLS #define RETRO_ENVIRONMENT_RETROARCH_START_BLOCK 0x800000 - #define RETRO_ENVIRONMENT_SET_SAVE_STATE_IN_BACKGROUND (2 | RETRO_ENVIRONMENT_RETROARCH_START_BLOCK) /* bool * -- * Boolean value that tells the front end to save states in the @@ -146,6 +145,7 @@ enum rarch_ctl_state RARCH_CTL_SET_CORE_SHUTDOWN, RARCH_CTL_SET_SHUTDOWN, + RARCH_CTL_UNSET_SHUTDOWN, RARCH_CTL_IS_SHUTDOWN, /* Runloop state */ @@ -159,6 +159,7 @@ enum rarch_ctl_state /* Key event */ RARCH_CTL_FRONTEND_KEY_EVENT_GET, + RARCH_CTL_UNSET_KEY_EVENT, RARCH_CTL_KEY_EVENT_GET, RARCH_CTL_DATA_DEINIT, @@ -391,6 +392,8 @@ void rarch_menu_running_finished(void); bool retroarch_is_on_main_thread(void); +char *get_retroarch_launch_arguments(void); + rarch_system_info_t *runloop_get_system_info(void); struct retro_system_info *runloop_get_libretro_system_info(void); @@ -401,10 +404,6 @@ void runloop_msg_queue_lock(void); void runloop_msg_queue_unlock(void); #endif -#ifdef HAVE_DYNAMIC -bool retroarch_core_set_on_cmdline(void); -#endif - RETRO_END_DECLS #endif diff --git a/runahead/dirty_input.c b/runahead/dirty_input.c index 6a9cc68a21..7aa33f632c 100644 --- a/runahead/dirty_input.c +++ b/runahead/dirty_input.c @@ -48,7 +48,7 @@ static void InputListElementRealloc(InputListElement *element, unsigned int newS { if (newSize > element->state_size) { - element->state = realloc(element->state, newSize * sizeof(int16_t)); + element->state = (int16_t*)realloc(element->state, newSize * sizeof(int16_t)); memset(&element->state[element->state_size], 0, (newSize - element->state_size) * sizeof(int16_t)); element->state_size = newSize; } @@ -219,4 +219,3 @@ void remove_input_state_hook(void) retro_unserialize_callback_original = NULL; } } - diff --git a/runahead/mylist.h b/runahead/mylist.h index 1ec3e9c325..be9a12d8dd 100644 --- a/runahead/mylist.h +++ b/runahead/mylist.h @@ -37,4 +37,3 @@ void mylist_pop_front(MyList *list); RETRO_END_DECLS #endif - diff --git a/runahead/run_ahead.c b/runahead/run_ahead.c index f5ce38b51c..f131354ef1 100644 --- a/runahead/run_ahead.c +++ b/runahead/run_ahead.c @@ -60,9 +60,9 @@ static void *runahead_save_state_alloc(void) return savestate; } -static void runahead_save_state_free(void *state) +static void runahead_save_state_free(void *data) { - retro_ctx_serialize_info_t *savestate = (retro_ctx_serialize_info_t*)state; + retro_ctx_serialize_info_t *savestate = (retro_ctx_serialize_info_t*)data; if (!savestate) return; free(savestate->data); @@ -130,7 +130,6 @@ static void unload_hook(void) current_core.retro_unload_game(); } - static void deinit_hook(void) { remove_hooks(); @@ -156,7 +155,6 @@ static void add_hooks(void) add_input_state_hook(); } - /* Runahead Code */ static bool runahead_video_driver_is_active = true; @@ -184,7 +182,6 @@ static uint64_t runahead_get_frame_count() return frame_count; } - static void runahead_check_for_gui(void) { /* Hack: If we were in the GUI, force a resync. */ @@ -467,7 +464,6 @@ void runahead_destroy(void) static bool request_fast_savestate; static bool hard_disable_audio; - bool want_fast_savestate(void) { return request_fast_savestate; diff --git a/runahead/secondary_core.c b/runahead/secondary_core.c index 02d708e736..b30dc30156 100644 --- a/runahead/secondary_core.c +++ b/runahead/secondary_core.c @@ -52,17 +52,24 @@ void clear_controller_port_map(void); static char *get_temp_directory_alloc(void) { settings_t *settings = config_get_ptr(); - char *path = NULL; + char *path = NULL; #ifdef _WIN32 #ifdef LEGACY_WIN32 - DWORD pathLength = GetTempPath(0, NULL) + 1; - path = (char*)malloc(pathLength * sizeof(char)); + DWORD pathLength = GetTempPath(0, NULL) + 1; + path = (char*)malloc(pathLength * sizeof(char)); - path[pathLength - 1] = 0; + if (!path) + return NULL; + + path[pathLength - 1] = 0; GetTempPath(pathLength, path); #else DWORD pathLength = GetTempPathW(0, NULL) + 1; wchar_t *wideStr = (wchar_t*)malloc(pathLength * sizeof(wchar_t)); + + if (!wideStr) + return NULL; + wideStr[pathLength - 1] = 0; GetTempPathW(pathLength, wideStr); @@ -324,7 +331,6 @@ static bool secondary_core_create(void) return true; } - void secondary_core_set_variable_update(void) { has_variable_update = true; @@ -435,4 +441,3 @@ void secondary_core_set_variable_update(void) { } void clear_controller_port_map(void) { } #endif - diff --git a/setting_list.c b/setting_list.c index f62df7c389..f32319db18 100644 --- a/setting_list.c +++ b/setting_list.c @@ -53,11 +53,15 @@ bool settings_list_append(rarch_setting_t **list, if (list_info->index == list_info->size) { + rarch_setting_t *list_settings = NULL; + list_info->size *= 2; - *list = (rarch_setting_t*) + list_settings = (rarch_setting_t*) realloc(*list, sizeof(rarch_setting_t) * list_info->size); - if (!*list) + + if (!list_settings) return false; + *list = list_settings; } return true; @@ -348,7 +352,6 @@ int setting_uint_action_left_with_refresh(rarch_setting_t *setting, bool wraparo } - static int setting_size_action_left_default(rarch_setting_t *setting, bool wraparound) { double min = 0.0f; @@ -717,7 +720,6 @@ static void setting_get_string_representation_st_bool(rarch_setting_t *setting, setting->boolean.off_label, len); } - /** * setting_get_string_representation_st_float: * @setting : pointer to setting @@ -790,7 +792,6 @@ static int setting_action_action_ok(rarch_setting_t *setting, bool wraparound) return 0; } - /** * setting_action_setting: * @name : Name of setting. diff --git a/tasks/task_audio_mixer.c b/tasks/task_audio_mixer.c index 833412fd78..2887d0e86c 100644 --- a/tasks/task_audio_mixer.c +++ b/tasks/task_audio_mixer.c @@ -41,6 +41,13 @@ typedef struct nbio_buf char *path; } nbio_buf_t; +struct audio_mixer_userdata +{ + enum audio_mixer_stream_type stream_type; + enum audio_mixer_slot_selection_type slot_selection_type; + unsigned slot_selection_idx; +}; + struct audio_mixer_handle { nbio_buf_t *buffer; @@ -53,15 +60,15 @@ struct audio_mixer_handle static void task_audio_mixer_load_free(retro_task_t *task) { nbio_handle_t *nbio = (nbio_handle_t*)task->state; - struct audio_mixer_handle *image = (struct audio_mixer_handle*)nbio->data; + struct audio_mixer_handle *mixer = (struct audio_mixer_handle*)nbio->data; - if (image) + if (mixer) { - if (image->buffer) + if (mixer->buffer) { - if (image->buffer->path) - free(image->buffer->path); - free(image->buffer); + if (mixer->buffer->path) + free(mixer->buffer->path); + free(mixer->buffer); } } @@ -76,17 +83,17 @@ static void task_audio_mixer_load_free(retro_task_t *task) static int cb_nbio_audio_mixer_load(void *data, size_t len) { nbio_handle_t *nbio = (nbio_handle_t*)data; - struct audio_mixer_handle *image= (struct audio_mixer_handle*)nbio->data; + struct audio_mixer_handle *mixer= (struct audio_mixer_handle*)nbio->data; void *ptr = nbio_get_ptr(nbio->handle, &len); - nbio_buf_t *buffer = (nbio_buf_t*)calloc(1, sizeof(*image->buffer)); + nbio_buf_t *buffer = (nbio_buf_t*)calloc(1, sizeof(*mixer->buffer)); if (!buffer) return -1; - image->buffer = buffer; - image->buffer->buf = ptr; - image->buffer->bufsize = (unsigned)len; - image->copy_data_over = true; + mixer->buffer = buffer; + mixer->buffer->buf = ptr; + mixer->buffer->bufsize = (unsigned)len; + mixer->copy_data_over = true; nbio->is_finished = true; return 0; @@ -97,11 +104,14 @@ static void task_audio_mixer_handle_upload_ogg(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; - - if (!img) + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_OGG; params.state = AUDIO_STREAM_STATE_STOPPED; params.buf = img->buf; @@ -111,6 +121,8 @@ static void task_audio_mixer_handle_upload_ogg(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -122,11 +134,15 @@ static void task_audio_mixer_handle_upload_ogg_and_play(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_OGG; params.state = AUDIO_STREAM_STATE_PLAYING; params.buf = img->buf; @@ -136,6 +152,8 @@ static void task_audio_mixer_handle_upload_ogg_and_play(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -147,11 +165,15 @@ static void task_audio_mixer_handle_upload_flac(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_FLAC; params.state = AUDIO_STREAM_STATE_STOPPED; params.buf = img->buf; @@ -161,6 +183,8 @@ static void task_audio_mixer_handle_upload_flac(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -172,11 +196,15 @@ static void task_audio_mixer_handle_upload_flac_and_play(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_FLAC; params.state = AUDIO_STREAM_STATE_PLAYING; params.buf = img->buf; @@ -186,6 +214,8 @@ static void task_audio_mixer_handle_upload_flac_and_play(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -197,11 +227,15 @@ static void task_audio_mixer_handle_upload_mp3(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_MP3; params.state = AUDIO_STREAM_STATE_STOPPED; params.buf = img->buf; @@ -211,6 +245,8 @@ static void task_audio_mixer_handle_upload_mp3(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -222,11 +258,15 @@ static void task_audio_mixer_handle_upload_mp3_and_play(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_MP3; params.state = AUDIO_STREAM_STATE_PLAYING; params.buf = img->buf; @@ -236,6 +276,8 @@ static void task_audio_mixer_handle_upload_mp3_and_play(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -247,11 +289,15 @@ static void task_audio_mixer_handle_upload_mod(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_MOD; params.state = AUDIO_STREAM_STATE_STOPPED; params.buf = img->buf; @@ -261,6 +307,8 @@ static void task_audio_mixer_handle_upload_mod(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -272,11 +320,15 @@ static void task_audio_mixer_handle_upload_mod_and_play(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_MOD; params.state = AUDIO_STREAM_STATE_PLAYING; params.buf = img->buf; @@ -286,6 +338,8 @@ static void task_audio_mixer_handle_upload_mod_and_play(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -297,11 +351,15 @@ static void task_audio_mixer_handle_upload_wav(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_WAV; params.state = AUDIO_STREAM_STATE_STOPPED; params.buf = img->buf; @@ -311,6 +369,8 @@ static void task_audio_mixer_handle_upload_wav(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -322,11 +382,15 @@ static void task_audio_mixer_handle_upload_wav_and_play(void *task_data, { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)user_data; - if (!img) + if (!img || !user) return; params.volume = 1.0f; + params.slot_selection_type = user->slot_selection_type; + params.slot_selection_idx = user->slot_selection_idx; + params.stream_type = user->stream_type; params.type = AUDIO_MIXER_TYPE_WAV; params.state = AUDIO_STREAM_STATE_PLAYING; params.buf = img->buf; @@ -336,6 +400,8 @@ static void task_audio_mixer_handle_upload_wav_and_play(void *task_data, audio_driver_mixer_add_stream(¶ms); + if (img->path) + free(img->path); if (params.basename != NULL) free(params.basename); free(img); @@ -345,28 +411,27 @@ static void task_audio_mixer_handle_upload_wav_and_play(void *task_data, bool task_audio_mixer_load_handler(retro_task_t *task) { nbio_handle_t *nbio = (nbio_handle_t*)task->state; - struct audio_mixer_handle *image = (struct audio_mixer_handle*)nbio->data; + struct audio_mixer_handle *mixer = (struct audio_mixer_handle*)nbio->data; if ( nbio->is_finished - && (image && !image->is_finished) - && (image->copy_data_over) + && (mixer && !mixer->is_finished) + && (mixer->copy_data_over) && (!task_get_cancelled(task))) { nbio_buf_t *img = (nbio_buf_t*)calloc(1, sizeof(*img)); if (img) { - img->buf = image->buffer->buf; - img->bufsize = image->buffer->bufsize; + img->buf = mixer->buffer->buf; + img->bufsize = mixer->buffer->bufsize; img->path = strdup(nbio->path); } task_set_data(task, img); - image->copy_data_over = false; - image->is_finished = true; - + mixer->copy_data_over = false; + mixer->is_finished = true; return false; } @@ -374,13 +439,18 @@ bool task_audio_mixer_load_handler(retro_task_t *task) return true; } -bool task_push_audio_mixer_load_and_play(const char *fullpath, retro_task_callback_t cb, void *user_data) +bool task_push_audio_mixer_load_and_play( + const char *fullpath, retro_task_callback_t cb, void *user_data, + bool system, + enum audio_mixer_slot_selection_type slot_selection_type, + int slot_selection_idx) { nbio_handle_t *nbio = NULL; - struct audio_mixer_handle *image = NULL; + struct audio_mixer_handle *mixer = NULL; retro_task_t *t = (retro_task_t*)calloc(1, sizeof(*t)); + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)calloc(1, sizeof(*user)); - if (!t) + if (!t || !user) goto error; nbio = (nbio_handle_t*)calloc(1, sizeof(*nbio)); @@ -390,38 +460,38 @@ bool task_push_audio_mixer_load_and_play(const char *fullpath, retro_task_callba nbio->path = strdup(fullpath); - image = (struct audio_mixer_handle*)calloc(1, sizeof(*image)); - if (!image) + mixer = (struct audio_mixer_handle*)calloc(1, sizeof(*mixer)); + if (!mixer) goto error; - image->is_finished = false; + mixer->is_finished = false; - strlcpy(image->path, fullpath, sizeof(image->path)); + strlcpy(mixer->path, fullpath, sizeof(mixer->path)); nbio->type = NBIO_TYPE_NONE; - image->type = AUDIO_MIXER_TYPE_NONE; + mixer->type = AUDIO_MIXER_TYPE_NONE; if (strstr(fullpath, file_path_str(FILE_PATH_WAV_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_WAV; + mixer->type = AUDIO_MIXER_TYPE_WAV; nbio->type = NBIO_TYPE_WAV; t->callback = task_audio_mixer_handle_upload_wav_and_play; } else if (strstr(fullpath, file_path_str(FILE_PATH_OGG_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_OGG; + mixer->type = AUDIO_MIXER_TYPE_OGG; nbio->type = NBIO_TYPE_OGG; t->callback = task_audio_mixer_handle_upload_ogg_and_play; } else if (strstr(fullpath, file_path_str(FILE_PATH_MP3_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_MP3; + mixer->type = AUDIO_MIXER_TYPE_MP3; nbio->type = NBIO_TYPE_MP3; t->callback = task_audio_mixer_handle_upload_mp3_and_play; } else if (strstr(fullpath, file_path_str(FILE_PATH_FLAC_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_FLAC; + mixer->type = AUDIO_MIXER_TYPE_FLAC; nbio->type = NBIO_TYPE_FLAC; t->callback = task_audio_mixer_handle_upload_flac_and_play; } @@ -429,20 +499,28 @@ bool task_push_audio_mixer_load_and_play(const char *fullpath, retro_task_callba strstr(fullpath, file_path_str(FILE_PATH_S3M_EXTENSION)) || strstr(fullpath, file_path_str(FILE_PATH_XM_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_MOD; + mixer->type = AUDIO_MIXER_TYPE_MOD; nbio->type = NBIO_TYPE_MOD; t->callback = task_audio_mixer_handle_upload_mod_and_play; } - nbio->data = (struct audio_mixer_handle*)image; - nbio->is_finished = false; - nbio->cb = &cb_nbio_audio_mixer_load; - nbio->status = NBIO_STATUS_INIT; + if (system) + user->stream_type = AUDIO_STREAM_TYPE_SYSTEM; + else + user->stream_type = AUDIO_STREAM_TYPE_USER; + + user->slot_selection_type = slot_selection_type; + user->slot_selection_idx = slot_selection_idx; + + nbio->data = (struct audio_mixer_handle*)mixer; + nbio->is_finished = false; + nbio->cb = &cb_nbio_audio_mixer_load; + nbio->status = NBIO_STATUS_INIT; t->state = nbio; t->handler = task_file_load_handler; t->cleanup = task_audio_mixer_load_free; - t->user_data = user_data; + t->user_data = user; task_queue_push(t); @@ -458,6 +536,8 @@ error: nbio_free(nbio->handle); free(nbio); } + if (user) + free(user); if (t) free(t); @@ -467,13 +547,18 @@ error: return false; } -bool task_push_audio_mixer_load(const char *fullpath, retro_task_callback_t cb, void *user_data) +bool task_push_audio_mixer_load( + const char *fullpath, retro_task_callback_t cb, void *user_data, + bool system, + enum audio_mixer_slot_selection_type slot_selection_type, + int slot_selection_idx) { nbio_handle_t *nbio = NULL; - struct audio_mixer_handle *image = NULL; + struct audio_mixer_handle *mixer = NULL; retro_task_t *t = (retro_task_t*)calloc(1, sizeof(*t)); + struct audio_mixer_userdata *user = (struct audio_mixer_userdata*)calloc(1, sizeof(*user)); - if (!t) + if (!t || !user) goto error; nbio = (nbio_handle_t*)calloc(1, sizeof(*nbio)); @@ -483,38 +568,38 @@ bool task_push_audio_mixer_load(const char *fullpath, retro_task_callback_t cb, nbio->path = strdup(fullpath); - image = (struct audio_mixer_handle*)calloc(1, sizeof(*image)); - if (!image) + mixer = (struct audio_mixer_handle*)calloc(1, sizeof(*mixer)); + if (!mixer) goto error; - image->is_finished = false; + mixer->is_finished = false; - strlcpy(image->path, fullpath, sizeof(image->path)); + strlcpy(mixer->path, fullpath, sizeof(mixer->path)); nbio->type = NBIO_TYPE_NONE; - image->type = AUDIO_MIXER_TYPE_NONE; + mixer->type = AUDIO_MIXER_TYPE_NONE; if (strstr(fullpath, file_path_str(FILE_PATH_WAV_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_WAV; + mixer->type = AUDIO_MIXER_TYPE_WAV; nbio->type = NBIO_TYPE_WAV; t->callback = task_audio_mixer_handle_upload_wav; } else if (strstr(fullpath, file_path_str(FILE_PATH_OGG_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_OGG; + mixer->type = AUDIO_MIXER_TYPE_OGG; nbio->type = NBIO_TYPE_OGG; t->callback = task_audio_mixer_handle_upload_ogg; } else if (strstr(fullpath, file_path_str(FILE_PATH_MP3_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_MP3; + mixer->type = AUDIO_MIXER_TYPE_MP3; nbio->type = NBIO_TYPE_MP3; t->callback = task_audio_mixer_handle_upload_mp3; } else if (strstr(fullpath, file_path_str(FILE_PATH_FLAC_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_FLAC; + mixer->type = AUDIO_MIXER_TYPE_FLAC; nbio->type = NBIO_TYPE_FLAC; t->callback = task_audio_mixer_handle_upload_flac; } @@ -522,20 +607,28 @@ bool task_push_audio_mixer_load(const char *fullpath, retro_task_callback_t cb, strstr(fullpath, file_path_str(FILE_PATH_S3M_EXTENSION)) || strstr(fullpath, file_path_str(FILE_PATH_XM_EXTENSION))) { - image->type = AUDIO_MIXER_TYPE_MOD; + mixer->type = AUDIO_MIXER_TYPE_MOD; nbio->type = NBIO_TYPE_MOD; t->callback = task_audio_mixer_handle_upload_mod; } - nbio->data = (struct audio_mixer_handle*)image; + nbio->data = (struct audio_mixer_handle*)mixer; nbio->is_finished = false; nbio->cb = &cb_nbio_audio_mixer_load; nbio->status = NBIO_STATUS_INIT; - t->state = nbio; - t->handler = task_file_load_handler; - t->cleanup = task_audio_mixer_load_free; - t->user_data = user_data; + if (system) + user->stream_type = AUDIO_STREAM_TYPE_SYSTEM; + else + user->stream_type = AUDIO_STREAM_TYPE_USER; + + user->slot_selection_type = slot_selection_type; + user->slot_selection_idx = slot_selection_idx; + + t->state = nbio; + t->handler = task_file_load_handler; + t->cleanup = task_audio_mixer_load_free; + t->user_data = user; task_queue_push(t); @@ -551,6 +644,8 @@ error: nbio_free(nbio->handle); free(nbio); } + if (user) + free(user); if (t) free(t); diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index 00bb990b85..72c494285d 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -303,7 +303,6 @@ static void input_autoconfigure_joypad_add(config_file_t *conf, else input_config_set_device_config_name(params->idx, "N/A"); - input_autoconfigure_joypad_reindex_devices(); } diff --git a/tasks/task_content.c b/tasks/task_content.c index 60e08e11da..3445f69383 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -61,9 +61,10 @@ #ifdef HAVE_MENU #include "../menu/menu_driver.h" -#include "../menu/menu_shader.h" #endif +#include "../menu/menu_shader.h" + #ifdef HAVE_CHEEVOS #include "../cheevos/cheevos.h" #endif @@ -137,6 +138,7 @@ struct content_information_ctx }; static struct string_list *temporary_content = NULL; +static bool _launched_from_cli = true; static bool _content_is_inited = false; static bool core_does_not_need_content = false; static uint32_t content_rom_crc = 0; @@ -152,7 +154,6 @@ static char pending_subsystem_extensions[PATH_MAX_LENGTH]; #endif static char *pending_subsystem_roms[RARCH_MAX_SUBSYSTEM_ROMS]; - static int64_t content_file_read(const char *path, void **buf, int64_t *length) { #ifdef HAVE_COMPRESSION @@ -290,11 +291,8 @@ static bool content_load(content_ctx_info_t *info) content_clear_subsystem(); } - -#ifdef HAVE_MENU - /* TODO/FIXME - can we get rid of this? */ menu_shader_manager_init(); -#endif + command_event(CMD_EVENT_HISTORY_INIT, NULL); command_event(CMD_EVENT_RESUME, NULL); command_event(CMD_EVENT_VIDEO_SET_ASPECT_RATIO, NULL); @@ -832,8 +830,6 @@ static bool content_file_init( return ret; } - -#ifdef HAVE_MENU static void menu_content_environment_get(int *argc, char *argv[], void *args, void *params_data) { @@ -867,7 +863,6 @@ static void menu_content_environment_get(int *argc, char *argv[], path_get(RARCH_PATH_CORE); } -#endif /** * task_load_content: @@ -1115,10 +1110,8 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info) if (!string_is_empty(settings->paths.directory_system)) content_ctx.directory_system = strdup(settings->paths.directory_system); -#ifdef HAVE_MENU if (!content_info->environ_get) content_info->environ_get = menu_content_environment_get; -#endif /* Clear content path */ path_clear(RARCH_PATH_CONTENT); @@ -1308,10 +1301,8 @@ bool task_push_start_current_core(content_ctx_info_t *content_info) if (!string_is_empty(settings->paths.directory_system)) content_ctx.directory_system = strdup(settings->paths.directory_system); -#ifdef HAVE_MENU if (!content_info->environ_get) content_info->environ_get = menu_content_environment_get; -#endif /* Clear content path */ path_clear(RARCH_PATH_CONTENT); @@ -1430,6 +1421,8 @@ bool task_push_load_content_with_new_core_from_menu( content_ctx.name_bps = strdup(global->name.bps); if (!string_is_empty(global->name.ups)) content_ctx.name_ups = strdup(global->name.ups); + + global->name.label[0] = '\0'; } if (!string_is_empty(settings->paths.directory_system)) @@ -1560,10 +1553,8 @@ static bool task_load_content_callback(content_ctx_info_t *content_info, if (!string_is_empty(settings->paths.directory_system)) content_ctx.directory_system = strdup(settings->paths.directory_system); -#ifdef HAVE_MENU if (!content_info->environ_get) content_info->environ_get = menu_content_environment_get; -#endif if (firmware_update_status(&content_ctx)) goto end; @@ -1602,10 +1593,13 @@ end: bool task_push_load_content_with_new_core_from_companion_ui( const char *core_path, const char *fullpath, + const char *label, content_ctx_info_t *content_info, retro_task_callback_t cb, void *user_data) { + global_t *global = global_get_ptr(); + /* Set content path */ path_set(RARCH_PATH_CONTENT, fullpath); @@ -1615,6 +1609,16 @@ bool task_push_load_content_with_new_core_from_companion_ui( command_event(CMD_EVENT_LOAD_CORE, NULL); #endif + _launched_from_cli = false; + + if (global) + { + if (label) + strlcpy(global->name.label, label, sizeof(global->name.label)); + else + global->name.label[0] = '\0'; + } + /* Load content */ if (!task_load_content_callback(content_info, true, false)) return false; @@ -1770,6 +1774,12 @@ void content_clear_subsystem(void) } } +/* Checks if launched from the commandline */ +bool content_launched_from_cli() +{ + return _launched_from_cli; +} + /* Get the current subsystem */ int content_get_subsystem() { @@ -1803,6 +1813,32 @@ void content_set_subsystem(unsigned idx) pending_subsystem_id, pending_subsystem_ident, pending_subsystem_rom_num); } +/* Sets the subsystem by name */ +bool content_set_subsystem_by_name(const char* subsystem_name) +{ + rarch_system_info_t *system = runloop_get_system_info(); + const struct retro_subsystem_info *subsystem; + unsigned i = 0; + + /* Core fully loaded, use the subsystem data */ + if (system->subsystem.data) + subsystem = system->subsystem.data; + /* Core not loaded completely, use the data we peeked on load core */ + else + subsystem = subsystem_data; + + for (i = 0; i < subsystem_current_count; i++, subsystem++) + { + if (string_is_equal(subsystem_name, subsystem->ident)) + { + content_set_subsystem(i); + return true; + } + } + + return false; +} + /* Add a rom to the subsystem rom buffer */ void content_add_subsystem(const char* path) { diff --git a/tasks/task_database.c b/tasks/task_database.c index e7b1fae035..41cce066f2 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -1032,7 +1032,6 @@ static int task_database_iterate_playlist_lutro( return 0; } - static int task_database_iterate_serial_lookup( db_handle_t *_db, database_state_handle_t *db_state, @@ -1311,7 +1310,7 @@ bool task_push_dbscan( const char *content_database, const char *fullpath, bool directory, - bool show_hidden_files, + bool db_dir_show_hidden_files, retro_task_callback_t cb) { retro_task_t *t = (retro_task_t*)calloc(1, sizeof(*t)); @@ -1325,7 +1324,7 @@ bool task_push_dbscan( t->callback = cb; t->title = strdup(msg_hash_to_str(MSG_PREPARING_FOR_CONTENT_SCAN)); - db->show_hidden_files = show_hidden_files; + db->show_hidden_files = db_dir_show_hidden_files; db->is_directory = directory; db->playlist_directory = NULL; db->fullpath = strdup(fullpath); diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index d83cc1d1c7..8b23a74ff8 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -14,7 +14,6 @@ * If not, see . */ - #include #include #include diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index 1f53758d41..86667219b8 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -42,6 +42,7 @@ typedef struct char content_crc[PATH_MAX_LENGTH]; char content_path[PATH_MAX_LENGTH]; char hostname[512]; + char subsystem_name[512]; char core_name[PATH_MAX_LENGTH]; char core_path[PATH_MAX_LENGTH]; char core_extensions[PATH_MAX_LENGTH]; @@ -62,10 +63,32 @@ static void netplay_crc_scan_callback(void *task_data, fflush(stdout); + + if (!string_is_empty(state->subsystem_name) && !string_is_equal(state->subsystem_name, "N/A")) + { + content_ctx_info_t content_info = {0}; + struct string_list *game_list = string_split(state->content_path, "|"); + unsigned i = 0; + + task_push_load_new_core(state->core_path, NULL, + &content_info, CORE_TYPE_PLAIN, NULL, NULL); + content_clear_subsystem(); + if (!content_set_subsystem_by_name(state->subsystem_name)) + RARCH_LOG("[lobby] subsystem not found in implementation\n"); + + for (i = 0; i < game_list->size; i++) + content_add_subsystem(game_list->elems[i].data); + task_push_load_subsystem_with_core_from_menu( + NULL, &content_info, + CORE_TYPE_PLAIN, NULL, NULL); + string_list_free(game_list); + return; + } + #ifdef HAVE_MENU /* regular core with content file */ if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path) - && !state->contentless && !state->current) + && !state->contentless && !state->current) { struct retro_system_info *system = runloop_get_libretro_system_info(); @@ -113,14 +136,13 @@ static void netplay_crc_scan_callback(void *task_data, /* no match found */ else { - RARCH_LOG("Couldn't find a suitable %s\n", + RARCH_LOG("[lobby] couldn't find a suitable %s\n", string_is_empty(state->content_path) ? "content file" : "core"); runloop_msg_queue_push( msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY), 1, 480, true); } - free(state); } @@ -164,9 +186,8 @@ static void get_entry(char *entry, int len, const char *path) { */ static void task_netplay_crc_scan_handler(retro_task_t *task) { - size_t i, j; + size_t i, j, k; char entry[PATH_MAX_LENGTH]; - char *filename_match = NULL; bool have_crc = false; netplay_crc_handle_t *state = (netplay_crc_handle_t*)task->state; @@ -213,7 +234,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) RARCH_LOG("[lobby] current content crc: %s\n", current); if (string_is_equal(current, state->content_crc)) - { + { RARCH_LOG("[lobby] CRC match %s with currently loaded content\n", current); strlcpy(state->content_path, "N/A", sizeof(state->content_path)); state->found = true; @@ -226,58 +247,52 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) } /* now let's do the search */ - for(i = 0; i < state->lpl_list->size; i++) + if (string_is_empty(state->subsystem_name) || string_is_equal(state->subsystem_name, "N/A")) { - playlist_t *playlist = NULL; - unsigned playlist_size = 0; - const char *lpl_path = state->lpl_list->elems[i].data; + for(i = 0; i < state->lpl_list->size; i++) + { + playlist_t *playlist = NULL; + unsigned playlist_size = 0; + const char *lpl_path = state->lpl_list->elems[i].data; - /* skip files without .lpl file extension */ - if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) - continue; + /* skip files without .lpl file extension */ + if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) + continue; - RARCH_LOG("Searching playlist: %s\n", lpl_path); - playlist = playlist_init(lpl_path, 99999); - playlist_size = playlist_get_size(playlist); + RARCH_LOG("[lobby] searching playlist: %s\n", lpl_path); + playlist = playlist_init(lpl_path, 99999); + playlist_size = playlist_get_size(playlist); - for(j = 0; j < playlist_size; j++) - { - const char *playlist_crc32 = NULL; - const char *playlist_path = NULL; + for(j = 0; j < playlist_size; j++) + { + const char *playlist_crc32 = NULL; + const char *playlist_path = NULL; - playlist_get_index(playlist, j, &playlist_path, NULL, NULL, NULL, NULL, &playlist_crc32); + playlist_get_index(playlist, j, &playlist_path, NULL, NULL, NULL, NULL, &playlist_crc32); - if(have_crc && string_is_equal(playlist_crc32, state->content_crc)) - { - RARCH_LOG("[lobby] CRC match %s\n", playlist_crc32); - strlcpy(state->content_path, playlist_path, sizeof(state->content_path)); - state->found = true; - task_set_data(task, state); - finish_task(task, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND)); - string_list_free(state->lpl_list); - free(playlist); - return; - } + if(have_crc && string_is_equal(playlist_crc32, state->content_crc)) + { + RARCH_LOG("[lobby] CRC match %s\n", playlist_crc32); + strlcpy(state->content_path, playlist_path, sizeof(state->content_path)); + state->found = true; + task_set_data(task, state); + finish_task(task, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND)); + string_list_free(state->lpl_list); + playlist_free(playlist); + return; + } - get_entry(entry, sizeof(entry), playlist_path); + get_entry(entry, sizeof(entry), playlist_path); - /* See if the filename is a match. The response depends on whether or not we are doing a CRC - * search. - * - * If we are doing a CRC search, we stow a copy of the filename match in filename_match, which - * we'll use as our match if the CRC search is exhausted without a match. - * - * Otherwise, on match we complete the task and mark it as successful immediately. - */ - if(string_is_empty(filename_match) && - !string_is_empty(entry) && - string_is_equal(entry, state->content_path) && - strstr(state->core_extensions, path_get_extension(playlist_path))) - { - if(have_crc) - filename_match = strdup(playlist_path); - else - { + /* See if the filename is a match. The response depends on whether or not we are doing a CRC + * search. + * Otherwise, on match we complete the task and mark it as successful immediately. + */ + + if(!string_is_empty(entry) && + string_is_equal(entry, state->content_path) && + strstr(state->core_extensions, path_get_extension(playlist_path))) + { RARCH_LOG("[lobby] filename match %s\n", playlist_path); strlcpy(state->content_path, playlist_path, sizeof(state->content_path)); @@ -285,26 +300,88 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) task_set_data(task, state); finish_task(task, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND)); string_list_free(state->lpl_list); - free(playlist); + playlist_free(playlist); return; } + task_set_progress(task, (int)(j / playlist_size * 100.0)); + } + playlist_free(playlist); + } + } + else + { + bool found[100]; + struct string_list *game_list = string_split(state->content_path, "|"); + + for (i = 0; i < game_list->size; i++) + { + found[i] = false; + + for(j = 0; j < state->lpl_list->size && !found[i]; j++) + { + playlist_t *playlist = NULL; + unsigned playlist_size = 0; + const char *lpl_path = state->lpl_list->elems[j].data; + + /* skip files without .lpl file extension */ + if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) + continue; + + RARCH_LOG("[lobby] searching rom %d/%d (%s) in playlist: %s\n", i + 1, game_list->size, game_list->elems[i].data, lpl_path); + playlist = playlist_init(lpl_path, 99999); + playlist_size = playlist_get_size(playlist); + + + for(k = 0; k < playlist_size && !found[i]; k++) + { + const char *playlist_crc32 = NULL; + const char *playlist_path = NULL; + + playlist_get_index(playlist, k, &playlist_path, NULL, NULL, NULL, NULL, &playlist_crc32); + get_entry(entry, sizeof(entry), playlist_path); + + if(!string_is_empty(entry) && + strstr(game_list->elems[i].data, entry) && + strstr(state->core_extensions, path_get_extension(playlist_path))) + { + RARCH_LOG("[lobby] filename match %s\n", playlist_path); + + if (i == 0) + { + state->content_path[0] = '\0'; + strlcpy(state->content_path, playlist_path, sizeof(state->content_path)); + } + else + { + strlcat(state->content_path, "|", sizeof(state->content_path)); + strlcat(state->content_path, playlist_path, sizeof(state->content_path)); + } + found[i] = true; + } + task_set_progress(task, (int)(j / playlist_size * 100.0)); + } + playlist_free(playlist); } - task_set_progress(task, (int)(j / playlist_size * 100.0)); } - free(playlist); - } + for (i = 0; i < game_list->size; i++) + { + state->found = true; + if (found[i] == false) + { + state->found = false; + break; + } + } - if(filename_match != NULL) - { - RARCH_LOG("[lobby] CRC match failed; falling back to filename match %s\n", filename_match); - - strlcpy(state->content_path, filename_match, sizeof(state->content_path)); - state->found = true; - task_set_data(task, state); - finish_task(task, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND)); + if (state->found) + { + RARCH_LOG("[lobby] subsystem matching set found %s\n", state->content_path); + task_set_data(task, state); + finish_task(task, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND)); + } string_list_free(state->lpl_list); - free(filename_match); + string_list_free(game_list); return; } @@ -316,7 +393,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) } bool task_push_netplay_crc_scan(uint32_t crc, char* name, - const char *hostname, const char *core_name) + const char *hostname, const char *core_name, const char *subsystem) { unsigned i; union string_list_elem_attr attr; @@ -331,10 +408,11 @@ bool task_push_netplay_crc_scan(uint32_t crc, char* name, if (!task || !state) goto error; - state->content_crc[0] = '\0'; - state->content_path[0] = '\0'; - state->hostname[0] = '\0'; - state->core_name[0] = '\0'; + state->content_crc[0] = '\0'; + state->content_path[0] = '\0'; + state->hostname[0] = '\0'; + state->core_name[0] = '\0'; + state->subsystem_name[0] = '\0'; attr.i = 0; snprintf(state->content_crc, @@ -345,6 +423,8 @@ bool task_push_netplay_crc_scan(uint32_t crc, char* name, name, sizeof(state->content_path)); strlcpy(state->hostname, hostname, sizeof(state->hostname)); + strlcpy(state->subsystem_name, + subsystem, sizeof(state->subsystem_name)); strlcpy(state->core_name, core_name, sizeof(state->core_name)); diff --git a/tasks/task_patch.c b/tasks/task_patch.c index 469a83e240..5f9b82da12 100644 --- a/tasks/task_patch.c +++ b/tasks/task_patch.c @@ -380,7 +380,6 @@ static enum patch_error ups_apply_patch( while (data.target_offset < data.target_length) ups_target_write(&data, ups_source_read(&data)); - for (i = 0; i < 4; i++) source_read_checksum |= ups_patch_read(&data) << (i * 8); for (i = 0; i < 4; i++) diff --git a/tasks/task_powerstate.c b/tasks/task_powerstate.c index 654a1a11cb..0e0fbbfa2b 100644 --- a/tasks/task_powerstate.c +++ b/tasks/task_powerstate.c @@ -66,8 +66,17 @@ static void task_powerstate_handler(retro_task_t *task) void task_push_get_powerstate(void) { - retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task)); - powerstate_t *state = (powerstate_t*)calloc(1, sizeof(*state)); + retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task)); + powerstate_t *state = NULL; + + if (!task) + return; + state = (powerstate_t*)calloc(1, sizeof(*state)); + if (!state) + { + free(task); + return; + } task->type = TASK_TYPE_NONE; task->state = state; diff --git a/tasks/task_save.c b/tasks/task_save.c index 66bc264055..d79139ad88 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -267,7 +267,6 @@ static void autosave_free(autosave_t *handle) handle->buffer = NULL; } - bool autosave_init(void) { unsigned i; @@ -763,6 +762,10 @@ static void task_load_handler_finished(retro_task_t *task, task_set_error(task, strdup("Task canceled")); task_data = (load_task_data_t*)calloc(1, sizeof(*task_data)); + + if (!task_data) + return; + memcpy(task_data, state, sizeof(*task_data)); task_set_data(task, task_data); @@ -1194,7 +1197,6 @@ bool content_save_state(const char *path, bool save_to_disk, bool autosave) data = get_serialized_data(path, info.size) ; - if (!data) { RARCH_ERR("%s \"%s\".\n", diff --git a/tasks/task_screenshot.c b/tasks/task_screenshot.c index d84167bf00..88f732cc2c 100644 --- a/tasks/task_screenshot.c +++ b/tasks/task_screenshot.c @@ -237,12 +237,20 @@ static bool screenshot_dump( { if (settings->bools.auto_screenshot_filename) { + const char *screenshot_name = NULL; + if (path_is_empty(RARCH_PATH_CONTENT)) - fill_str_dated_filename(shotname, system_info.library_name, - IMG_EXT, sizeof(shotname)); + { + if (string_is_empty(system_info.library_name)) + screenshot_name = "RetroArch"; + else + screenshot_name = system_info.library_name; + } else - fill_str_dated_filename(shotname, path_basename(name_base), - IMG_EXT, sizeof(shotname)); + screenshot_name = path_basename(name_base); + + fill_str_dated_filename(shotname, screenshot_name, + IMG_EXT, sizeof(shotname)); } else snprintf(shotname, sizeof(shotname), diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index dbcf0e2963..3eeaec5a0c 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -29,6 +29,8 @@ #include "../config.h" #endif +#include "../audio/audio_driver.h" + #include "../content.h" #include "../core_type.h" #include "../msg_hash.h" @@ -113,7 +115,7 @@ bool task_push_wifi_scan(retro_task_callback_t cb); bool task_push_netplay_lan_scan(retro_task_callback_t cb); bool task_push_netplay_crc_scan(uint32_t crc, char* name, - const char *hostname, const char *corename); + const char *hostname, const char *corename, const char* subsystem); bool task_push_netplay_lan_scan_rooms(retro_task_callback_t cb); @@ -184,6 +186,7 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info); bool task_push_load_content_with_new_core_from_companion_ui( const char *core_path, const char *fullpath, + const char *label, content_ctx_info_t *content_info, retro_task_callback_t cb, void *user_data); @@ -260,16 +263,21 @@ void task_push_get_powerstate(void); enum frontend_powerstate get_last_powerstate(int *percent); bool task_push_audio_mixer_load_and_play( - const char *fullpath, retro_task_callback_t cb, void *user_data); + const char *fullpath, retro_task_callback_t cb, void *user_data, + bool system, + enum audio_mixer_slot_selection_type slot_selection_type, + int slot_selection_idx); bool task_push_audio_mixer_load( - const char *fullpath, retro_task_callback_t cb, void *user_data); + const char *fullpath, retro_task_callback_t cb, void *user_data, + bool system, + enum audio_mixer_slot_selection_type slot_selection_type, + int slot_selection_idx); void set_save_state_in_background(bool state); extern const char* const input_builtin_autoconfs[]; - RETRO_END_DECLS #endif diff --git a/tools/com-parser/Makefile b/tools/com-parser/Makefile index 71ed3df303..b36e8af407 100644 --- a/tools/com-parser/Makefile +++ b/tools/com-parser/Makefile @@ -5,12 +5,9 @@ GENDEPS = 1 TARGET_ARCH = amd64 OS ?= win32 - OBJ := OBJ += com-parse.o - - EXE_EXT := $(suffix $(wildcard $(MAKE).*)) ifeq ($(compiler),) @@ -102,10 +99,8 @@ else endif endif - INCLUDE_DIRS += -I. -I../../deps/peglib - $(info os : $(OS)) $(info host : $(ARCH)) $(info target : $(TARGET_ARCH)) @@ -121,7 +116,6 @@ all: $(TARGET)$(EXE_EXT) SHELL:=$(SHELL) -o pipefail - ifeq ($(GENDEPS),0) DEPFLAGS := MAKEDEPS := @@ -143,7 +137,6 @@ $(TARGET)$(EXE_EXT): $(OBJ) .$(TARGET).last @touch .$(TARGET).last $(LD) $(OBJ) $(LDFLAGS) $(LIBS) $(LD_OUT)$@ - %.depend: ; %.last: ; .FORCE: diff --git a/tools/com-parser/com-parse.cpp b/tools/com-parser/com-parse.cpp index 49abccc6e8..b0dc1dc825 100644 --- a/tools/com-parser/com-parse.cpp +++ b/tools/com-parser/com-parse.cpp @@ -13,7 +13,6 @@ * If not, see . */ - #include #include #include @@ -26,7 +25,6 @@ using namespace std; template AstBase AstBase::empty = AstBase("", 0, 0, "", string("")); - //bool use_typedefs = false; bool use_typedefs = true; @@ -253,7 +251,6 @@ string get_prefix(const string &type) return get_prefix(type.c_str()); } - string clean_name(const char *name) { string str; @@ -567,7 +564,6 @@ public: return out.str(); } - }; class ComHeader { @@ -747,7 +743,6 @@ basic_ostream<_Elem, _Traits> &operator << (basic_ostream<_Elem, _Traits> &ios, return ios << header.str(); } - int main(int argc, const char **argv) { const char *header_fn = argv[1]; @@ -780,6 +775,5 @@ int main(int argc, const char **argv) out << header; out.close(); - return 0; } diff --git a/tools/com-parser/grammar.txt b/tools/com-parser/grammar.txt index 21cf85f57d..17489e04a3 100644 --- a/tools/com-parser/grammar.txt +++ b/tools/com-parser/grammar.txt @@ -27,4 +27,3 @@ End <- EndOfLine / EndOfFile Indent <- [ \t] ~Space <- [ \t] Comment <- [ \t]*<('/*' (!'*/' .)* '*/' / '//') Line> - diff --git a/tools/ps3/ps3py/crypt.c b/tools/ps3/ps3py/crypt.c index 47241f869a..945004b7d9 100644 --- a/tools/ps3/ps3py/crypt.c +++ b/tools/ps3/ps3py/crypt.c @@ -122,5 +122,3 @@ PyMODINIT_FUNC initpkgcrypt(void) { (void) Py_InitModule("pkgcrypt", cryptMethods); } - - diff --git a/ui/drivers/cocoa/cocoa_common.h b/ui/drivers/cocoa/cocoa_common.h index be2aee7595..d95eb64f14 100644 --- a/ui/drivers/cocoa/cocoa_common.h +++ b/ui/drivers/cocoa/cocoa_common.h @@ -35,7 +35,6 @@ #import #endif - /*********************************************/ /* RAMenuBase */ /* A menu class that displays RAMenuItemBase */ diff --git a/ui/drivers/cocoa/cocoa_common.m b/ui/drivers/cocoa/cocoa_common.m index 428e467835..b8ea66213f 100644 --- a/ui/drivers/cocoa/cocoa_common.m +++ b/ui/drivers/cocoa/cocoa_common.m @@ -680,4 +680,3 @@ location_driver_t location_corelocation = { "corelocation", }; #endif - diff --git a/ui/drivers/cocoa/cocoa_common_metal.h b/ui/drivers/cocoa/cocoa_common_metal.h index 1be147c5b2..2da8cb03c0 100644 --- a/ui/drivers/cocoa/cocoa_common_metal.h +++ b/ui/drivers/cocoa/cocoa_common_metal.h @@ -75,7 +75,6 @@ extern id apple_platform; #import #endif - /*********************************************/ /* RAMenuBase */ /* A menu class that displays RAMenuItemBase */ diff --git a/ui/drivers/cocoa/cocoa_common_metal.m b/ui/drivers/cocoa/cocoa_common_metal.m index 9f4d9d7e57..241ec14744 100644 --- a/ui/drivers/cocoa/cocoa_common_metal.m +++ b/ui/drivers/cocoa/cocoa_common_metal.m @@ -702,4 +702,3 @@ location_driver_t location_corelocation = { "corelocation", }; #endif - diff --git a/ui/drivers/qt/coreinfodialog.cpp b/ui/drivers/qt/coreinfodialog.cpp index 8361bbcab9..a59049cae8 100644 --- a/ui/drivers/qt/coreinfodialog.cpp +++ b/ui/drivers/qt/coreinfodialog.cpp @@ -5,10 +5,15 @@ #include "coreinfodialog.h" #include "../ui_qt.h" -extern "C" -{ +#ifndef CXX_BUILD +extern "C" { +#endif + #include "../../../msg_hash.h" + +#ifndef CXX_BUILD } +#endif CoreInfoDialog::CoreInfoDialog(MainWindow *mainwindow, QWidget *parent) : QDialog(parent) @@ -93,4 +98,3 @@ void CoreInfoDialog::showCoreInfo() show(); } - diff --git a/ui/drivers/qt/coreoptionsdialog.cpp b/ui/drivers/qt/coreoptionsdialog.cpp index 8841cf05e5..83900267c5 100644 --- a/ui/drivers/qt/coreoptionsdialog.cpp +++ b/ui/drivers/qt/coreoptionsdialog.cpp @@ -20,7 +20,10 @@ #include "coreoptionsdialog.h" #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include @@ -30,7 +33,10 @@ extern "C" { #include "../../../paths.h" #include "../../../file_path_special.h" #include "../../../managers/core_option_manager.h" + +#ifndef CXX_BUILD } +#endif CoreOptionsDialog::CoreOptionsDialog(QWidget *parent) : QDialog(parent) @@ -139,7 +145,7 @@ void CoreOptionsDialog::onSaveGameSpecificOptions() } } - if (config_file_write(conf, game_path)) + if (config_file_write(conf, game_path, true)) { runloop_msg_queue_push( msg_hash_to_str(MSG_CORE_OPTIONS_FILE_CREATED_SUCCESSFULLY), diff --git a/ui/drivers/qt/filedropwidget.cpp b/ui/drivers/qt/filedropwidget.cpp index a53b588e7e..2261cfd70a 100644 --- a/ui/drivers/qt/filedropwidget.cpp +++ b/ui/drivers/qt/filedropwidget.cpp @@ -15,13 +15,19 @@ #include "playlistentrydialog.h" #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include "../../../file_path_special.h" #include "../../../configuration.h" + +#ifndef CXX_BUILD } +#endif FileDropWidget::FileDropWidget(QWidget *parent) : - QWidget(parent) + QStackedWidget(parent) { setAcceptDrops(true); } @@ -41,7 +47,12 @@ void FileDropWidget::paintEvent(QPaintEvent *event) void FileDropWidget::keyPressEvent(QKeyEvent *event) { - if (event->key() == Qt::Key_Delete) + if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) + { + event->accept(); + emit enterPressed(); + } + else if (event->key() == Qt::Key_Delete) { event->accept(); emit deletePressed(); @@ -95,9 +106,6 @@ void MainWindow::onFileDropWidgetContextMenuRequested(const QPoint &pos) bool allPlaylist = currentPlaylistIsAll(); bool actionsAdded = false; - if (m_browserAndPlaylistTabWidget->tabText(m_browserAndPlaylistTabWidget->currentIndex()) != msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS)) - return; - menu.reset(new QMenu(this)); if (!specialPlaylist) diff --git a/ui/drivers/qt/filedropwidget.h b/ui/drivers/qt/filedropwidget.h index 9301d948df..83199295ca 100644 --- a/ui/drivers/qt/filedropwidget.h +++ b/ui/drivers/qt/filedropwidget.h @@ -1,20 +1,21 @@ #ifndef FILEDROPWIDGET_H #define FILEDROPWIDGET_H -#include +#include class QDragEnterEvent; class QDropEvent; class QKeyEvent; class QPaintEvent; -class FileDropWidget : public QWidget +class FileDropWidget : public QStackedWidget { Q_OBJECT public: FileDropWidget(QWidget *parent = 0); signals: void filesDropped(QStringList files); + void enterPressed(); void deletePressed(); protected: void dragEnterEvent(QDragEnterEvent *event); diff --git a/ui/drivers/qt/flowlayout.cpp b/ui/drivers/qt/flowlayout.cpp deleted file mode 100644 index b970e10b10..0000000000 --- a/ui/drivers/qt/flowlayout.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* Original work Copyright (C) 2016 The Qt Company Ltd. - * Modified work Copyright (C) 2018 - Brad Parker - */ - -#include - -#include "flowlayout.h" -#include "../ui_qt.h" - -FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing) - : QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing) -{ - setContentsMargins(margin, margin, margin, margin); - - connect(this, SIGNAL(signalAddWidgetDeferred(QPointer)), this, SLOT(onAddWidgetDeferred(QPointer)), Qt::QueuedConnection); -} - -FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing) - : m_hSpace(hSpacing), m_vSpace(vSpacing) -{ - setContentsMargins(margin, margin, margin, margin); -} - -FlowLayout::~FlowLayout() -{ - QLayoutItem *item = NULL; - - while ((item = takeAt(0)) != NULL) - delete item; -} - -void FlowLayout::addItem(QLayoutItem *item) -{ - itemList.append(item); -} - -int FlowLayout::horizontalSpacing() const -{ - if (m_hSpace >= 0) - return m_hSpace; - else - return smartSpacing(QStyle::PM_LayoutHorizontalSpacing); -} - -int FlowLayout::verticalSpacing() const -{ - if (m_vSpace >= 0) - return m_vSpace; - else - return smartSpacing(QStyle::PM_LayoutVerticalSpacing); -} - -int FlowLayout::count() const -{ - return itemList.size(); -} - -QLayoutItem* FlowLayout::itemAt(int index) const -{ - return itemList.value(index); -} - -QLayoutItem* FlowLayout::takeAt(int index) -{ - if (index >= 0 && index < itemList.size()) - return itemList.takeAt(index); - else - return NULL; -} - -Qt::Orientations FlowLayout::expandingDirections() const -{ - return 0; -} - -bool FlowLayout::hasHeightForWidth() const -{ - return true; -} - -int FlowLayout::heightForWidth(int width) const -{ - int height = doLayout(QRect(0, 0, width, 0), true); - return height; -} - -void FlowLayout::setGeometry(const QRect &rect) -{ - QLayout::setGeometry(rect); - doLayout(rect, false); -} - -QSize FlowLayout::sizeHint() const -{ - return minimumSize(); -} - -QSize FlowLayout::minimumSize() const -{ - QSize size; - int i = 0; - - if (itemList.isEmpty()) - return size; - - for (i = 0; i < itemList.count(); i++) - { - const QLayoutItem *item = itemList.at(i); - size = size.expandedTo(item->minimumSize()); - } - - size += QSize(2 * margin(), 2 * margin()); - return size; -} - -int FlowLayout::doLayout(const QRect &rect, bool testOnly) const -{ - QRect effectiveRect; - int left = 0, top = 0, right = 0, bottom = 0; - int x = 0; - int y = 0; - int lineHeight = 0; - int i = 0; - - getContentsMargins(&left, &top, &right, &bottom); - effectiveRect = rect.adjusted(+left, +top, -right, -bottom); - x = effectiveRect.x(); - y = effectiveRect.y(); - - if (itemList.isEmpty()) - return y + lineHeight - rect.y() + bottom; - - for (i = 0; i < itemList.count(); i++) - { - QLayoutItem *item = itemList.at(i); - const QWidget *wid = item->widget(); - int spaceX = horizontalSpacing(); - int spaceY = 0; - int nextX = 0; - - if (spaceX == -1) - spaceX = wid->style()->layoutSpacing( - QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal); - - spaceY = verticalSpacing(); - - if (spaceY == -1) - spaceY = wid->style()->layoutSpacing( - QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical); - - nextX = x + item->sizeHint().width() + spaceX; - - if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) - { - x = effectiveRect.x(); - y = y + lineHeight + spaceY; - nextX = x + item->sizeHint().width() + spaceX; - lineHeight = 0; - } - - if (!testOnly) - item->setGeometry(QRect(QPoint(x, y), item->sizeHint())); - - x = nextX; - lineHeight = qMax(lineHeight, item->sizeHint().height()); - } - - return y + lineHeight - rect.y() + bottom; -} - -int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const -{ - const QObject *parentObj = parent(); - - if (!parentObj) - return -1; - else if (parentObj->isWidgetType()) - { - const QWidget *pw = static_cast(parentObj); - return pw->style()->pixelMetric(pm, NULL, pw); - } - else - return static_cast(parentObj)->spacing(); -} - -void FlowLayout::addWidgetDeferred(QPointer widget) -{ - emit signalAddWidgetDeferred(widget); -} - -void FlowLayout::onAddWidgetDeferred(QPointer widget) -{ - /* widget might have been deleted before we got to it since this uses a queued connection, hence the guarded QPointer */ - if (!widget) - return; - - addWidget(widget); -} diff --git a/ui/drivers/qt/flowlayout.h b/ui/drivers/qt/flowlayout.h deleted file mode 100644 index c9d11e7653..0000000000 --- a/ui/drivers/qt/flowlayout.h +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* Original work Copyright (C) 2016 The Qt Company Ltd. - * Modified work Copyright (C) 2018 - Brad Parker - */ - -/* bparker: Removed C++11 override keyword from original source - * Changed QList to QVector - */ - -#ifndef FLOWLAYOUT_H -#define FLOWLAYOUT_H - -#include -#include -#include - -class ThumbnailWidget; - -class FlowLayout : public QLayout -{ - Q_OBJECT -public: - explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1); - explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); - ~FlowLayout(); - - void addItem(QLayoutItem *item); - int horizontalSpacing() const; - int verticalSpacing() const; - Qt::Orientations expandingDirections() const; - bool hasHeightForWidth() const; - int heightForWidth(int) const; - int count() const; - QLayoutItem* itemAt(int index) const; - QSize minimumSize() const; - void setGeometry(const QRect &rect); - QSize sizeHint() const; - QLayoutItem* takeAt(int index); - void addWidgetDeferred(QPointer widget); - -signals: - void signalAddWidgetDeferred(QPointer widget); - -private slots: - void onAddWidgetDeferred(QPointer widget); - -private: - int doLayout(const QRect &rect, bool testOnly) const; - int smartSpacing(QStyle::PixelMetric pm) const; - - QVector itemList; - int m_hSpace; - int m_vSpace; -}; - -#endif // FLOWLAYOUT_H diff --git a/ui/drivers/qt/gridview.cpp b/ui/drivers/qt/gridview.cpp new file mode 100644 index 0000000000..44abfd8616 --- /dev/null +++ b/ui/drivers/qt/gridview.cpp @@ -0,0 +1,495 @@ +#include +#include + +#include "gridview.h" +#include "../ui_qt.h" + +/* http://www.informit.com/articles/article.aspx?p=1613548 */ + +ThumbnailDelegate::ThumbnailDelegate(const GridItem &gridItem, QObject* parent) : + QStyledItemDelegate(parent), m_style(gridItem) +{ +} +void ThumbnailDelegate::paint(QPainter* painter, const QStyleOptionViewItem &option, const QModelIndex& index) const +{ + QStyleOptionViewItem opt = option; + const QWidget *widget = opt.widget; + QStyle *style = widget->style(); + int padding = m_style.padding; + int textTopMargin = 4; /* Qt seemingly reports -4 the actual line height. */ + int textHeight = painter->fontMetrics().height() + padding + padding; + QRect rect = opt.rect; + QRect adjusted = rect.adjusted(padding, padding, -padding, -textHeight + textTopMargin); + QPixmap pixmap = index.data(PlaylistModel::THUMBNAIL).value(); + + painter->save(); + + initStyleOption(&opt, index); + + /* draw the background */ + style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, widget); + + /* draw the image */ + if (!pixmap.isNull()) + { + QPixmap pixmapScaled = pixmap.scaled(adjusted.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation); + style->drawItemPixmap(painter, adjusted, Qt::AlignHCenter | m_style.thumbnailVerticalAlignmentFlag, pixmapScaled); + } + + /* draw the text */ + if (!opt.text.isEmpty()) + { + QPalette::ColorGroup cg = opt.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; + QRect textRect = QRect(rect.x() + padding, rect.y() + adjusted.height() - textTopMargin + padding, rect.width() - 2 * padding, textHeight); + QString elidedText = painter->fontMetrics().elidedText(opt.text, opt.textElideMode, textRect.width(), Qt::TextShowMnemonic); + + if (cg == QPalette::Normal && !(opt.state & QStyle::State_Active)) + cg = QPalette::Inactive; + + if (opt.state & QStyle::State_Selected) + painter->setPen(opt.palette.color(cg, QPalette::HighlightedText)); + else + painter->setPen(opt.palette.color(cg, QPalette::Text)); + + painter->setFont(opt.font); + painter->drawText(textRect, Qt::AlignCenter, elidedText); + } + + painter->restore(); +} + +GridView::GridView(QWidget *parent) : QAbstractItemView(parent), m_idealHeight(0), m_hashIsDirty(false) +{ + setFocusPolicy(Qt::WheelFocus); + horizontalScrollBar()->setRange(0, 0); + verticalScrollBar()->setRange(0, 0); +} + +void GridView::setModel(QAbstractItemModel *newModel) +{ + if (model()) + disconnect(model(), SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(rowsRemoved(QModelIndex, int, int))); + + QAbstractItemView::setModel(newModel); + + connect(newModel, SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(rowsRemoved(QModelIndex, int, int))); + + m_hashIsDirty = true; +} + +void GridView::setviewMode(ViewMode mode) +{ + m_viewMode = mode; +} + +void GridView::calculateRectsIfNecessary() const +{ + if (!m_hashIsDirty) + return; + + int x = m_spacing; + int y = m_spacing; + int row; + int nextX; + + const int maxWidth = viewport()->width(); + + if (m_size + m_spacing * 2 > maxWidth) + { + m_rectForRow[0] = QRectF(x, y, m_size, m_size); + + for (row = 1; row < model()->rowCount(); ++row) + { + y += m_size + m_spacing; + m_rectForRow[row] = QRectF(x, y, m_size, m_size); + } + } + else + { + switch (m_viewMode) + { + case Anchored: + { + int columns = (maxWidth - m_spacing) / (m_size + m_spacing); + if (columns > 0) + { + const int actualSpacing = (maxWidth - m_spacing - m_size - (columns - 1) * m_size) / columns; + for (row = 0; row < model()->rowCount(); ++row) + { + nextX = x + m_size + actualSpacing; + if (nextX > maxWidth) + { + x = m_spacing; + y += m_size + m_spacing; + nextX = x + m_size + actualSpacing; + } + m_rectForRow[row] = QRectF(x, y, m_size, m_size); + x = nextX; + } + } + break; + } + case Centered: + { + int columns = (maxWidth - m_spacing) / (m_size + m_spacing); + if (columns > 0) + { + const int actualSpacing = (maxWidth - columns * m_size) / (columns + 1); + x = actualSpacing; + for (row = 0; row < model()->rowCount(); ++row) + { + nextX = x + m_size + actualSpacing; + if (nextX > maxWidth) + { + x = actualSpacing; + y += m_size + m_spacing; + nextX = x + m_size + actualSpacing; + } + m_rectForRow[row] = QRectF(x, y, m_size, m_size); + x = nextX; + } + } + break; + } + case Simple: + for (row = 0; row < model()->rowCount(); ++row) + { + nextX = x + m_size + m_spacing; + if (nextX > maxWidth) + { + x = m_spacing; + y += m_size + m_spacing; + nextX = x + m_size + m_spacing; + } + m_rectForRow[row] = QRectF(x, y, m_size, m_size); + x = nextX; + } + break; + } + } + + m_idealHeight = y + m_size + m_spacing; + m_hashIsDirty = false; + viewport()->update(); +} + +QRect GridView::visualRect(const QModelIndex &index) const +{ + QRect rect; + if (index.isValid()) + rect = viewportRectForRow(index.row()).toRect(); + return rect; +} + +QRectF GridView::viewportRectForRow(int row) const +{ + QRectF rect; + calculateRectsIfNecessary(); + rect = m_rectForRow.value(row).toRect(); + if (!rect.isValid()) + return rect; + return QRectF(rect.x() - horizontalScrollBar()->value(), rect.y() - verticalScrollBar()->value(), rect.width(), rect.height()); +} + +void GridView::scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint) +{ + QRect viewRect = viewport()->rect(); + QRect itemRect = visualRect(index); + + if (itemRect.left() < viewRect.left()) + horizontalScrollBar()->setValue(horizontalScrollBar()->value() + itemRect.left() - viewRect.left()); + else if (itemRect.right() > viewRect.right()) + horizontalScrollBar()->setValue(horizontalScrollBar()->value() + qMin(itemRect.right() - viewRect.right(), itemRect.left() - viewRect.left())); + if (itemRect.top() < viewRect.top()) + verticalScrollBar()->setValue(verticalScrollBar()->value() + itemRect.top() - viewRect.top()); + else if (itemRect.bottom() > viewRect.bottom()) + verticalScrollBar()->setValue(verticalScrollBar()->value() + qMin(itemRect.bottom() - viewRect.bottom(), itemRect.top() - viewRect.top())); + viewport()->update(); +} + +/* TODO: Make this more efficient by changing m_rectForRow for another data structure. Look at how Qt's own views do it. */ +QModelIndex GridView::indexAt(const QPoint &point_) const +{ + QPoint point(point_); + QHash::const_iterator i; + point.rx() += horizontalScrollBar()->value(); + point.ry() += verticalScrollBar()->value(); + + calculateRectsIfNecessary(); + + i = m_rectForRow.constBegin(); + + while (i != m_rectForRow.constEnd()) + { + if (i.value().contains(point)) + return model()->index(i.key(), 0, rootIndex()); + i++; + } + return QModelIndex(); +} + +void GridView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles) +{ + m_hashIsDirty = true; + QAbstractItemView::dataChanged(topLeft, bottomRight); +} + +void GridView::refresh() +{ + m_hashIsDirty = true; + calculateRectsIfNecessary(); + updateGeometries(); +} + +void GridView::rowsInserted(const QModelIndex &parent, int start, int end) +{ + QAbstractItemView::rowsInserted(parent, start, end); + refresh(); +} + +void GridView::rowsRemoved(const QModelIndex &parent, int start, int end) +{ + refresh(); +} + +void GridView::setGridSize(const int newSize) +{ + if (newSize != m_size) + { + m_size = newSize; + refresh(); + } +} + +void GridView::resizeEvent(QResizeEvent*) +{ + refresh(); +} + +void GridView::reset() +{ + m_visibleIndexes.clear(); + QAbstractItemView::reset(); + refresh(); +} + +QModelIndex GridView::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers) +{ + QModelIndex index = currentIndex(); + if (index.isValid()) + { + if ((cursorAction == MoveLeft && index.row() > 0) || (cursorAction == MoveRight && index.row() + 1 < model()->rowCount())) + { + const int offset = (cursorAction == MoveLeft ? -1 : 1); + index = model()->index(index.row() + offset, index.column(), index.parent()); + } + else if ((cursorAction == MoveUp && index.row() > 0) || (cursorAction == MoveDown && index.row() + 1 < model()->rowCount())) + { + const int offset = ((m_size + m_spacing) * (cursorAction == MoveUp ? -1 : 1)); + QRect rect = viewportRectForRow(index.row()).toRect(); + QPoint point(rect.center().x(), rect.center().y() + offset); + index = indexAt(point); + } + } + return index; +} + +int GridView::horizontalOffset() const +{ + return horizontalScrollBar()->value(); +} + +int GridView::verticalOffset() const +{ + return verticalScrollBar()->value(); +} + +void GridView::scrollContentsBy(int dx, int dy) +{ + scrollDirtyRegion(dx, dy); + viewport()->scroll(dx, dy); + emit(visibleItemsChangedMaybe()); +} + +/* TODO: Maybe add a way to get the previous/next visible indexes. */ +QVector GridView::visibleIndexes() const { + return m_visibleIndexes; +} + +void GridView::setSelection(const QRect &rect, QFlags flags) +{ + QRect rectangle; + QHash::const_iterator i; + int firstRow = model()->rowCount(); + int lastRow = -1; + + calculateRectsIfNecessary(); + + rectangle = rect.translated(horizontalScrollBar()->value(), verticalScrollBar()->value()).normalized(); + + i = m_rectForRow.constBegin(); + while (i != m_rectForRow.constEnd()) + { + if (i.value().intersects(rectangle)) + { + firstRow = firstRow < i.key() ? firstRow : i.key(); + lastRow = lastRow > i.key() ? lastRow : i.key(); + } + i++; + } + if (firstRow != model()->rowCount() && lastRow != -1) + { + QItemSelection selection(model()->index(firstRow, 0, rootIndex()), model()->index(lastRow, 0, rootIndex())); + selectionModel()->select(selection, flags); + } + else + { + QModelIndex invalid; + QItemSelection selection(invalid, invalid); + selectionModel()->select(selection, flags); + } +} + +QRegion GridView::visualRegionForSelection(const QItemSelection &selection) const +{ + QRegion region; + QItemSelectionRange range; + int i; + + for (i = 0; i < selection.size(); i++) + { + range = selection.at(i); + int row; + for (row = range.top(); row <= range.bottom(); row++) + { + int column; + for (column = range.left(); column < range.right(); column++) + { + QModelIndex index = model()->index(row, column, rootIndex()); + region += visualRect(index); + } + } + } + + return region; +} + +void GridView::paintEvent(QPaintEvent*) +{ + QPainter painter(viewport()); + int row; + + painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); + m_visibleIndexes.clear(); + + for (row = 0; row < model()->rowCount(rootIndex()); ++row) + { + QModelIndex index = model()->index(row, 0, rootIndex()); + QRectF rect = viewportRectForRow(row); + QStyleOptionViewItem option = viewOptions(); + + if (!rect.isValid() || rect.bottom() < 0 || rect.y() > viewport()->height()) + continue; + + m_visibleIndexes.append(index); + option.rect = rect.toRect(); + + if (selectionModel()->isSelected(index)) + option.state |= QStyle::State_Selected; + + if (currentIndex() == index) + option.state |= QStyle::State_HasFocus; + + itemDelegate()->paint(&painter, option, index); + } +} + +void GridView::updateGeometries() +{ + const int RowHeight = m_size + m_spacing; + + QAbstractItemView::updateGeometries(); + + verticalScrollBar()->setSingleStep(RowHeight); + verticalScrollBar()->setPageStep(viewport()->height()); + verticalScrollBar()->setRange(0, qMax(0, m_idealHeight - viewport()->height())); + + horizontalScrollBar()->setPageStep(viewport()->width()); + horizontalScrollBar()->setRange(0, qMax(0, RowHeight - viewport()->width())); + + emit(visibleItemsChangedMaybe()); +} + +QString GridView::getLayout() const +{ + switch (m_viewMode) + { + case Simple: + return "simple"; + case Anchored: + return "anchored"; + case Centered: + default: + return "centered"; + } +} + +void GridView::setLayout(QString layout) +{ + if (layout == "anchored") + m_viewMode = Anchored; + else if (layout == "centered") + m_viewMode = Centered; + else if (layout == "fixed") + m_viewMode = Simple; +} + +int GridView::getSpacing() const +{ + return m_spacing; +} + +void GridView::setSpacing(const int spacing) +{ + m_spacing = spacing; +} + +GridItem::GridItem(QWidget* parent) : QWidget(parent) +, thumbnailVerticalAlignmentFlag(Qt::AlignBottom) +, padding(11) +{ +} + +int GridItem::getPadding() const +{ + return padding; +} + +void GridItem::setPadding(const int value) +{ + padding = value; +} + +QString GridItem::getThumbnailVerticalAlign() const +{ + switch (thumbnailVerticalAlignmentFlag) + { + case Qt::AlignTop: + return "top"; + case Qt::AlignVCenter: + return "center"; + case Qt::AlignBottom: + default: + return "bottom"; + } +} + +void GridItem::setThumbnailVerticalAlign(const QString valign) +{ + if (valign == "top") + thumbnailVerticalAlignmentFlag = Qt::AlignTop; + else if (valign == "center") + thumbnailVerticalAlignmentFlag = Qt::AlignVCenter; + else if (valign == "bottom") + thumbnailVerticalAlignmentFlag = Qt::AlignBottom; +} diff --git a/ui/drivers/qt/gridview.h b/ui/drivers/qt/gridview.h new file mode 100644 index 0000000000..2a14a2247c --- /dev/null +++ b/ui/drivers/qt/gridview.h @@ -0,0 +1,91 @@ +#ifndef GRIDVIEW_H +#define GRIDVIEW_H + +#include +#include + +#define DEFAULT_GRID_ITEM_MARGIN 11 +#define DEFAULT_GRID_ITEM_THUMBNAIL_ALIGNMENT "bottom" +#define DEFAULT_GRID_SPACING 7 +#define DEFAULT_GRID_LAYOUT "centered" + +class GridItem; + +class ThumbnailDelegate : public QStyledItemDelegate +{ + Q_OBJECT + +public: + ThumbnailDelegate(const GridItem &gridItem, QObject* parent = 0); + void paint(QPainter* painter, const QStyleOptionViewItem &option, const QModelIndex& index) const; + +private: + const GridItem &m_style; +}; + +class GridView : public QAbstractItemView +{ + Q_OBJECT + + Q_PROPERTY(QString layout READ getLayout WRITE setLayout DESIGNABLE true SCRIPTABLE true) + Q_PROPERTY(int spacing READ getSpacing WRITE setSpacing DESIGNABLE true SCRIPTABLE true) + +public: + enum ViewMode + { + Simple, + Centered, + Anchored + }; + + GridView(QWidget *parent = 0); + ~GridView() {} + + QModelIndex indexAt(const QPoint &point_) const; + QVector visibleIndexes() const; + QRect visualRect(const QModelIndex &index) const; + void setModel(QAbstractItemModel *model); + void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint); + void setGridSize(const int newSize); + void setviewMode(ViewMode mode); + QString getLayout() const; + void setLayout(QString layout); + int getSpacing() const; + void setSpacing(const int spacing); + +signals: + void visibleItemsChangedMaybe() const; + +protected slots: + void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles = QVector()); + void rowsInserted(const QModelIndex &parent, int start, int end); + void rowsRemoved(const QModelIndex &parent, int start, int end); + void updateGeometries(); + void reset(); + +protected: + QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers); + QRegion visualRegionForSelection(const QItemSelection &selection) const; + bool isIndexHidden(const QModelIndex&) const { return false; } + int horizontalOffset() const; + int verticalOffset() const; + void scrollContentsBy(int dx, int dy); + void setSelection(const QRect &rect, QFlags flags); + void paintEvent(QPaintEvent*); + void resizeEvent(QResizeEvent*); + +private: + QRectF viewportRectForRow(int row) const; + void calculateRectsIfNecessary() const; + void refresh(); + + int m_size = 255; + int m_spacing = DEFAULT_GRID_SPACING; + QVector m_visibleIndexes; + ViewMode m_viewMode = Centered; + mutable int m_idealHeight; + mutable QHash m_rectForRow; + mutable bool m_hashIsDirty; +}; + +#endif diff --git a/ui/drivers/qt/playlistentrydialog.cpp b/ui/drivers/qt/playlistentrydialog.cpp index 4502b14536..7b3a989636 100644 --- a/ui/drivers/qt/playlistentrydialog.cpp +++ b/ui/drivers/qt/playlistentrydialog.cpp @@ -13,10 +13,16 @@ #include "playlistentrydialog.h" #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include "../../../core_info.h" #include "../../../file_path_special.h" + +#ifndef CXX_BUILD } +#endif inline static bool comp_string_lower(const QString &lhs, const QString &rhs) { @@ -289,4 +295,3 @@ void PlaylistEntryDialog::hideDialog() { reject(); } - diff --git a/ui/drivers/qt/playlistthumbnaildownload.cpp b/ui/drivers/qt/playlistthumbnaildownload.cpp index e14558ea9d..6caaf2f9c3 100644 --- a/ui/drivers/qt/playlistthumbnaildownload.cpp +++ b/ui/drivers/qt/playlistthumbnaildownload.cpp @@ -4,7 +4,10 @@ #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include @@ -13,7 +16,10 @@ extern "C" { #include "../../../config.def.h" #include "../../../configuration.h" #include "../../../version.h" + +#ifndef CXX_BUILD } +#endif #define USER_AGENT "RetroArch-WIMP/" PACKAGE_VERSION #define PARTIAL_EXTENSION ".partial" @@ -150,14 +156,14 @@ void MainWindow::onPlaylistThumbnailDownloadFinished() emit showErrorMessageDeferred(QString(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NETWORK_ERROR)) + ": Code " + QString::number(code) + ": " + errorData);*/ } + m_playlistModel->reloadThumbnailPath(m_playlistThumbnailDownloadFile.fileName()); + if (!m_playlistThumbnailDownloadWasCanceled && m_pendingPlaylistThumbnails.count() > 0) { QHash nextThumbnail = m_pendingPlaylistThumbnails.takeAt(0); ViewType viewType = getCurrentViewType(); - if (viewType == VIEW_TYPE_ICONS) - emit gridItemChanged(reply->property("title").toString()); - + updateVisibleItems(); downloadNextPlaylistThumbnail(nextThumbnail.value("db_name"), nextThumbnail.value("label_noext"), nextThumbnail.value("type")); } else @@ -236,7 +242,7 @@ void MainWindow::downloadNextPlaylistThumbnail(QString system, QString title, QS if (!m_playlistThumbnailDownloadFile.open(QIODevice::WriteOnly)) { m_failedThumbnails++; - + RARCH_ERR("[Qt]: Could not open file for writing: %s\n", fileNameData); if (m_pendingPlaylistThumbnails.count() > 0) @@ -290,9 +296,9 @@ void MainWindow::downloadPlaylistThumbnails(QString playlistPath) QString system; QString title; QString type; - QVector > playlistItems = getPlaylistItems(playlistPath); settings_t *settings = config_get_ptr(); int i; + int count; if (!settings || !playlistFile.exists()) return; @@ -302,12 +308,14 @@ void MainWindow::downloadPlaylistThumbnails(QString playlistPath) m_failedThumbnails = 0; m_playlistThumbnailDownloadWasCanceled = false; - if (playlistItems.count() == 0) + count = m_playlistModel->rowCount(); + + if (count == 0) return; - for (i = 0; i < playlistItems.count(); i++) + for (i = 0; i < count; i++) { - const QHash &itemHash = playlistItems.at(i); + const QHash &itemHash = m_playlistModel->index(i, 0).data(PlaylistModel::HASH).value< QHash >(); QHash hash; QHash hash2; QHash hash3; diff --git a/ui/drivers/qt/playlist.cpp b/ui/drivers/qt/qt_playlist.cpp similarity index 85% rename from ui/drivers/qt/playlist.cpp rename to ui/drivers/qt/qt_playlist.cpp index 7217f19f5a..62f87b62ce 100644 --- a/ui/drivers/qt/playlist.cpp +++ b/ui/drivers/qt/qt_playlist.cpp @@ -9,12 +9,16 @@ #include #include #include +#include +#include #include "../ui_qt.h" -#include "flowlayout.h" #include "playlistentrydialog.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include @@ -26,6 +30,216 @@ extern "C" { #include "../../../configuration.h" #include "../../../core_info.h" #include "../../../verbosity.h" + +#ifndef CXX_BUILD +} +#endif + +PlaylistModel::PlaylistModel(QObject *parent) + : QAbstractListModel(parent) +{ + m_imageFormats = QVector::fromList(QImageReader::supportedImageFormats()); + m_fileSanitizerRegex = QRegularExpression("[&*/:`<>?\\|]"); + setThumbnailCacheLimit(500); + connect(this, &PlaylistModel::imageLoaded, this, &PlaylistModel::onImageLoaded); +} + +int PlaylistModel::rowCount(const QModelIndex & /* parent */) const +{ + return m_contents.count(); +} + +int PlaylistModel::columnCount(const QModelIndex & /* parent */) const +{ + return 1; +} + +QVariant PlaylistModel::data(const QModelIndex &index, int role) const +{ + if (index.column() == 0) + { + if (!index.isValid()) + return QVariant(); + + if (index.row() >= m_contents.size() || index.row() < 0) + return QVariant(); + + switch (role) + { + case Qt::DisplayRole: + case Qt::EditRole: + case Qt::ToolTipRole: + return m_contents.at(index.row())["label_noext"]; + case HASH: + return QVariant::fromValue(m_contents.at(index.row())); + case THUMBNAIL: + { + QPixmap *cachedPreview = m_cache.object(getCurrentTypeThumbnailPath(index)); + if (cachedPreview) + return *cachedPreview; + return QVariant(); + } + } + } + return QVariant(); +} + +Qt::ItemFlags PlaylistModel::flags(const QModelIndex &index) const +{ + if (!index.isValid()) + return Qt::ItemIsEnabled; + + return QAbstractListModel::flags(index) | Qt::ItemIsEditable; +} + +bool PlaylistModel::setData(const QModelIndex &index, const QVariant &value, int role) +{ + if (index.isValid() && role == Qt::EditRole) { + QHash hash = m_contents.at(index.row()); + + hash["label"] = value.toString(); + hash["label_noext"] = QFileInfo(value.toString()).completeBaseName(); + + m_contents.replace(index.row(), hash); + emit dataChanged(index, index, { role }); + return true; + } + return false; +} + +QVariant PlaylistModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if (role != Qt::DisplayRole) + return QVariant(); + + if (orientation == Qt::Horizontal) + return msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NAME); + else + return section + 1; +} + +void PlaylistModel::setThumbnailType(const ThumbnailType type) +{ + m_thumbnailType = type; +} + +void PlaylistModel::setThumbnailCacheLimit(int limit) +{ + m_cache.setMaxCost(limit * 1024); +} + +QString PlaylistModel::getThumbnailPath(const QModelIndex &index, QString type) const +{ + QByteArray extension; + QString extensionStr; + + QString thumbnailFileNameNoExt; + int lastIndex = -1; + + const QHash &hash = m_contents.at(index.row()); + lastIndex = hash["path"].lastIndexOf('.'); + + if (lastIndex >= 0) + { + extensionStr = hash["path"].mid(lastIndex + 1); + + if (!extensionStr.isEmpty()) + { + extension = extensionStr.toLower().toUtf8(); + } + } + + if (!extension.isEmpty() && m_imageFormats.contains(extension)) + { + /* use thumbnail widgets to show regular image files */ + return hash["path"]; + } + else + { + thumbnailFileNameNoExt = hash["label_noext"]; + thumbnailFileNameNoExt.replace(m_fileSanitizerRegex, "_"); + return QDir::cleanPath(QString(config_get_ptr()->paths.directory_thumbnails)) + "/" + hash.value("db_name") + "/" + type + "/" + thumbnailFileNameNoExt + ".png"; + } +} + +QString PlaylistModel::getCurrentTypeThumbnailPath(const QModelIndex &index) const +{ + switch (m_thumbnailType) + { + case THUMBNAIL_TYPE_BOXART: + return getThumbnailPath(index, THUMBNAIL_BOXART); + case THUMBNAIL_TYPE_SCREENSHOT: + return getThumbnailPath(index, THUMBNAIL_SCREENSHOT); + case THUMBNAIL_TYPE_TITLE_SCREEN: + return getThumbnailPath(index, THUMBNAIL_TITLE); + default: + return QString(); + } +} + +void PlaylistModel::reloadThumbnail(const QModelIndex &index) +{ + if (index.isValid()) { + reloadThumbnailPath(getCurrentTypeThumbnailPath(index)); + loadThumbnail(index); + } +} + +void PlaylistModel::reloadSystemThumbnails(const QString system) +{ + int i = 0; + QString key; + QString path = QDir::cleanPath(QString(config_get_ptr()->paths.directory_thumbnails)) + "/" + system; + QList keys = m_cache.keys(); + QList pending = m_pendingImages.values(); + + for (i = 0; i < keys.size(); i++) + { + key = keys.at(i); + if (key.startsWith(path)) + m_cache.remove(key); + } + + for (i = 0; i < pending.size(); i++) + { + key = pending.at(i); + if (key.startsWith(path)) + m_pendingImages.remove(key); + } +} + +void PlaylistModel::reloadThumbnailPath(const QString path) +{ + m_cache.remove(path); + m_pendingImages.remove(path); +} + +void PlaylistModel::loadThumbnail(const QModelIndex &index) +{ + QString path = getCurrentTypeThumbnailPath(index); + + if (!m_pendingImages.contains(path) && !m_cache.contains(path)) + { + m_pendingImages.insert(path); + QtConcurrent::run(this, &PlaylistModel::loadImage, index, path); + } +} + +void PlaylistModel::loadImage(const QModelIndex &index, const QString &path) +{ + const QImage image = QImage(path); + if (!image.isNull()) + emit imageLoaded(image, index, path); +} + +void PlaylistModel::onImageLoaded(const QImage image, const QModelIndex &index, const QString &path) +{ + QPixmap *pixmap = new QPixmap(QPixmap::fromImage(image)); + const int cost = pixmap->width() * pixmap->height() * pixmap->depth() / (8 * 1024); + m_cache.insert(path, pixmap, cost); + if (index.isValid()) + emit dataChanged(index, index, { THUMBNAIL }); + m_pendingImages.remove(path); } inline static bool comp_hash_name_key_lower(const QHash &lhs, const QHash &rhs) @@ -38,7 +252,6 @@ inline static bool comp_hash_label_key_lower(const QHash &lhs, return lhs.value("label").toLower() < rhs.value("label").toLower(); } -/* https://stackoverflow.com/questions/7246622/how-to-create-a-slider-with-a-non-linear-scale */ bool MainWindow::addDirectoryFilesToList(QProgressDialog *dialog, QStringList &list, QDir &dir, QStringList &extensions) { PlaylistEntryDialog *playlistDialog = playlistEntryDialog(); @@ -834,9 +1047,6 @@ void MainWindow::reloadPlaylists() getPlaylistFiles(); - /* block this signal because setData() would trigger an infinite loop */ - disconnect(m_listWidget, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(onCurrentListItemDataChanged(QListWidgetItem*))); - m_listWidget->clear(); m_listWidget->setSelectionBehavior(QAbstractItemView::SelectRows); m_listWidget->setSelectionMode(QAbstractItemView::SingleSelection); @@ -968,13 +1178,11 @@ void MainWindow::reloadPlaylists() } } - connect(m_listWidget, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(onCurrentListItemDataChanged(QListWidgetItem*))); } QString MainWindow::getCurrentPlaylistPath() { QListWidgetItem *playlistItem = m_listWidget->currentItem(); - QHash contentHash; QString playlistPath; if (!playlistItem) @@ -1116,151 +1324,15 @@ void MainWindow::getPlaylistFiles() m_playlistFiles = playlistDir.entryList(QDir::NoDotAndDotDot | QDir::Readable | QDir::Files, QDir::Name); } -void MainWindow::addPlaylistItemsToGrid(const QStringList &paths, bool add) -{ - QVector > items; - int i; - - if (paths.isEmpty()) - return; - - for (i = 0; i < paths.size(); i++) - { - int j; - QVector > vec = getPlaylistItems(paths.at(i)); - /* QVector::append() wasn't added until 5.5, so just do it the old fashioned way */ - for (j = 0; j < vec.size(); j++) - { - if (add && m_allPlaylistsGridMaxCount > 0 && items.size() >= m_allPlaylistsGridMaxCount) - goto finish; - - items.append(vec.at(j)); - } - } -finish: - std::sort(items.begin(), items.end(), comp_hash_label_key_lower); - - addPlaylistHashToGrid(items); -} - -void MainWindow::addPlaylistHashToGrid(const QVector > &items) -{ - QScreen *screen = qApp->primaryScreen(); - QSize screenSize = screen->size(); - QListWidgetItem *currentItem = m_listWidget->currentItem(); - settings_t *settings = config_get_ptr(); - int i = 0; - int zoomValue = m_zoomSlider->value(); - - m_gridProgressBar->setMinimum(0); - m_gridProgressBar->setMaximum(qMax(0, items.count() - 1)); - m_gridProgressBar->setValue(0); - - for (i = 0; i < items.count(); i++) - { - const QHash &hash = items.at(i); - QPointer item; - QPointer label; - QString thumbnailFileNameNoExt; - QLabel *newLabel = NULL; - QSize thumbnailWidgetSizeHint(screenSize.width() / 8, screenSize.height() / 8); - QByteArray extension; - QString extensionStr; - QString imagePath; - int lastIndex = -1; - - if (m_listWidget->currentItem() != currentItem) - { - /* user changed the current playlist before we finished loading... abort */ - m_gridProgressWidget->hide(); - break; - } - - item = new GridItem(); - - lastIndex = hash["path"].lastIndexOf('.'); - - if (lastIndex >= 0) - { - extensionStr = hash["path"].mid(lastIndex + 1); - - if (!extensionStr.isEmpty()) - { - extension = extensionStr.toLower().toUtf8(); - } - } - - if (!extension.isEmpty() && m_imageFormats.contains(extension)) - { - /* use thumbnail widgets to show regular image files */ - imagePath = hash["path"]; - } - else - { - thumbnailFileNameNoExt = hash["label_noext"]; - thumbnailFileNameNoExt.replace(m_fileSanitizerRegex, "_"); - imagePath = QString(settings->paths.directory_thumbnails) + "/" + hash.value("db_name") + "/" + THUMBNAIL_BOXART + "/" + thumbnailFileNameNoExt + ".png"; - } - - item->hash = hash; - item->widget = new ThumbnailWidget(); - item->widget->setSizeHint(thumbnailWidgetSizeHint); - item->widget->setFixedSize(item->widget->sizeHint()); - item->widget->setLayout(new QVBoxLayout()); - item->widget->setObjectName("thumbnailWidget"); - item->widget->setProperty("hash", QVariant::fromValue >(hash)); - item->widget->setProperty("image_path", imagePath); - - connect(item->widget, SIGNAL(mouseDoubleClicked()), this, SLOT(onGridItemDoubleClicked())); - connect(item->widget, SIGNAL(mousePressed()), this, SLOT(onGridItemClicked())); - - label = new ThumbnailLabel(item->widget); - label->setObjectName("thumbnailGridLabel"); - - item->label = label; - item->labelText = hash.value("label"); - - newLabel = new QLabel(item->labelText, item->widget); - newLabel->setObjectName("thumbnailQLabel"); - newLabel->setAlignment(Qt::AlignCenter); - newLabel->setToolTip(item->labelText); - - calcGridItemSize(item, zoomValue); - - item->widget->layout()->addWidget(label); - - item->widget->layout()->addWidget(newLabel); - qobject_cast(item->widget->layout())->setStretchFactor(label, 1); - - m_gridLayout->addWidgetDeferred(item->widget); - m_gridItems.append(item); - - loadImageDeferred(item, imagePath); - - if (i % 25 == 0) - { - /* Needed to update progress dialog while doing a lot of stuff on the main thread. */ - qApp->processEvents(); - } - - m_gridProgressBar->setValue(i); - } - - /* If there's only one entry, a min/max/value of all zero would make an indeterminate progress bar that never ends... so just hide it when we are done. */ - if (m_gridProgressBar->value() == m_gridProgressBar->maximum()) - m_gridProgressWidget->hide(); -} - -QVector > MainWindow::getPlaylistItems(QString pathString) +void PlaylistModel::getPlaylistItems(QString path) { QByteArray pathArray; - QVector > items; const char *pathData = NULL; playlist_t *playlist = NULL; unsigned playlistSize = 0; unsigned i = 0; - pathArray.append(pathString); + pathArray.append(path); pathData = pathArray.constData(); playlist = playlist_init(pathData, COLLECTION_SIZE); @@ -1313,58 +1385,67 @@ QVector > MainWindow::getPlaylistItems(QString pathStrin hash["db_name"].remove(file_path_str(FILE_PATH_LPL_EXTENSION)); } - items.append(hash); + m_contents.append(hash); } playlist_free(playlist); playlist = NULL; - - return items; } -void MainWindow::addPlaylistItemsToTable(const QStringList &paths, bool add) +void PlaylistModel::addPlaylistItems(const QStringList &paths, bool add) { - QVector > items; int i; if (paths.isEmpty()) return; + beginResetModel(); + + m_contents.clear(); + for (i = 0; i < paths.size(); i++) { - int j; - QVector > vec = getPlaylistItems(paths.at(i)); - /* QVector::append() wasn't added until 5.5, so just do it the old fashioned way */ - for (j = 0; j < vec.size(); j++) - { - if (add && m_allPlaylistsListMaxCount > 0 && items.size() >= m_allPlaylistsListMaxCount) - goto finish; - - items.append(vec.at(j)); - } + getPlaylistItems(paths.at(i)); } -finish: - addPlaylistHashToTable(items); + + endResetModel(); } -void MainWindow::addPlaylistHashToTable(const QVector > &items) +void PlaylistModel::addDir(QString path, QFlags showHidden) { + QDir dir = path; + QStringList dirList; int i = 0; - int oldRowCount = m_tableWidget->rowCount(); - m_tableWidget->setRowCount(oldRowCount + items.count()); + dirList = dir.entryList(QDir::NoDotAndDotDot | + QDir::Readable | + QDir::Files | + showHidden, + QDir::Name); - for (i = 0; i < items.count(); i++) + if (dirList.count() == 0) + return; + + beginResetModel(); + + m_contents.clear(); + + for (i = 0; i < dirList.count(); i++) { - QTableWidgetItem *labelItem = NULL; - const QHash &hash = items.at(i); + QString fileName = dirList.at(i); + QHash hash; + QString filePath(QDir::toNativeSeparators(dir.absoluteFilePath(fileName))); + QFileInfo fileInfo(filePath); - labelItem = new QTableWidgetItem(hash.value("label")); - labelItem->setData(Qt::UserRole, QVariant::fromValue >(hash)); - labelItem->setFlags(labelItem->flags() | Qt::ItemIsEditable); + hash["path"] = filePath; + hash["label"] = hash["path"]; + hash["label_noext"] = fileInfo.completeBaseName(); + hash["db_name"] = fileInfo.dir().dirName(); - m_tableWidget->setItem(oldRowCount + i, 0, labelItem); + m_contents.append(hash); } + + endResetModel(); } void MainWindow::setAllPlaylistsListMaxCount(int count) @@ -1382,4 +1463,3 @@ void MainWindow::setAllPlaylistsGridMaxCount(int count) m_allPlaylistsGridMaxCount = count; } - diff --git a/ui/drivers/qt/shaderparamsdialog.cpp b/ui/drivers/qt/shaderparamsdialog.cpp index 332fbe64b5..3935fa8521 100644 --- a/ui/drivers/qt/shaderparamsdialog.cpp +++ b/ui/drivers/qt/shaderparamsdialog.cpp @@ -19,7 +19,10 @@ #include "shaderparamsdialog.h" #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include @@ -28,10 +31,11 @@ extern "C" { #include "../../../retroarch.h" #include "../../../paths.h" #include "../../../file_path_special.h" -#ifdef HAVE_MENU #include "../../../menu/menu_shader.h" -#endif + +#ifndef CXX_BUILD } +#endif enum { @@ -169,7 +173,7 @@ void ShaderParamsDialog::clearLayout() void ShaderParamsDialog::getShaders(struct video_shader **menu_shader, struct video_shader **video_shader) { video_shader_ctx_t shader_info = {0}; -#ifdef HAVE_MENU + struct video_shader *shader = menu_shader_get(); if (menu_shader) @@ -195,7 +199,6 @@ void ShaderParamsDialog::getShaders(struct video_shader **menu_shader, struct vi *video_shader = NULL; } } -#endif if (video_shader) { @@ -491,7 +494,6 @@ void ShaderParamsDialog::onShaderPassMoveUpClicked() void ShaderParamsDialog::onShaderLoadPresetClicked() { -#ifdef HAVE_MENU QString path; QString filter; QByteArray pathArray; @@ -541,7 +543,6 @@ void ShaderParamsDialog::onShaderLoadPresetClicked() type = video_shader_parse_type(pathData, RARCH_SHADER_NONE); menu_shader_manager_set_preset(menu_shader, type, pathData); -#endif } void ShaderParamsDialog::onShaderResetPass(int pass) @@ -634,7 +635,6 @@ void ShaderParamsDialog::onShaderResetAllPasses() void ShaderParamsDialog::onShaderAddPassClicked() { -#ifdef HAVE_MENU QString path; QString filter; QByteArray pathArray; @@ -696,12 +696,10 @@ void ShaderParamsDialog::onShaderAddPassClicked() video_shader_resolve_parameters(NULL, menu_shader); command_event(CMD_EVENT_SHADERS_APPLY_CHANGES, NULL); -#endif } void ShaderParamsDialog::onShaderSavePresetAsClicked() { -#ifdef HAVE_MENU settings_t *settings = config_get_ptr(); QString path; QByteArray pathArray; @@ -716,7 +714,6 @@ void ShaderParamsDialog::onShaderSavePresetAsClicked() pathData = pathArray.constData(); saveShaderPreset(pathData, SHADER_PRESET_SAVE_NORMAL); -#endif } void ShaderParamsDialog::saveShaderPreset(const char *path, unsigned action_type) @@ -797,7 +794,6 @@ void ShaderParamsDialog::onShaderSaveGamePresetClicked() void ShaderParamsDialog::onShaderClearAllPassesClicked() { -#ifdef HAVE_MENU struct video_shader *menu_shader = NULL; struct video_shader *video_shader = NULL; @@ -810,12 +806,10 @@ void ShaderParamsDialog::onShaderClearAllPassesClicked() menu_shader_manager_decrement_amount_passes(); onShaderApplyClicked(); -#endif } void ShaderParamsDialog::onShaderRemovePassClicked() { -#ifdef HAVE_MENU int i; QVariant passVariant; QAction *action = qobject_cast(sender()); @@ -851,7 +845,6 @@ void ShaderParamsDialog::onShaderRemovePassClicked() menu_shader_manager_decrement_amount_passes(); onShaderApplyClicked(); -#endif } void ShaderParamsDialog::onShaderApplyClicked() diff --git a/ui/drivers/qt/shaderparamsdialog.h b/ui/drivers/qt/shaderparamsdialog.h index 6397b743ce..06b8844aff 100644 --- a/ui/drivers/qt/shaderparamsdialog.h +++ b/ui/drivers/qt/shaderparamsdialog.h @@ -4,9 +4,15 @@ #include #include +#ifndef CXX_BUILD extern "C" { +#endif + #include "../.././gfx/video_shader_parse.h" + +#ifndef CXX_BUILD } +#endif class QCloseEvent; class QResizeEvent; diff --git a/ui/drivers/qt/thumbnaildownload.cpp b/ui/drivers/qt/thumbnaildownload.cpp index d83c8e186b..3c3222ae06 100644 --- a/ui/drivers/qt/thumbnaildownload.cpp +++ b/ui/drivers/qt/thumbnaildownload.cpp @@ -4,7 +4,10 @@ #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include @@ -13,7 +16,10 @@ extern "C" { #include "../../../config.def.h" #include "../../../configuration.h" #include "../../../version.h" + +#ifndef CXX_BUILD } +#endif #undef USER_AGENT #define USER_AGENT "RetroArch-WIMP/" PACKAGE_VERSION @@ -154,6 +160,8 @@ void MainWindow::onThumbnailDownloadFinished() { RARCH_LOG("[Qt]: Thumbnail download finished successfully.\n"); /* reload thumbnail image */ + m_playlistModel->reloadThumbnailPath(m_thumbnailDownloadFile.fileName()); + updateVisibleItems(); emit itemChanged(); } else diff --git a/ui/drivers/qt/thumbnailpackdownload.cpp b/ui/drivers/qt/thumbnailpackdownload.cpp index ac29d22fe0..cdaf32d203 100644 --- a/ui/drivers/qt/thumbnailpackdownload.cpp +++ b/ui/drivers/qt/thumbnailpackdownload.cpp @@ -4,7 +4,10 @@ #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include @@ -13,7 +16,10 @@ extern "C" { #include "../../../config.def.h" #include "../../../configuration.h" #include "../../../version.h" + +#ifndef CXX_BUILD } +#endif #undef TEMP_EXTENSION #define USER_AGENT "RetroArch-WIMP/" PACKAGE_VERSION @@ -191,7 +197,6 @@ void MainWindow::onThumbnailPackDownloadFinished() reply->disconnect(); reply->close(); - reply->deleteLater(); } void MainWindow::onThumbnailPackDownloadProgress(qint64 bytesReceived, qint64 bytesTotal) @@ -309,6 +314,11 @@ void MainWindow::onThumbnailPackExtractFinished(bool success) emit showInfoMessageDeferred(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_PACK_DOWNLOADED_SUCCESSFULLY)); + QNetworkReply *reply = m_thumbnailPackDownloadReply.data(); + + m_playlistModel->reloadSystemThumbnails(reply->property("system").toString()); + reply->deleteLater(); + updateVisibleItems(); /* reload thumbnail image */ emit itemChanged(); } diff --git a/ui/drivers/qt/ui_qt_application.cpp b/ui/drivers/qt/ui_qt_application.cpp index 0fb8315f69..edd7da8219 100644 --- a/ui/drivers/qt/ui_qt_application.cpp +++ b/ui/drivers/qt/ui_qt_application.cpp @@ -17,7 +17,10 @@ #include #include +#ifndef CXX_BUILD extern "C" { +#endif + #include "../../ui_companion_driver.h" #include "../../../retroarch.h" #include "../../../verbosity.h" @@ -28,7 +31,10 @@ extern "C" { #ifdef Q_OS_UNIX #include #endif + +#ifndef CXX_BUILD } +#endif #include "../ui_qt.h" @@ -174,7 +180,7 @@ static void ui_application_qt_run(void *args) } #ifdef HAVE_MAIN -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(CXX_BUILD) extern "C" #endif int main(int argc, char *argv[]) diff --git a/ui/drivers/qt/ui_qt_load_core_window.cpp b/ui/drivers/qt/ui_qt_load_core_window.cpp index 8179b82570..23d13d1a3f 100644 --- a/ui/drivers/qt/ui_qt_load_core_window.cpp +++ b/ui/drivers/qt/ui_qt_load_core_window.cpp @@ -20,7 +20,10 @@ #include #include +#ifndef CXX_BUILD extern "C" { +#endif + #include "../../../core_info.h" #include "../../../verbosity.h" #include "../../../configuration.h" @@ -31,7 +34,10 @@ extern "C" { #include #include #include -}; + +#ifndef CXX_BUILD +} +#endif #define CORE_NAME_COLUMN 0 #define CORE_VERSION_COLUMN 1 @@ -205,32 +211,36 @@ void LoadCoreWindow::initCoreList(const QStringList &extensionFilters) m_table->setSelectionBehavior(QAbstractItemView::SelectRows); m_table->setSelectionMode(QAbstractItemView::SingleSelection); m_table->setSortingEnabled(false); - m_table->setRowCount(cores->count); m_table->setColumnCount(2); m_table->setHorizontalHeaderLabels(horizontal_header_labels); - for (i = 0; i < cores->count; i++) + if (cores) { - core_info_t *core = core_info_get(cores, i); - QTableWidgetItem *name_item = NULL; - QTableWidgetItem *version_item = new QTableWidgetItem(core->display_version); - QVariantHash hash; - const char *name = core->display_name; + m_table->setRowCount(cores->count); - if (string_is_empty(name)) - name = path_basename(core->path); + for (i = 0; i < cores->count; i++) + { + core_info_t *core = core_info_get(cores, i); + QTableWidgetItem *name_item = NULL; + QTableWidgetItem *version_item = new QTableWidgetItem(core->display_version); + QVariantHash hash; + const char *name = core->display_name; - name_item = new QTableWidgetItem(name); + if (string_is_empty(name)) + name = path_basename(core->path); - hash["path"] = core->path; - hash["extensions"] = QString(core->supported_extensions).split("|"); + name_item = new QTableWidgetItem(name); - name_item->setData(Qt::UserRole, hash); - name_item->setFlags(name_item->flags() & ~Qt::ItemIsEditable); - version_item->setFlags(version_item->flags() & ~Qt::ItemIsEditable); + hash["path"] = core->path; + hash["extensions"] = QString(core->supported_extensions).split("|"); - m_table->setItem(i, CORE_NAME_COLUMN, name_item); - m_table->setItem(i, CORE_VERSION_COLUMN, version_item); + name_item->setData(Qt::UserRole, hash); + name_item->setFlags(name_item->flags() & ~Qt::ItemIsEditable); + version_item->setFlags(version_item->flags() & ~Qt::ItemIsEditable); + + m_table->setItem(i, CORE_NAME_COLUMN, name_item); + m_table->setItem(i, CORE_VERSION_COLUMN, version_item); + } } if (!extensionFilters.isEmpty()) diff --git a/ui/drivers/qt/ui_qt_load_core_window.h b/ui/drivers/qt/ui_qt_load_core_window.h index 924af4f2cf..a50ae58eb0 100644 --- a/ui/drivers/qt/ui_qt_load_core_window.h +++ b/ui/drivers/qt/ui_qt_load_core_window.h @@ -18,9 +18,15 @@ #ifndef _QT_LOAD_CORE_WINDOW_H #define _QT_LOAD_CORE_WINDOW_H +#ifndef CXX_BUILD extern "C" { +#endif + #include + +#ifndef CXX_BUILD } +#endif #include diff --git a/ui/drivers/qt/ui_qt_themes.h b/ui/drivers/qt/ui_qt_themes.h index 803cf8a37a..bae9130899 100644 --- a/ui/drivers/qt/ui_qt_themes.h +++ b/ui/drivers/qt/ui_qt_themes.h @@ -16,6 +16,12 @@ static const QString qt_theme_default_stylesheet = QStringLiteral(R"( background-color:#d4d4d4; border:3px solid %1; } + QFrame#playlistWidget, QFrame#browserWidget, QFrame#logWidget { + padding: 8px; + } + ListWidget { + icon-size: 32px; + } )"); static const QString qt_theme_dark_stylesheet = QStringLiteral(R"( @@ -24,13 +30,17 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"( background-color:rgb(53,53,53); selection-background-color:%1; } - QWidget#playlistWidget, QWidget#browserWidget, QWidget#tableWidget, QWidget#logWidget { + QFrame#playlistWidget, QFrame#browserWidget, QStackedWidget#centralWidget, QFrame#logWidget { + padding: 8px; background-color:rgb(66,66,66); border-top:1px solid rgba(175,175,175,50%); border-left:1px solid rgba(125,125,125,50%); border-right:1px solid rgba(125,125,125,50%); border-bottom:1px solid rgba(25,25,25,75%); } + ListWidget { + icon-size: 32px; + } QTextEdit, LogTextEdit { background-color:rgb(25,25,25); } @@ -313,7 +323,7 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"( padding-left:5px; padding-right:5px; } - QTableWidget { + QTableView { background-color:rgb(25,25,25); alternate-background-color:rgb(40,40,40); } @@ -422,14 +432,21 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"( QSizeGrip { background-color:solid; } - ThumbnailWidget#thumbnailWidget, ThumbnailLabel#thumbnailGridLabel, QLabel#thumbnailQLabel { + GridView::item { background-color:rgb(40,40,40); } - ThumbnailWidget#thumbnailWidgetSelected { - background-color:rgb(40,40,40); + GridView::item:selected { border:3px solid %1; } - QWidget#gridLayoutWidget { + GridView { background-color:rgb(25,25,25); + selection-color: white; + qproperty-layout: "fixed"; + } + GridItem { + qproperty-thumbnailvalign: "center"; + } + QLabel#itemsCountLabel { + padding-left: 5px; } )"); diff --git a/ui/drivers/qt/ui_qt_window.cpp b/ui/drivers/qt/ui_qt_window.cpp index 712137f68d..b6618adec9 100644 --- a/ui/drivers/qt/ui_qt_window.cpp +++ b/ui/drivers/qt/ui_qt_window.cpp @@ -41,7 +41,7 @@ #include "invader_png.h" #include "ui_qt_load_core_window.h" #include "ui_qt_themes.h" -#include "flowlayout.h" +#include "gridview.h" #include "shaderparamsdialog.h" #include "coreoptionsdialog.h" #include "filedropwidget.h" @@ -49,7 +49,10 @@ #include "playlistentrydialog.h" #include "viewoptionsdialog.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include "../../../version.h" #include "../../../verbosity.h" #include "../../../retroarch.h" @@ -76,7 +79,10 @@ extern "C" { #include #include #endif + +#ifndef CXX_BUILD } +#endif #include "../../../AUTHORS.h" @@ -119,13 +125,17 @@ static void scan_finished_handler(void *task_data, void *user_data, const char * { bool dontAsk = false; bool answer = false; + +#ifdef HAVE_MENU menu_ctx_environment_t menu_environ; menu_environ.type = MENU_ENVIRON_RESET_HORIZONTAL_LIST; menu_environ.data = NULL; +#endif (void)task_data; (void)user_data; (void)err; + #ifdef HAVE_MENU menu_driver_ctl(RARCH_MENU_CTL_ENVIRONMENT, &menu_environ); #endif @@ -139,6 +149,7 @@ static void scan_finished_handler(void *task_data, void *user_data, const char * } #endif +/* https://stackoverflow.com/questions/7246622/how-to-create-a-slider-with-a-non-linear-scale */ static double expScale(double inputValue, double midValue, double maxValue) { double returnValue = 0; @@ -152,27 +163,6 @@ static double expScale(double inputValue, double midValue, double maxValue) return returnValue; } -/* https://gist.github.com/andrey-str/0f9c7709cbf0c9c49ef9 */ -static void setElidedText(QLabel *label, QWidget *clipWidget, int padding, const QString &text) -{ - QFontMetrics metrix(label->font()); - int width = clipWidget->width() - padding; - QString clippedText = metrix.elidedText(text, Qt::ElideRight, width); - label->setText(clippedText); -} - -GridItem::GridItem() : - QObject() - ,widget(NULL) - ,label(NULL) - ,hash() - ,image() - ,pixmap() - ,imageWatcher() - ,labelText() -{ -} - TreeView::TreeView(QWidget *parent) : QTreeView(parent) { @@ -192,26 +182,16 @@ void TreeView::selectionChanged(const QItemSelection &selected, const QItemSelec emit itemsSelected(list); } -TableWidget::TableWidget(QWidget *parent) : - QTableWidget(parent) +TableView::TableView(QWidget *parent) : + QTableView(parent) { } -bool TableWidget::isEditorOpen() +bool TableView::isEditorOpen() { return (state() == QAbstractItemView::EditingState); } -void TableWidget::keyPressEvent(QKeyEvent *event) -{ - if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) - emit enterPressed(); - else if (event->key() == Qt::Key_Delete) - emit deletePressed(); - - QTableWidget::keyPressEvent(event); -} - ListWidget::ListWidget(QWidget *parent) : QListWidget(parent) { @@ -273,6 +253,27 @@ void LogTextEdit::appendMessage(const QString& text) verticalScrollBar()->setValue(verticalScrollBar()->maximum()); } +/* only accept indexes from current path. https://www.qtcentre.org/threads/50700-QFileSystemModel-and-QSortFilterProxyModel-don-t-work-well-together */ +bool FileSystemProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const +{ + QModelIndex rootIndex; + + QFileSystemModel *sm = qobject_cast(sourceModel()); + rootIndex = sm->index(sm->rootPath()); + + if (sourceParent == rootIndex) + { + return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent); + } + return true; +} + +void FileSystemProxyModel::sort(int column, Qt::SortOrder order) +{ + /* sort the source (QFileSystemModel to keep directories before files) */ + sourceModel()->sort(column, order); +} + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) ,m_loadCoreWindow(new LoadCoreWindow(this)) @@ -282,8 +283,12 @@ MainWindow::MainWindow(QWidget *parent) : ,m_statusLabel(new QLabel(this)) ,m_dirTree(new TreeView(this)) ,m_dirModel(new QFileSystemModel(m_dirTree)) + ,m_fileModel(new QFileSystemModel(this)) ,m_listWidget(new ListWidget(this)) - ,m_tableWidget(new TableWidget(this)) + ,m_centralWidget(new QStackedWidget(this)) + ,m_tableView(new TableView(this)) + ,m_fileTableView(new QTableView(this)) + ,m_playlistViews(new FileDropWidget(this)) ,m_searchWidget(new QWidget(this)) ,m_searchLineEdit(new QLineEdit(this)) ,m_searchDock(new QDockWidget(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_EDIT_SEARCH), this)) @@ -309,25 +314,20 @@ MainWindow::MainWindow(QWidget *parent) : ,m_coreInfoLabel(new CoreInfoLabel(QString(), this)) ,m_coreInfoWidget(new CoreInfoWidget(m_coreInfoLabel, this)) ,m_logDock(new QDockWidget(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_LOG), this)) - ,m_logWidget(new QWidget(this)) + ,m_logWidget(new QFrame(this)) ,m_logTextEdit(new LogTextEdit(m_logWidget)) - ,m_imageFormats() ,m_historyPlaylistsItem(NULL) ,m_folderIcon() ,m_customThemeString() - ,m_gridLayout(NULL) - ,m_gridWidget(new QWidget(this)) - ,m_gridScrollArea(new QScrollArea(m_gridWidget)) - ,m_gridItems() - ,m_gridLayoutWidget(new FileDropWidget()) + ,m_gridView(new GridView(this)) + ,m_playlistViewsAndFooter(new QWidget(this)) ,m_zoomSlider(NULL) ,m_lastZoomSliderValue(0) - ,m_pendingItemUpdates() ,m_viewType(VIEW_TYPE_LIST) + ,m_thumbnailType(THUMBNAIL_TYPE_BOXART) ,m_gridProgressBar(NULL) ,m_gridProgressWidget(NULL) ,m_currentGridHash() - ,m_lastViewType(m_viewType) ,m_currentGridWidget(NULL) ,m_allPlaylistsListMaxCount(0) ,m_allPlaylistsGridMaxCount(0) @@ -354,15 +354,21 @@ MainWindow::MainWindow(QWidget *parent) : ,m_failedThumbnails(0) ,m_playlistThumbnailDownloadWasCanceled(false) ,m_pendingDirScrollPath() + ,m_thumbnailTimer(new QTimer(this)) + ,m_gridItem(this) + ,m_currentBrowser(BROWSER_TYPE_PLAYLISTS) + ,m_searchRegExp() + ,m_zoomWidget(new QWidget(this)) + ,m_itemsCountLiteral(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_ITEMS_COUNT)) + ,m_itemsCountLabel(new QLabel(this)) { settings_t *settings = config_get_ptr(); QDir playlistDir(settings->paths.directory_playlist); QString configDir = QFileInfo(path_get(RARCH_PATH_CONFIG)).dir().absolutePath(); QToolButton *searchResetButton = NULL; - QWidget *zoomWidget = new QWidget(); QHBoxLayout *zoomLayout = new QHBoxLayout(); - QLabel *zoomLabel = new QLabel(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_ZOOM), zoomWidget); - QPushButton *viewTypePushButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_VIEW), zoomWidget); + QLabel *zoomLabel = new QLabel(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_ZOOM), m_zoomWidget); + QPushButton *viewTypePushButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_VIEW), m_zoomWidget); QMenu *viewTypeMenu = new QMenu(viewTypePushButton); QAction *viewTypeIconsAction = NULL; QAction *viewTypeListAction = NULL; @@ -398,7 +404,7 @@ MainWindow::MainWindow(QWidget *parent) : zoomLabel->setObjectName("zoomLabel"); - m_zoomSlider = new QSlider(Qt::Horizontal, zoomWidget); + m_zoomSlider = new QSlider(Qt::Horizontal, m_zoomWidget); m_zoomSlider->setMinimum(0); m_zoomSlider->setMaximum(100); @@ -407,19 +413,18 @@ MainWindow::MainWindow(QWidget *parent) : m_lastZoomSliderValue = m_zoomSlider->value(); - m_gridWidget->setLayout(new QVBoxLayout()); + m_playlistViewsAndFooter->setLayout(new QVBoxLayout()); - m_gridLayout = new FlowLayout(m_gridLayoutWidget); - m_gridLayoutWidget->setObjectName("gridLayoutWidget"); + m_gridView->setSelectionMode(QAbstractItemView::SingleSelection); + m_gridView->setEditTriggers(QAbstractItemView::NoEditTriggers); - m_gridScrollArea->setAlignment(Qt::AlignCenter); - m_gridScrollArea->setFrameShape(QFrame::NoFrame); - m_gridScrollArea->setWidgetResizable(true); - m_gridScrollArea->setWidget(m_gridLayoutWidget); + m_playlistViews->addWidget(m_gridView); + m_playlistViews->addWidget(m_tableView); + m_centralWidget->setObjectName("centralWidget"); - m_gridWidget->layout()->addWidget(m_gridScrollArea); - m_gridWidget->layout()->setAlignment(Qt::AlignCenter); - m_gridWidget->layout()->setContentsMargins(0, 0, 0, 0); + m_playlistViewsAndFooter->layout()->addWidget(m_playlistViews); + m_playlistViewsAndFooter->layout()->setAlignment(Qt::AlignCenter); + m_playlistViewsAndFooter->layout()->setContentsMargins(0, 0, 0, 0); m_gridProgressWidget->setLayout(gridProgressLayout); gridProgressLayout->setContentsMargins(0, 0, 0, 0); @@ -427,24 +432,62 @@ MainWindow::MainWindow(QWidget *parent) : gridProgressLayout->addWidget(gridProgressLabel); gridProgressLayout->addWidget(m_gridProgressBar); - m_gridWidget->layout()->addWidget(m_gridProgressWidget); + m_playlistViewsAndFooter->layout()->addWidget(m_gridProgressWidget); - zoomWidget->setLayout(zoomLayout); + m_zoomWidget->setLayout(zoomLayout); zoomLayout->setContentsMargins(0, 0, 0, 0); zoomLayout->addWidget(zoomLabel); zoomLayout->addWidget(m_zoomSlider); - zoomLayout->addWidget(viewTypePushButton); + + m_itemsCountLabel->setObjectName("itemsCountLabel"); gridFooterLayout = new QHBoxLayout(); + gridFooterLayout->addWidget(m_itemsCountLabel); gridFooterLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Preferred)); gridFooterLayout->addWidget(m_gridProgressWidget); - gridFooterLayout->addWidget(zoomWidget); + gridFooterLayout->addWidget(m_zoomWidget); + gridFooterLayout->addWidget(viewTypePushButton); - static_cast(m_gridWidget->layout())->addLayout(gridFooterLayout); + static_cast(m_playlistViewsAndFooter->layout())->addLayout(gridFooterLayout); m_gridProgressWidget->hide(); - m_tableWidget->setAlternatingRowColors(true); + m_playlistModel = new PlaylistModel(this); + m_proxyModel = new QSortFilterProxyModel(this); + m_proxyModel->setSourceModel(m_playlistModel); + m_proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); + + m_proxyFileModel = new FileSystemProxyModel(); + m_proxyFileModel->setSourceModel(m_fileModel); + m_proxyFileModel->setSortCaseSensitivity(Qt::CaseInsensitive); + + m_tableView->setAlternatingRowColors(true); + m_tableView->setModel(m_proxyModel); + m_tableView->setSortingEnabled(true); + m_tableView->verticalHeader()->setVisible(false); + m_tableView->setSelectionBehavior(QAbstractItemView::SelectRows); + m_tableView->setSelectionMode(QAbstractItemView::SingleSelection); + m_tableView->setEditTriggers(QAbstractItemView::SelectedClicked | QAbstractItemView::EditKeyPressed); + m_tableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); + m_tableView->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); + m_tableView->horizontalHeader()->setStretchLastSection(true); + m_tableView->setWordWrap(false); + + m_fileTableView->setModel(m_fileModel); + m_fileTableView->sortByColumn(0, Qt::AscendingOrder); + m_fileTableView->setSortingEnabled(true); + m_fileTableView->setAlternatingRowColors(true); + m_fileTableView->verticalHeader()->setVisible(false); + m_fileTableView->setSelectionMode(QAbstractItemView::SingleSelection); + m_fileTableView->setSelectionBehavior(QAbstractItemView::SelectRows); + m_fileTableView->horizontalHeader()->setStretchLastSection(true); + m_fileTableView->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); + m_fileTableView->setWordWrap(false); + + m_gridView->setItemDelegate(new ThumbnailDelegate(m_gridItem, this)); + m_gridView->setModel(m_proxyModel); + + m_gridView->setSelectionModel(m_tableView->selectionModel()); m_logWidget->setObjectName("logWidget"); @@ -482,14 +525,23 @@ MainWindow::MainWindow(QWidget *parent) : QDir::Drives | (m_settings->value("show_hidden_files", true).toBool() ? (QDir::Hidden | QDir::System) : static_cast(0))); + m_fileModel->setFilter(QDir::NoDot | + QDir::AllEntries | + (m_settings->value("show_hidden_files", true).toBool() ? (QDir::Hidden | QDir::System) : static_cast(0))); + #if defined(Q_OS_WIN) m_dirModel->setRootPath(""); + m_fileModel->setRootPath(""); #else m_dirModel->setRootPath("/"); + m_fileModel->setRootPath("/"); #endif m_dirTree->setModel(m_dirModel); m_dirTree->setSelectionMode(QAbstractItemView::SingleSelection); + m_dirTree->header()->setVisible(false); + + m_fileTableView->setModel(m_proxyFileModel); if (m_dirModel->columnCount() > 3) { @@ -501,10 +553,6 @@ MainWindow::MainWindow(QWidget *parent) : m_dirTree->hideColumn(3); } - m_dirTree->setCurrentIndex(m_dirModel->index(settings->paths.directory_menu_content)); - m_dirTree->scrollTo(m_dirTree->currentIndex(), QAbstractItemView::PositionAtTop); - m_dirTree->expand(m_dirTree->currentIndex()); - reloadPlaylists(); m_searchWidget->setLayout(new QHBoxLayout()); @@ -515,6 +563,7 @@ MainWindow::MainWindow(QWidget *parent) : m_searchDock->setProperty("default_area", Qt::LeftDockWidgetArea); m_searchDock->setProperty("menu_text", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SEARCH)); m_searchDock->setWidget(m_searchWidget); + m_searchDock->setFixedHeight(m_searchDock->minimumSizeHint().height()); addDockWidget(static_cast(m_searchDock->property("default_area").toInt()), m_searchDock); @@ -532,6 +581,7 @@ MainWindow::MainWindow(QWidget *parent) : m_logWidget->setLayout(new QVBoxLayout()); m_logWidget->layout()->addWidget(m_logTextEdit); + m_logWidget->layout()->setContentsMargins(0, 0, 0, 0); m_logDock->setObjectName("logDock"); m_logDock->setProperty("default_area", Qt::BottomDockWidgetArea); @@ -549,7 +599,6 @@ MainWindow::MainWindow(QWidget *parent) : m_dirTree->setContextMenuPolicy(Qt::CustomContextMenu); m_listWidget->setContextMenuPolicy(Qt::CustomContextMenu); - m_gridLayoutWidget->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_searchLineEdit, SIGNAL(returnPressed()), this, SLOT(onSearchEnterPressed())); connect(m_searchLineEdit, SIGNAL(textEdited(const QString&)), this, SLOT(onSearchLineEditEdited(const QString&))); @@ -557,10 +606,6 @@ MainWindow::MainWindow(QWidget *parent) : connect(m_loadCoreWindow, SIGNAL(coreLoaded()), this, SLOT(onCoreLoaded())); connect(m_loadCoreWindow, SIGNAL(windowClosed()), this, SLOT(onCoreLoadWindowClosed())); connect(m_listWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(onCurrentListItemChanged(QListWidgetItem*, QListWidgetItem*))); - connect(m_tableWidget, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)), this, SLOT(onCurrentTableItemChanged(QTableWidgetItem*, QTableWidgetItem*))); - connect(m_tableWidget, SIGNAL(itemDoubleClicked(QTableWidgetItem*)), this, SLOT(onContentItemDoubleClicked(QTableWidgetItem*))); - connect(m_tableWidget, SIGNAL(enterPressed()), this, SLOT(onTableWidgetEnterPressed())); - connect(m_tableWidget, SIGNAL(deletePressed()), this, SLOT(onTableWidgetDeletePressed())); connect(m_startCorePushButton, SIGNAL(clicked()), this, SLOT(onStartCoreClicked())); connect(m_coreInfoPushButton, SIGNAL(clicked()), m_coreInfoDialog, SLOT(showCoreInfo())); connect(m_runPushButton, SIGNAL(clicked()), this, SLOT(onRunClicked())); @@ -572,9 +617,12 @@ MainWindow::MainWindow(QWidget *parent) : connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(onZoomValueChanged(int))); connect(viewTypeIconsAction, SIGNAL(triggered()), this, SLOT(onIconViewClicked())); connect(viewTypeListAction, SIGNAL(triggered()), this, SLOT(onListViewClicked())); - connect(m_gridLayoutWidget, SIGNAL(filesDropped(QStringList)), this, SLOT(onPlaylistFilesDropped(QStringList))); - connect(m_gridLayoutWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onFileDropWidgetContextMenuRequested(const QPoint&))); connect(m_dirModel, SIGNAL(directoryLoaded(const QString&)), this, SLOT(onFileSystemDirLoaded(const QString&))); + connect(m_fileModel, SIGNAL(directoryLoaded(const QString&)), this, SLOT(onFileBrowserTableDirLoaded(const QString&))); + + m_dirTree->setCurrentIndex(m_dirModel->index(settings->paths.directory_menu_content)); + m_dirTree->scrollTo(m_dirTree->currentIndex(), QAbstractItemView::PositionAtTop); + m_dirTree->expand(m_dirTree->currentIndex()); /* must use queued connection */ connect(this, SIGNAL(scrollToDownloads(QString)), this, SLOT(onDownloadScroll(QString)), Qt::QueuedConnection); @@ -590,9 +638,24 @@ MainWindow::MainWindow(QWidget *parent) : connect(m_thumbnailPackDownloadProgressDialog, SIGNAL(canceled()), this, SLOT(onThumbnailPackDownloadCanceled())); connect(this, SIGNAL(itemChanged()), this, SLOT(onItemChanged())); - connect(this, SIGNAL(gridItemChanged(QString)), this, SLOT(onGridItemChanged(QString))); connect(this, SIGNAL(gotThumbnailDownload(QString,QString)), this, SLOT(onDownloadThumbnail(QString,QString))); + m_thumbnailTimer->setSingleShot(true); + connect(m_thumbnailTimer, SIGNAL(timeout()), this, SLOT(updateVisibleItems())); + connect(this, SIGNAL(updateThumbnails()), this, SLOT(updateVisibleItems())); + + /* TODO: Handle scroll and resize differently. */ + connect(m_gridView, SIGNAL(visibleItemsChangedMaybe()), this, SLOT(startTimer())); + + connect(m_tableView->selectionModel(), SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(onCurrentItemChanged(const QModelIndex&))); + connect(m_fileTableView->selectionModel(), SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(onCurrentFileChanged(const QModelIndex&))); + + connect(m_gridView, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(onContentItemDoubleClicked(const QModelIndex&))); + connect(m_tableView, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(onContentItemDoubleClicked(const QModelIndex&))); + connect(m_fileTableView, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(onFileDoubleClicked(const QModelIndex&))); + + connect(m_playlistModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector&)), this, SLOT(onCurrentTableItemDataChanged(const QModelIndex&, const QModelIndex&, const QVector&))); + /* make sure these use an auto connection so it will be queued if called from a different thread (some facilities in RA log messages from other threads) */ connect(this, SIGNAL(gotLogMessage(const QString&)), this, SLOT(onGotLogMessage(const QString&)), Qt::AutoConnection); connect(this, SIGNAL(gotStatusMessage(QString,unsigned,unsigned,bool)), this, SLOT(onGotStatusMessage(QString,unsigned,unsigned,bool)), Qt::AutoConnection); @@ -651,8 +714,38 @@ MainWindow::~MainWindow() delete m_thumbnailPixmap2; if (m_thumbnailPixmap3) delete m_thumbnailPixmap3; +} - removeGridItems(); +void MainWindow::startTimer() { + if (m_thumbnailTimer->isActive()) + { + m_thumbnailTimer->stop(); + m_thumbnailTimer->start(50); + } + else + { + m_thumbnailTimer->start(50); + } +} + +void MainWindow::updateVisibleItems() { + if (m_currentBrowser == BROWSER_TYPE_PLAYLISTS && m_viewType == VIEW_TYPE_ICONS) + { + QVector indexes = m_gridView->visibleIndexes(); + int i; + for (i = 0; i < indexes.size(); i++) + { + m_playlistModel->loadThumbnail(m_proxyModel->mapToSource(indexes.at(i))); + } + } +} + +void MainWindow::setThumbnailCacheLimit(int count) +{ + if (count < 1) + count = 0; + + m_playlistModel->setThumbnailCacheLimit(count); } void MainWindow::onFileSystemDirLoaded(const QString &path) @@ -668,6 +761,15 @@ void MainWindow::onFileSystemDirLoaded(const QString &path) } } +/* workaround for columns being resized */ +void MainWindow::onFileBrowserTableDirLoaded(const QString &path) +{ + if (path.isEmpty()) + return; + + m_fileTableView->horizontalHeader()->restoreState(m_fileTableHeaderState); +} + QVector > MainWindow::getPlaylists() { QVector > playlists; @@ -695,44 +797,11 @@ QVector > MainWindow::getPlaylists() return playlists; } -void MainWindow::onGridItemChanged(QString title) -{ - int i; - - for (i = 0; i < m_gridItems.count(); i++) - { - const QPointer &item = m_gridItems.at(i); - const QHash &hash = item->hash; - - if (hash.value("label_noext") == title) - { - loadImageDeferred(item.data(), item->widget->property("image_path").toString()); - break; - } - } -} - void MainWindow::onItemChanged() { - ViewType viewType = getCurrentViewType(); - - currentItemChanged(getCurrentContentHash()); - - if (viewType == VIEW_TYPE_ICONS) - { - int i; - - for (i = 0; i < m_gridItems.count(); i++) - { - const QPointer &item = m_gridItems.at(i); - - if (item->widget == m_currentGridWidget) - { - loadImageDeferred(item.data(), m_currentGridWidget->property("image_path").toString()); - break; - } - } - } + QModelIndex index = getCurrentContentIndex(); + m_playlistModel->reloadThumbnail(index); + onCurrentItemChanged(index); } QString MainWindow::getSpecialPlaylistPath(SpecialPlaylist playlist) @@ -746,95 +815,38 @@ QString MainWindow::getSpecialPlaylistPath(SpecialPlaylist playlist) } } -double MainWindow::lerp(double x, double y, double a, double b, double d) { - return a + (b - a) * ((double)(d - x) / (double)(y - x)); -} - -void MainWindow::onGridItemClicked(ThumbnailWidget *widget) +double MainWindow::lerp(double x, double y, double a, double b, double d) { - QHash hash; - ThumbnailWidget *w = static_cast(sender()); - - if (!w) - { - if (widget) - w = widget; - else - return; - } - - if (m_currentGridWidget) - { - m_currentGridWidget->setObjectName("thumbnailWidget"); - m_currentGridWidget->style()->unpolish(m_currentGridWidget); - m_currentGridWidget->style()->polish(m_currentGridWidget); - } - - hash = w->property("hash").value >(); - w->setObjectName("thumbnailWidgetSelected"); - w->style()->unpolish(w); - w->style()->polish(w); - - m_currentGridWidget = w; - m_currentGridHash = hash; - - currentItemChanged(hash); -} - -void MainWindow::onGridItemDoubleClicked() -{ - QHash hash; - ThumbnailWidget *w = static_cast(sender()); - - if (!w) - return; - - hash = w->property("hash").value >(); - - loadContent(hash); + return a + (b - a) * ((double)(d - x) / (double)(y - x)); } void MainWindow::onIconViewClicked() { setCurrentViewType(VIEW_TYPE_ICONS); - onCurrentListItemChanged(m_listWidget->currentItem(), NULL); } void MainWindow::onListViewClicked() { setCurrentViewType(VIEW_TYPE_LIST); - onCurrentListItemChanged(m_listWidget->currentItem(), NULL); } -void MainWindow::calcGridItemSize(GridItem *item, int zoomValue) +void MainWindow::setIconViewZoom(int zoomValue) +{ + m_zoomSlider->setValue(zoomValue); +} + +void MainWindow::onZoomValueChanged(int zoomValue) { int newSize = 0; - QLabel *label = NULL; if (zoomValue < 50) newSize = expScale(lerp(0, 49, 25, 49, zoomValue) / 50.0, 102, 256); else newSize = expScale(zoomValue / 100.0, 256, 1024); - item->widget->setFixedSize(QSize(newSize, newSize)); + m_gridView->setGridSize(newSize); - label = item->widget->findChild("thumbnailQLabel"); - - if (label) - setElidedText(label, item->widget, item->widget->layout()->contentsMargins().left() + item->widget->layout()->spacing() + 2, item->labelText); -} - -void MainWindow::onZoomValueChanged(int value) -{ - int i; - - for (i = 0; i < m_gridItems.count(); i++) - { - GridItem *item = m_gridItems.at(i); - calcGridItemSize(item, value); - } - - m_lastZoomSliderValue = value; + m_lastZoomSliderValue = zoomValue; } void MainWindow::showWelcomeScreen() @@ -1053,8 +1065,8 @@ void MainWindow::onGotStatusMessage(QString msg, unsigned priority, unsigned dur Q_UNUSED(priority) - if (msg.isEmpty()) - return; + if (msg.isEmpty()) + return; if (!status) return; @@ -1212,6 +1224,8 @@ void MainWindow::setTheme(Theme theme) { m_currentTheme = theme; + setDefaultCustomProperties(); + switch(theme) { case THEME_SYSTEM_DEFAULT: @@ -1237,6 +1251,21 @@ void MainWindow::setTheme(Theme theme) } } +void MainWindow::setDefaultCustomProperties() +{ + m_gridView->setLayout(QString(DEFAULT_GRID_LAYOUT)); + m_gridView->setSpacing(DEFAULT_GRID_SPACING); + m_gridItem.setThumbnailVerticalAlign(QString(DEFAULT_GRID_ITEM_THUMBNAIL_ALIGNMENT)); + m_gridItem.setPadding(DEFAULT_GRID_ITEM_MARGIN); +} + +void MainWindow::changeThumbnailType(ThumbnailType type) +{ + m_playlistModel->setThumbnailType(type); + updateVisibleItems(); + m_gridView->viewport()->update(); +} + QVector > MainWindow::getCoreInfo() { QVector > infoList; @@ -1543,68 +1572,37 @@ void MainWindow::onTreeViewItemsSelected(QModelIndexList selectedIndexes) selectBrowserDir(dir); } +void MainWindow::onFileDoubleClicked(const QModelIndex &proxyIndex) +{ + const QModelIndex index = m_proxyFileModel->mapToSource(proxyIndex); + + if (m_fileModel->isDir(index)) + m_dirTree->setCurrentIndex(m_dirModel->index(m_fileModel->filePath(index))); + else + loadContent(getFileContentHash(index)); +} + void MainWindow::selectBrowserDir(QString path) { - QStringList horizontal_header_labels; - QDir dir = path; - QStringList dirList; - int i = 0; - - horizontal_header_labels << msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NAME); - - /* block this signal because setData() called in addPlaylistHashToTable() would trigger an infinite loop */ - disconnect(m_tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(onCurrentTableItemDataChanged(QTableWidgetItem*))); - - m_tableWidget->clear(); - m_tableWidget->setColumnCount(0); - m_tableWidget->setRowCount(0); - m_tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); - m_tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); - m_tableWidget->setSortingEnabled(false); - m_tableWidget->setColumnCount(1); - m_tableWidget->setRowCount(0); - m_tableWidget->setHorizontalHeaderLabels(horizontal_header_labels); - m_tableWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_tableWidget->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); - - dirList = dir.entryList(QDir::NoDotAndDotDot | - QDir::Readable | - QDir::Files | - (m_settings->value("show_hidden_files", true).toBool() ? (QDir::Hidden | QDir::System) : static_cast(0)), - QDir::Name); - - if (dirList.count() == 0) - return; - - m_tableWidget->setRowCount(dirList.count()); - - for (i = 0; i < dirList.count(); i++) + if (!path.isEmpty()) { - QString fileName = dirList.at(i); - QTableWidgetItem *item = new QTableWidgetItem(fileName); - QHash hash; - QString filePath(QDir::toNativeSeparators(dir.absoluteFilePath(fileName))); - QFileInfo fileInfo(filePath); + QModelIndex sourceIndex = m_fileModel->setRootPath(path); + QModelIndex proxyIndex = m_proxyFileModel->mapFromSource(sourceIndex); + m_fileTableHeaderState = m_fileTableView->horizontalHeader()->saveState(); - hash["path"] = filePath; - hash["label"] = hash["path"]; - hash["label_noext"] = fileInfo.completeBaseName(); - hash["db_name"] = fileInfo.dir().dirName(); - - item->setData(Qt::UserRole, QVariant::fromValue >(hash)); - item->setFlags(item->flags() & ~Qt::ItemIsEditable); - - m_tableWidget->setItem(i, 0, item); + if (proxyIndex.isValid()) + { + m_fileTableView->setRootIndex(proxyIndex); + } + else + { + /* the directory is filtered out. Remove the filter for a moment. FIXME find a way to not have to do this (not filtering dirs is one). */ + m_proxyFileModel->setFilterRegExp(QRegExp()); + m_fileTableView->setRootIndex(m_proxyFileModel->mapFromSource(sourceIndex)); + m_proxyFileModel->setFilterRegExp(m_searchRegExp); + } } - - m_tableWidget->setSortingEnabled(true); - m_tableWidget->resizeColumnsToContents(); - m_tableWidget->sortByColumn(0, Qt::AscendingOrder); - m_tableWidget->selectRow(0); - - onSearchEnterPressed(); - - connect(m_tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(onCurrentTableItemDataChanged(QTableWidgetItem*))); + setCoreActions(); } QTabWidget* MainWindow::browserAndPlaylistTabWidget() @@ -1612,45 +1610,53 @@ QTabWidget* MainWindow::browserAndPlaylistTabWidget() return m_browserAndPlaylistTabWidget; } -void MainWindow::onTableWidgetEnterPressed() +void MainWindow::onDropWidgetEnterPressed() { #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) /* entry is being renamed, ignore this enter press */ - if (m_tableWidget->isPersistentEditorOpen(m_tableWidget->currentIndex())) + if (m_tableView->isPersistentEditorOpen(m_tableView->currentIndex())) #else /* we can only check if any editor at all is open */ - if (m_tableWidget->isEditorOpen()) + if (m_tableView->isEditorOpen()) #endif return; onRunClicked(); } -void MainWindow::onTableWidgetDeletePressed() +QModelIndex MainWindow::getCurrentContentIndex() { - deleteCurrentPlaylistItem(); + if (m_viewType == VIEW_TYPE_LIST) + { + return m_tableView->currentIndex(); + } + else if (m_viewType == VIEW_TYPE_ICONS) + { + return m_gridView->currentIndex(); + } + return QModelIndex(); } QHash MainWindow::getCurrentContentHash() { - QTableWidgetItem *contentItem = m_tableWidget->currentItem(); - QHash contentHash; - ViewType viewType = getCurrentViewType(); - - if (viewType == VIEW_TYPE_LIST) - { - if (!contentItem) - return contentHash; - - contentHash = contentItem->data(Qt::UserRole).value >(); - } - else if (viewType == VIEW_TYPE_ICONS) - contentHash = m_currentGridHash; - - return contentHash; + return getCurrentContentIndex().data(PlaylistModel::HASH).value >(); } -void MainWindow::onContentItemDoubleClicked(QTableWidgetItem*) +QHash MainWindow::getFileContentHash(const QModelIndex &index) { + QFileInfo fileInfo = m_fileModel->fileInfo(index); + QHash hash; + + hash["path"] = m_fileModel->filePath(index);; + hash["label"] = hash["path"]; + hash["label_noext"] = fileInfo.completeBaseName(); + hash["db_name"] = fileInfo.dir().dirName(); + + return hash; +} + +void MainWindow::onContentItemDoubleClicked(const QModelIndex &index) +{ + Q_UNUSED(index); onRunClicked(); } @@ -1677,13 +1683,12 @@ QHash MainWindow::getSelectedCore() CoreSelection coreSelection = static_cast(coreMap.value("core_selection").toInt()); QHash coreHash; QHash contentHash; - QTableWidgetItem *contentItem = m_tableWidget->currentItem(); ViewType viewType = getCurrentViewType(); - if (viewType == VIEW_TYPE_LIST && contentItem) - contentHash = contentItem->data(Qt::UserRole).value >(); + if (viewType == VIEW_TYPE_LIST) + contentHash = m_tableView->currentIndex().data(PlaylistModel::HASH).value >(); else if (viewType == VIEW_TYPE_ICONS) - contentHash = m_currentGridHash; + contentHash = m_gridView->currentIndex().data(PlaylistModel::HASH).value >(); else return coreHash; @@ -1747,7 +1752,6 @@ label_noext - the display name of the content that is guaranteed not to contain */ void MainWindow::loadContent(const QHash &contentHash) { -#ifdef HAVE_MENU content_ctx_info_t content_info; QByteArray corePathArray; QByteArray contentPathArray; @@ -1861,48 +1865,43 @@ void MainWindow::loadContent(const QHash &contentHash) content_info.args = NULL; content_info.environ_get = NULL; +#ifdef HAVE_MENU menu_navigation_set_selection(0); +#endif + command_event(CMD_EVENT_UNLOAD_CORE, NULL); - if (!task_push_load_content_from_playlist_from_menu( - corePath, contentPath, contentLabel, - &content_info, - NULL, NULL)) + if (!task_push_load_content_with_new_core_from_companion_ui( + corePath, contentPath, contentLabel, &content_info, + NULL, NULL)) { QMessageBox::critical(this, msg_hash_to_str(MSG_ERROR), msg_hash_to_str(MSG_FAILED_TO_LOAD_CONTENT)); return; } +#ifdef HAVE_MENU menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL); #endif } void MainWindow::onRunClicked() { -#ifdef HAVE_MENU - QTableWidgetItem *item = m_tableWidget->currentItem(); - ViewType viewType = getCurrentViewType(); QHash contentHash; - - if (viewType == VIEW_TYPE_LIST) + + switch (m_currentBrowser) { - if (!item) - return; - - contentHash = item->data(Qt::UserRole).value >(); + case BROWSER_TYPE_FILES: + contentHash = getFileContentHash(m_proxyFileModel->mapToSource(m_fileTableView->currentIndex())); + break; + case BROWSER_TYPE_PLAYLISTS: + contentHash = getCurrentContentHash(); + break; } - else if (viewType == VIEW_TYPE_ICONS) - { - contentHash = m_currentGridHash; - - if (contentHash.isEmpty()) - return; - } - else + + if (contentHash.isEmpty()) return; - + loadContent(contentHash); -#endif } bool MainWindow::isContentLessCore() @@ -1932,10 +1931,10 @@ ViewOptionsDialog* MainWindow::viewOptionsDialog() void MainWindow::setCoreActions() { - QTableWidgetItem *currentContentItem = m_tableWidget->currentItem(); QListWidgetItem *currentPlaylistItem = m_listWidget->currentItem(); ViewType viewType = getCurrentViewType(); - QHash hash; + QHash hash = getCurrentContentHash(); + QString currentPlaylistFileName = QString(); m_launchWithComboBox->clear(); @@ -1953,12 +1952,7 @@ void MainWindow::setCoreActions() m_launchWithComboBox->addItem(m_currentCore, QVariant::fromValue(comboBoxMap)); } - if (viewType == VIEW_TYPE_LIST && currentContentItem) - hash = currentContentItem->data(Qt::UserRole).value >(); - else if (viewType == VIEW_TYPE_ICONS) - hash = m_currentGridHash; - - if (m_browserAndPlaylistTabWidget->tabText(m_browserAndPlaylistTabWidget->currentIndex()) == msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS)) + if (m_currentBrowser == BROWSER_TYPE_PLAYLISTS) { if (!hash.isEmpty()) { @@ -2004,7 +1998,17 @@ void MainWindow::setCoreActions() } } - if (!hash["db_name"].isEmpty()) + switch(m_currentBrowser) + { + case BROWSER_TYPE_PLAYLISTS: + currentPlaylistFileName = hash["db_name"]; + break; + case BROWSER_TYPE_FILES: + currentPlaylistFileName = m_fileModel->rootDirectory().dirName(); + break; + } + + if (!currentPlaylistFileName.isEmpty()) { QVector > defaultCores = getPlaylistDefaultCores(); int i = 0; @@ -2039,7 +2043,6 @@ void MainWindow::setCoreActions() { QString playlist = defaultCores.at(i)["playlist_filename"]; QString core = defaultCores.at(i)["core_path"]; - QString currentPlaylistFileName = hash["db_name"]; playlist.remove(file_path_str(FILE_PATH_LPL_EXTENSION)); @@ -2050,35 +2053,38 @@ void MainWindow::setCoreActions() core_info_get_list(&coreInfoList); - for (j = 0; j < coreInfoList->count; j++) + if (coreInfoList) { - const core_info_t *info = &coreInfoList->list[j]; - - if (core == info->path) + for (j = 0; j < coreInfoList->count; j++) { - if (m_launchWithComboBox->findText(info->core_name) == -1) + const core_info_t *info = &coreInfoList->list[j]; + + if (core == info->path) { - int i = 0; - bool found_existing = false; - - for (i = 0; i < m_launchWithComboBox->count(); i++) + if (m_launchWithComboBox->findText(info->core_name) == -1) { - QVariantMap map = m_launchWithComboBox->itemData(i, Qt::UserRole).toMap(); + int i = 0; + bool found_existing = false; - if (map.value("core_path").toString() == info->path || map.value("core_name").toString() == info->core_name) + for (i = 0; i < m_launchWithComboBox->count(); i++) { - found_existing = true; - break; - } - } + QVariantMap map = m_launchWithComboBox->itemData(i, Qt::UserRole).toMap(); - if (!found_existing) - { - QVariantMap comboBoxMap; - comboBoxMap["core_name"] = info->core_name; - comboBoxMap["core_path"] = info->path; - comboBoxMap["core_selection"] = CORE_SELECTION_PLAYLIST_DEFAULT; - m_launchWithComboBox->addItem(info->core_name, QVariant::fromValue(comboBoxMap)); + if (map.value("core_path").toString() == info->path || map.value("core_name").toString() == info->core_name) + { + found_existing = true; + break; + } + } + + if (!found_existing) + { + QVariantMap comboBoxMap; + comboBoxMap["core_name"] = info->core_name; + comboBoxMap["core_path"] = info->path; + comboBoxMap["core_selection"] = CORE_SELECTION_PLAYLIST_DEFAULT; + m_launchWithComboBox->addItem(info->core_name, QVariant::fromValue(comboBoxMap)); + } } } } @@ -2104,43 +2110,25 @@ void MainWindow::setCoreActions() void MainWindow::onTabWidgetIndexChanged(int index) { - Q_UNUSED(index) - - if (m_browserAndPlaylistTabWidget->tabText(m_browserAndPlaylistTabWidget->currentIndex()) == msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER)) + if (m_browserAndPlaylistTabWidget->tabText(index) == msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER)) { - QModelIndex index = m_dirTree->currentIndex(); + m_currentBrowser = BROWSER_TYPE_FILES; - /* force list view for file browser, will set it back to whatever the user had when switching back to playlist tab */ - setCurrentViewType(VIEW_TYPE_LIST); + m_centralWidget->setCurrentWidget(m_fileTableView); - m_tableWidget->clear(); - m_tableWidget->setColumnCount(0); - m_tableWidget->setRowCount(0); - - if (index.isValid()) - { - m_dirTree->clearSelection(); - m_dirTree->setCurrentIndex(index); - } + onCurrentFileChanged(m_fileTableView->currentIndex()); } - else if (m_browserAndPlaylistTabWidget->tabText(m_browserAndPlaylistTabWidget->currentIndex()) == msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS)) + else if (m_browserAndPlaylistTabWidget->tabText(index) == msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS)) { - QListWidgetItem *item = m_listWidget->currentItem(); + m_currentBrowser = BROWSER_TYPE_PLAYLISTS; - if (m_lastViewType != getCurrentViewType()) - setCurrentViewType(m_lastViewType); + m_centralWidget->setCurrentWidget(m_playlistViewsAndFooter); - m_tableWidget->clear(); - m_tableWidget->setColumnCount(0); - m_tableWidget->setRowCount(0); - - if (item) - { - m_listWidget->setCurrentItem(NULL); - m_listWidget->setCurrentItem(item); - } + onCurrentItemChanged(m_tableView->currentIndex()); } + applySearch(); + setCoreActions(); } @@ -2167,12 +2155,9 @@ QComboBox* MainWindow::launchWithComboBox() void MainWindow::onSearchLineEditEdited(const QString &text) { int i = 0; - QList items; - QVector > gridItems; QVector textUnicode = text.toUcs4(); QVector textHiraToKata; QVector textKataToHira; - ViewType viewType = getCurrentViewType(); bool foundHira = false; bool foundKata = false; @@ -2197,112 +2182,43 @@ void MainWindow::onSearchLineEditEdited(const QString &text) } } - switch(viewType) + if (!foundHira && !foundKata) { - case VIEW_TYPE_LIST: + m_searchRegExp = QRegExp(text, Qt::CaseInsensitive); + } + else if (foundHira && !foundKata) + { + m_searchRegExp = QRegExp(text + "|" + QString::fromUcs4(textHiraToKata.constData(), textHiraToKata.size()), Qt::CaseInsensitive); + } + else if (!foundHira && foundKata) + { + m_searchRegExp = QRegExp(text + "|" + QString::fromUcs4(textKataToHira.constData(), textKataToHira.size()), Qt::CaseInsensitive); + } + else + { + m_searchRegExp = QRegExp(text + "|" + QString::fromUcs4(textHiraToKata.constData(), textHiraToKata.size()) + "|" + QString::fromUcs4(textKataToHira.constData(), textKataToHira.size()), Qt::CaseInsensitive); + } + + applySearch(); +} + +void MainWindow::applySearch() +{ + switch (m_currentBrowser) + { + case BROWSER_TYPE_PLAYLISTS: + if (m_proxyModel->filterRegExp() != m_searchRegExp) { - if (text.isEmpty()) - { - for (i = 0; i < m_tableWidget->rowCount(); i++) - { - m_tableWidget->setRowHidden(i, false); - } - return; - } - - items.append(m_tableWidget->findItems(text, Qt::MatchContains)); - - if (foundHira) - { - items.append(m_tableWidget->findItems(QString::fromUcs4(textHiraToKata.constData(), textHiraToKata.size()), Qt::MatchContains)); - } - - if (foundKata) - { - items.append(m_tableWidget->findItems(QString::fromUcs4(textKataToHira.constData(), textKataToHira.size()), Qt::MatchContains)); - } - - if (items.isEmpty()) - { - for (i = 0; i < m_tableWidget->rowCount(); i++) - { - m_tableWidget->setRowHidden(i, true); - } - - return; - } - else - { - for (i = 0; i < m_tableWidget->rowCount(); i++) - { - if (items.contains(m_tableWidget->item(i, 0))) - m_tableWidget->setRowHidden(i, false); - else - m_tableWidget->setRowHidden(i, true); - } - } - - break; + m_proxyModel->setFilterRegExp(m_searchRegExp); + updateItemsCount(); } - case VIEW_TYPE_ICONS: + break; + case BROWSER_TYPE_FILES: + if (m_proxyFileModel->filterRegExp() != m_searchRegExp) { - int i; - - if (text.isEmpty()) - { - for (i = 0; i < m_gridItems.size(); i++) - { - m_gridItems.at(i)->widget->show(); - } - return; - } - - for (i = 0; i < m_gridItems.count(); i++) - { - const QPointer &item = m_gridItems.at(i); - - if (item->hash.value("label").contains(text, Qt::CaseInsensitive)) - gridItems.append(item); - - if (foundHira) - { - if (item->hash.value("label").contains(QString::fromUcs4(textHiraToKata.constData(), textHiraToKata.size()), Qt::CaseInsensitive)) - gridItems.append(item); - } - - if (foundKata) - { - if (item->hash.value("label").contains(QString::fromUcs4(textKataToHira.constData(), textKataToHira.size()), Qt::CaseInsensitive)) - gridItems.append(item); - } - } - - if (gridItems.isEmpty()) - { - for (i = 0; i < m_gridItems.size(); i++) - { - m_gridItems.at(i)->widget->hide(); - } - - return; - } - else - { - for (i = 0; i < m_gridItems.size(); i++) - { - const QPointer &item = m_gridItems.at(i); - - if (gridItems.contains(item)) - item->widget->show(); - else - item->widget->hide(); - } - } - - break; + m_proxyFileModel->setFilterRegExp(m_searchRegExp); } - default: - break; + break; } } @@ -2378,39 +2294,21 @@ void MainWindow::onSearchEnterPressed() onSearchLineEditEdited(m_searchLineEdit->text()); } -void MainWindow::onCurrentTableItemChanged(QTableWidgetItem *current, QTableWidgetItem *) +void MainWindow::onCurrentTableItemDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles) { QHash hash; - if (!current) + if (!roles.contains(Qt::EditRole)) return; - hash = current->data(Qt::UserRole).value >(); - - currentItemChanged(hash); -} - -void MainWindow::onCurrentTableItemDataChanged(QTableWidgetItem *item) -{ - QHash hash; - - if (!item) + if (topLeft != bottomRight) return; - /* block this signal because setData() would trigger an infinite loop here */ - disconnect(m_tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(onCurrentTableItemDataChanged(QTableWidgetItem*))); - - hash = item->data(Qt::UserRole).value >(); - hash["label"] = item->text(); - hash["label_noext"] = QFileInfo(item->text()).completeBaseName(); - - item->setData(Qt::UserRole, QVariant::fromValue(hash)); + hash = topLeft.data(PlaylistModel::HASH).value>(); updateCurrentPlaylistEntry(hash); - currentItemChanged(hash); - - connect(m_tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(onCurrentTableItemDataChanged(QTableWidgetItem*))); + onCurrentItemChanged(topLeft); } void MainWindow::onCurrentListItemDataChanged(QListWidgetItem *item) @@ -2485,7 +2383,17 @@ void MainWindow::renamePlaylistItem(QListWidgetItem *item, QString newName) connect(m_listWidget, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(onCurrentListItemDataChanged(QListWidgetItem*))); } -void MainWindow::currentItemChanged(const QHash &hash) +void MainWindow::onCurrentItemChanged(const QModelIndex &index) +{ + onCurrentItemChanged(index.data(PlaylistModel::HASH).value>()); +} + +void MainWindow::onCurrentFileChanged(const QModelIndex &index) +{ + onCurrentItemChanged(getFileContentHash(m_proxyFileModel->mapToSource(index))); +} + +void MainWindow::onCurrentItemChanged(const QHash &hash) { settings_t *settings = config_get_ptr(); QString label; @@ -2611,74 +2519,83 @@ void MainWindow::resizeThumbnails(bool one, bool two, bool three) void MainWindow::setCurrentViewType(ViewType viewType) { - m_lastViewType = m_viewType; m_viewType = viewType; switch (viewType) { case VIEW_TYPE_ICONS: { - m_tableWidget->hide(); - m_gridWidget->show(); + m_playlistViews->setCurrentWidget(m_gridView); + m_zoomWidget->show(); break; } case VIEW_TYPE_LIST: default: { - m_viewType = VIEW_TYPE_LIST; - m_gridWidget->hide(); - m_tableWidget->show(); + m_playlistViews->setCurrentWidget(m_tableView); + m_zoomWidget->hide(); break; } } } +void MainWindow::setCurrentThumbnailType(ThumbnailType thumbnailType) +{ + m_thumbnailType = thumbnailType; + + m_playlistModel->setThumbnailType(thumbnailType); + updateVisibleItems(); + m_gridView->viewport()->update(); +} + MainWindow::ViewType MainWindow::getCurrentViewType() { return m_viewType; } +ThumbnailType MainWindow::getCurrentThumbnailType() +{ + return m_thumbnailType; +} + void MainWindow::onCurrentListItemChanged(QListWidgetItem *current, QListWidgetItem *previous) { - ViewType viewType = getCurrentViewType(); - Q_UNUSED(current) Q_UNUSED(previous) - if (m_browserAndPlaylistTabWidget->tabText(m_browserAndPlaylistTabWidget->currentIndex()) != msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS)) - return; - - switch (viewType) - { - case VIEW_TYPE_ICONS: - { - initContentGridLayout(); - break; - } - case VIEW_TYPE_LIST: - default: - { - initContentTableWidget(); - break; - } - } + initContentTableWidget(); setCoreActions(); } -TableWidget* MainWindow::contentTableWidget() +TableView* MainWindow::contentTableView() { - return m_tableWidget; + return m_tableView; } -QWidget* MainWindow::contentGridWidget() +QTableView* MainWindow::fileTableView() { - return m_gridWidget; + return m_fileTableView; } -FlowLayout* MainWindow::contentGridLayout() +QStackedWidget* MainWindow::centralWidget() { - return m_gridLayout; + return m_centralWidget; +} + +FileDropWidget* MainWindow::playlistViews() +{ + return m_playlistViews; +} + +QWidget* MainWindow::playlistViewsAndFooter() +{ + return m_playlistViewsAndFooter; +} + +GridView* MainWindow::contentGridView() +{ + return m_gridView; } void MainWindow::onBrowserDownloadsClicked() @@ -2769,7 +2686,9 @@ void MainWindow::onTimeout() void MainWindow::onStopClicked() { +#ifdef HAVE_MENU menu_navigation_set_selection(0); +#endif command_event(CMD_EVENT_UNLOAD_CORE, NULL); setCurrentCoreLabel(); activateWindow(); @@ -2856,7 +2775,9 @@ void MainWindow::onUnloadCoreMenuAction() { QAction *action = qobject_cast(sender()); +#ifdef HAVE_MENU menu_navigation_set_selection(0); +#endif if (!command_event(CMD_EVENT_UNLOAD_CORE, NULL)) { @@ -2883,183 +2804,9 @@ void MainWindow::onLoadCoreClicked(const QStringList &extensionFilters) m_loadCoreWindow->initCoreList(extensionFilters); } -void MainWindow::removeGridItems() -{ - if (m_gridItems.count() > 0) - { - QMutableVectorIterator > items(m_gridItems); - - m_pendingItemUpdates.clear(); - - while (items.hasNext()) - { - QPointer item = items.next(); - - if (item) - { - item->imageWatcher.waitForFinished(); - - items.remove(); - - m_gridLayout->removeWidget(item->widget); - - delete item->widget; - delete item; - } - } - } -} - -void MainWindow::onDeferredImageLoaded() -{ - const QFutureWatcher *watcher = static_cast*>(sender()); - GridItem *item = NULL; - - if (!watcher) - return; - - item = watcher->result(); - - if (!item) - return; - - if (m_gridItems.contains(item)) - { - if (!item->image.isNull()) - { - m_pendingItemUpdates.append(item); - QTimer::singleShot(0, this, SLOT(onPendingItemUpdates())); - } - } -} - -void MainWindow::onPendingItemUpdates() -{ - QMutableListIterator list(m_pendingItemUpdates); - - while (list.hasNext()) - { - GridItem *item = list.next(); - - if (!item) - continue; - - if (m_gridItems.contains(item)) - onUpdateGridItemPixmapFromImage(item); - - list.remove(); - } -} - -void MainWindow::onUpdateGridItemPixmapFromImage(GridItem *item) -{ - if (!item) - return; - - if (!m_gridItems.contains(item)) - return; - - item->label->setPixmap(QPixmap::fromImage(item->image)); - item->label->update(); -} - -void MainWindow::loadImageDeferred(GridItem *item, QString path) -{ - connect(&item->imageWatcher, SIGNAL(finished()), this, SLOT(onDeferredImageLoaded()), Qt::QueuedConnection); - item->imageWatcher.setFuture(QtConcurrent::run(this, &MainWindow::doDeferredImageLoad, item, path)); -} - -GridItem* MainWindow::doDeferredImageLoad(GridItem *item, QString path) -{ - /* this runs in another thread */ - if (!item) - return NULL; - - /* While we are indeed writing across thread boundaries here, the image is never accessed until after - * its thread finishes, and the item is never deleted without first waiting for the thread to finish. - */ - item->image = QImage(path); - - return item; -} - -void MainWindow::initContentGridLayout() -{ - QListWidgetItem *item = m_listWidget->currentItem(); - QString path; - - if (!item) - return; - - m_gridProgressBar->setMinimum(0); - m_gridProgressBar->setMaximum(0); - m_gridProgressBar->setValue(0); - m_gridProgressWidget->show(); - - removeGridItems(); - - m_currentGridHash.clear(); - - if (m_currentGridWidget) - { - m_currentGridWidget->setObjectName("thumbnailWidget"); - m_currentGridWidget->style()->unpolish(m_currentGridWidget); - m_currentGridWidget->style()->polish(m_currentGridWidget); - } - - m_currentGridWidget = NULL; - - path = item->data(Qt::UserRole).toString(); - - if (path == ALL_PLAYLISTS_TOKEN) - { - settings_t *settings = config_get_ptr(); - QDir playlistDir(settings->paths.directory_playlist); - QStringList playlists; - int i = 0; - - for (i = 0; i < m_playlistFiles.count(); i++) - { - const QString &playlist = m_playlistFiles.at(i); - playlists.append(playlistDir.absoluteFilePath(playlist)); - } - - addPlaylistItemsToGrid(playlists, true); - } - else - addPlaylistItemsToGrid(QStringList() << path); - - QTimer::singleShot(0, this, SLOT(onContentGridInited())); -} - -void MainWindow::onContentGridInited() -{ - ThumbnailWidget *thumbnailWidget = NULL; - - m_gridLayoutWidget->resize(m_gridScrollArea->viewport()->size()); - - onZoomValueChanged(m_zoomSlider->value()); - - onSearchEnterPressed(); - - if (m_gridItems.count() > 0) - { - GridItem *gridItem = m_gridItems.at(0); - - if (gridItem) - { - thumbnailWidget = m_gridItems.at(0)->widget.data(); - - if (thumbnailWidget) - onGridItemClicked(thumbnailWidget); - } - } -} - void MainWindow::initContentTableWidget() { QListWidgetItem *item = m_listWidget->currentItem(); - QStringList horizontal_header_labels; QString path; int i = 0; @@ -3077,24 +2824,6 @@ void MainWindow::initContentTableWidget() m_currentGridWidget = NULL; - horizontal_header_labels << msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NAME); - - /* block this signal because setData() called in addPlaylistHashToTable() would trigger an infinite loop */ - disconnect(m_tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(onCurrentTableItemDataChanged(QTableWidgetItem*))); - - m_tableWidget->clear(); - m_tableWidget->setColumnCount(0); - m_tableWidget->setRowCount(0); - m_tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); - m_tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); - m_tableWidget->setEditTriggers(QAbstractItemView::SelectedClicked | QAbstractItemView::EditKeyPressed); - m_tableWidget->setSortingEnabled(false); - m_tableWidget->setColumnCount(1); - m_tableWidget->setRowCount(0); - m_tableWidget->setHorizontalHeaderLabels(horizontal_header_labels); - m_tableWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_tableWidget->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); - path = item->data(Qt::UserRole).toString(); if (path == ALL_PLAYLISTS_TOKEN) @@ -3110,31 +2839,25 @@ void MainWindow::initContentTableWidget() playlists.append(playlistDir.absoluteFilePath(playlist)); } - addPlaylistItemsToTable(playlists, true); + m_playlistModel->addPlaylistItems(playlists, true); } else - addPlaylistItemsToTable(QStringList() << path); - - m_tableWidget->setSortingEnabled(true); + m_playlistModel->addPlaylistItems(QStringList() << path); if (item != m_historyPlaylistsItem) - m_tableWidget->sortByColumn(0, Qt::AscendingOrder); + m_tableView->sortByColumn(0, Qt::AscendingOrder); + else + m_proxyModel->sort(-1); - m_tableWidget->resizeColumnsToContents(); + updateItemsCount(); - for (i = 0; i < m_tableWidget->rowCount(); i++) - { - /* select the first non-hidden row */ - if (!m_tableWidget->isRowHidden(i)) - { - m_tableWidget->selectRow(i); - break; - } - } + m_gridView->scrollToTop(); + m_gridView->setCurrentIndex(m_proxyModel->index(0, 0)); +} - onSearchEnterPressed(); - - connect(m_tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(onCurrentTableItemDataChanged(QTableWidgetItem*))); +void MainWindow::updateItemsCount() +{ + m_itemsCountLabel->setText(m_itemsCountLiteral.arg(m_proxyModel->rowCount())); } void MainWindow::keyPressEvent(QKeyEvent *event) @@ -3174,6 +2897,40 @@ QString MainWindow::getCurrentViewTypeString() return QStringLiteral("list"); } +QString MainWindow::getCurrentThumbnailTypeString() +{ + switch (m_thumbnailType) + { + case THUMBNAIL_TYPE_SCREENSHOT: + { + return QStringLiteral("screenshot"); + } + case THUMBNAIL_TYPE_TITLE_SCREEN: + { + return QStringLiteral("title"); + } + case THUMBNAIL_TYPE_BOXART: + default: + { + return QStringLiteral("boxart"); + } + } + + return QStringLiteral("list"); +} + +ThumbnailType MainWindow::getThumbnailTypeFromString(QString thumbnailType) +{ + if (thumbnailType == "boxart") + return THUMBNAIL_TYPE_BOXART; + else if (thumbnailType == "screenshot") + return THUMBNAIL_TYPE_SCREENSHOT; + else if (thumbnailType == "title") + return THUMBNAIL_TYPE_TITLE_SCREEN; + + return THUMBNAIL_TYPE_BOXART; +} + void MainWindow::closeEvent(QCloseEvent *event) { if (m_settings->value("save_geometry", false).toBool()) @@ -3184,6 +2941,8 @@ void MainWindow::closeEvent(QCloseEvent *event) m_settings->setValue("last_tab", m_browserAndPlaylistTabWidget->currentIndex()); m_settings->setValue("view_type", getCurrentViewTypeString()); + m_settings->setValue("file_browser_table_headers", m_fileTableView->horizontalHeader()->saveState()); + m_settings->setValue("icon_view_zoom", m_lastZoomSliderValue); QMainWindow::closeEvent(event); } diff --git a/ui/drivers/qt/updateretroarch.cpp b/ui/drivers/qt/updateretroarch.cpp index 0952a5e094..f5834d917c 100644 --- a/ui/drivers/qt/updateretroarch.cpp +++ b/ui/drivers/qt/updateretroarch.cpp @@ -4,14 +4,20 @@ #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include #include "../../../tasks/tasks_internal.h" #include "../../../verbosity.h" #include "../../../config.def.h" + +#ifndef CXX_BUILD } +#endif #define USER_AGENT "RetroArch-WIMP/1.0" #define PARTIAL_EXTENSION ".partial" diff --git a/ui/drivers/qt/viewoptionsdialog.cpp b/ui/drivers/qt/viewoptionsdialog.cpp index 5d9bce0466..b26144475c 100644 --- a/ui/drivers/qt/viewoptionsdialog.cpp +++ b/ui/drivers/qt/viewoptionsdialog.cpp @@ -14,12 +14,18 @@ #include "viewoptionsdialog.h" #include "../ui_qt.h" +#ifndef CXX_BUILD extern "C" { +#endif + #include "../../../msg_hash.h" + +#ifndef CXX_BUILD } +#endif ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) : - QDialog(parent) + QDialog(mainwindow) ,m_mainwindow(mainwindow) ,m_settings(mainwindow->settings()) ,m_saveGeometryCheckBox(new QCheckBox(this)) @@ -27,6 +33,8 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) : ,m_saveLastTabCheckBox(new QCheckBox(this)) ,m_showHiddenFilesCheckBox(new QCheckBox(this)) ,m_themeComboBox(new QComboBox(this)) + ,m_thumbnailComboBox(new QComboBox(this)) + ,m_thumbnailCacheSpinBox(new QSpinBox(this)) ,m_startupPlaylistComboBox(new QComboBox(this)) ,m_highlightColorPushButton(new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_CHOOSE), this)) ,m_highlightColor() @@ -45,6 +53,13 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) : m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_DARK), MainWindow::THEME_DARK); m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_CUSTOM), MainWindow::THEME_CUSTOM); + m_thumbnailComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_BOXART), THUMBNAIL_TYPE_BOXART); + m_thumbnailComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_SCREENSHOT), THUMBNAIL_TYPE_SCREENSHOT); + m_thumbnailComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_TITLE_SCREEN), THUMBNAIL_TYPE_TITLE_SCREEN); + + m_thumbnailCacheSpinBox->setSuffix(" MB"); + m_thumbnailCacheSpinBox->setRange(0, 99999); + m_allPlaylistsListMaxCountSpinBox->setRange(0, 99999); m_allPlaylistsGridMaxCountSpinBox->setRange(0, 99999); @@ -67,6 +82,8 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) : form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_LIST_MAX_COUNT), m_allPlaylistsListMaxCountSpinBox); form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_GRID_MAX_COUNT), m_allPlaylistsGridMaxCountSpinBox); form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_STARTUP_PLAYLIST), m_startupPlaylistComboBox); + form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE), m_thumbnailComboBox); + form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT), m_thumbnailCacheSpinBox); form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME), m_themeComboBox); form->addRow(m_highlightColorLabel, m_highlightColorPushButton); @@ -77,9 +94,16 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) : loadViewOptions(); connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onThemeComboBoxIndexChanged(int))); + connect(m_thumbnailComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onThumbnailComboBoxIndexChanged(int))); connect(m_highlightColorPushButton, SIGNAL(clicked()), this, SLOT(onHighlightColorChoose())); } +void ViewOptionsDialog::onThumbnailComboBoxIndexChanged(int index) +{ + ThumbnailType type = static_cast(m_thumbnailComboBox->currentData().value()); + m_mainwindow->setCurrentThumbnailType(type); +} + void ViewOptionsDialog::onThemeComboBoxIndexChanged(int) { MainWindow::Theme theme = static_cast(m_themeComboBox->currentData(Qt::UserRole).toInt()); @@ -138,6 +162,7 @@ void ViewOptionsDialog::loadViewOptions() QVector > playlists = m_mainwindow->getPlaylists(); QString initialPlaylist = m_settings->value("initial_playlist", m_mainwindow->getSpecialPlaylistPath(SPECIAL_PLAYLIST_HISTORY)).toString(); int themeIndex = 0; + int thumbnailIndex = 0; int playlistIndex = 0; int i; @@ -148,12 +173,18 @@ void ViewOptionsDialog::loadViewOptions() m_suggestLoadedCoreFirstCheckBox->setChecked(m_settings->value("suggest_loaded_core_first", false).toBool()); m_allPlaylistsListMaxCountSpinBox->setValue(m_settings->value("all_playlists_list_max_count", 0).toInt()); m_allPlaylistsGridMaxCountSpinBox->setValue(m_settings->value("all_playlists_grid_max_count", 5000).toInt()); + m_thumbnailCacheSpinBox->setValue(m_settings->value("thumbnail_cache_limit", 512).toInt()); themeIndex = m_themeComboBox->findData(m_mainwindow->getThemeFromString(m_settings->value("theme", "default").toString())); if (m_themeComboBox->count() > themeIndex) m_themeComboBox->setCurrentIndex(themeIndex); + thumbnailIndex = m_thumbnailComboBox->findData(m_mainwindow->getThumbnailTypeFromString(m_settings->value("icon_view_thumbnail_type", "boxart").toString())); + + if (m_thumbnailComboBox->count() > thumbnailIndex) + m_thumbnailComboBox->setCurrentIndex(thumbnailIndex); + if (highlightColor.isValid()) { m_highlightColor = highlightColor; @@ -204,12 +235,15 @@ void ViewOptionsDialog::saveViewOptions() m_settings->setValue("all_playlists_list_max_count", m_allPlaylistsListMaxCountSpinBox->value()); m_settings->setValue("all_playlists_grid_max_count", m_allPlaylistsGridMaxCountSpinBox->value()); m_settings->setValue("initial_playlist", m_startupPlaylistComboBox->currentData(Qt::UserRole).toString()); + m_settings->setValue("icon_view_thumbnail_type", m_mainwindow->getCurrentThumbnailTypeString()); + m_settings->setValue("thumbnail_cache_limit", m_thumbnailCacheSpinBox->value()); if (!m_mainwindow->customThemeString().isEmpty()) m_settings->setValue("custom_theme", m_customThemePath); m_mainwindow->setAllPlaylistsListMaxCount(m_allPlaylistsListMaxCountSpinBox->value()); m_mainwindow->setAllPlaylistsGridMaxCount(m_allPlaylistsGridMaxCountSpinBox->value()); + m_mainwindow->setThumbnailCacheLimit(m_thumbnailCacheSpinBox->value()); } void ViewOptionsDialog::onAccepted() @@ -229,11 +263,12 @@ void ViewOptionsDialog::onRejected() void ViewOptionsDialog::showDialog() { loadViewOptions(); + setWindowFlags(windowFlags() | Qt::Tool); show(); + activateWindow(); } void ViewOptionsDialog::hideDialog() { reject(); } - diff --git a/ui/drivers/qt/viewoptionsdialog.h b/ui/drivers/qt/viewoptionsdialog.h index faf0f143df..4e9ff4c76a 100644 --- a/ui/drivers/qt/viewoptionsdialog.h +++ b/ui/drivers/qt/viewoptionsdialog.h @@ -24,6 +24,7 @@ public slots: void onRejected(); private slots: void onThemeComboBoxIndexChanged(int index); + void onThumbnailComboBoxIndexChanged(int index); void onHighlightColorChoose(); private: void loadViewOptions(); @@ -37,6 +38,8 @@ private: QCheckBox *m_saveLastTabCheckBox; QCheckBox *m_showHiddenFilesCheckBox; QComboBox *m_themeComboBox; + QComboBox *m_thumbnailComboBox; + QSpinBox *m_thumbnailCacheSpinBox; QComboBox *m_startupPlaylistComboBox; QPushButton *m_highlightColorPushButton; QColor m_highlightColor; diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index 1c494f1e99..9cf8e0ed45 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -14,7 +14,10 @@ * If not, see . */ +#ifndef CXX_BUILD extern "C" { +#endif + #include #include @@ -29,10 +32,12 @@ extern "C" { #include "../../verbosity.h" #include "../../msg_hash.h" #include "../../tasks/tasks_internal.h" + +#ifndef CXX_BUILD } +#endif #include "ui_qt.h" -#include "qt/filedropwidget.h" #include "qt/viewoptionsdialog.h" #include @@ -219,6 +224,7 @@ static void* ui_companion_qt_init(void) MainWindow *mainwindow = NULL; QHBoxLayout *browserButtonsHBoxLayout = NULL; QVBoxLayout *layout = NULL; + QVBoxLayout *playlistViewsLayout = NULL; QVBoxLayout *launchWithWidgetLayout = NULL; QHBoxLayout *coreComboBoxLayout = NULL; QMenuBar *menu = NULL; @@ -239,9 +245,10 @@ static void* ui_companion_qt_init(void) QDockWidget *browserAndPlaylistTabDock = NULL; QDockWidget *coreSelectionDock = NULL; QTabWidget *browserAndPlaylistTabWidget = NULL; - QWidget *widget = NULL; - QWidget *browserWidget = NULL; - QWidget *playlistWidget = NULL; + QStackedWidget *centralWidget = NULL; + QStackedWidget *widget = NULL; + QFrame *browserWidget = NULL; + QFrame *playlistWidget = NULL; QWidget *coreSelectionWidget = NULL; QWidget *launchWithWidget = NULL; ThumbnailWidget *thumbnailWidget = NULL; @@ -288,21 +295,20 @@ static void* ui_companion_qt_init(void) listWidget = mainwindow->playlistListWidget(); - widget = new FileDropWidget(mainwindow); - widget->setObjectName("tableWidget"); + widget = mainwindow->playlistViews(); widget->setContextMenuPolicy(Qt::CustomContextMenu); QObject::connect(widget, SIGNAL(filesDropped(QStringList)), mainwindow, SLOT(onPlaylistFilesDropped(QStringList))); + QObject::connect(widget, SIGNAL(enterPressed()), mainwindow, SLOT(onDropWidgetEnterPressed())); QObject::connect(widget, SIGNAL(deletePressed()), mainwindow, SLOT(deleteCurrentPlaylistItem())); QObject::connect(widget, SIGNAL(customContextMenuRequested(const QPoint&)), mainwindow, SLOT(onFileDropWidgetContextMenuRequested(const QPoint&))); - layout = new QVBoxLayout(); - layout->addWidget(mainwindow->contentTableWidget()); - layout->addWidget(mainwindow->contentGridWidget()); + centralWidget = mainwindow->centralWidget(); - widget->setLayout(layout); + centralWidget->addWidget(mainwindow->playlistViewsAndFooter()); + centralWidget->addWidget(mainwindow->fileTableView()); - mainwindow->setCentralWidget(widget); + mainwindow->setCentralWidget(centralWidget); menu = mainwindow->menuBar(); @@ -348,15 +354,17 @@ static void* ui_companion_qt_init(void) helpMenu->addAction(QString(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_ABOUT)) + "...", mainwindow, SLOT(showAbout())); helpMenu->addAction("About Qt...", qApp, SLOT(aboutQt())); - playlistWidget = new QWidget(); + playlistWidget = new QFrame(); playlistWidget->setLayout(new QVBoxLayout()); playlistWidget->setObjectName("playlistWidget"); + playlistWidget->layout()->setContentsMargins(0, 0, 0, 0); playlistWidget->layout()->addWidget(mainwindow->playlistListWidget()); - browserWidget = new QWidget(); + browserWidget = new QFrame(); browserWidget->setLayout(new QVBoxLayout()); browserWidget->setObjectName("browserWidget"); + browserWidget->layout()->setContentsMargins(0, 0, 0, 0); browserDownloadsButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY)); browserUpButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER_UP)); @@ -495,6 +503,7 @@ static void* ui_companion_qt_init(void) coreSelectionDock->setProperty("default_area", Qt::LeftDockWidgetArea); coreSelectionDock->setProperty("menu_text", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_CORE)); coreSelectionDock->setWidget(coreSelectionWidget); + coreSelectionDock->setFixedHeight(coreSelectionDock->minimumSizeHint().height()); mainwindow->addDockWidget(static_cast(coreSelectionDock->property("default_area").toInt()), coreSelectionDock); @@ -513,6 +522,11 @@ static void* ui_companion_qt_init(void) if (qsettings->contains("all_playlists_grid_max_count")) mainwindow->setAllPlaylistsGridMaxCount(qsettings->value("all_playlists_grid_max_count", 5000).toInt()); + if (qsettings->contains("thumbnail_cache_limit")) + mainwindow->setThumbnailCacheLimit(qsettings->value("thumbnail_cache_limit", 500).toInt()); + else + mainwindow->setThumbnailCacheLimit(500); + if (qsettings->contains("geometry")) if (qsettings->contains("save_geometry")) mainwindow->restoreGeometry(qsettings->value("geometry").toByteArray()); @@ -521,6 +535,14 @@ static void* ui_companion_qt_init(void) if (qsettings->contains("dock_positions")) mainwindow->restoreState(qsettings->value("dock_positions").toByteArray()); + if (qsettings->contains("file_browser_table_headers")) + mainwindow->fileTableView()->horizontalHeader()->restoreState(qsettings->value("file_browser_table_headers").toByteArray()); + else + mainwindow->fileTableView()->horizontalHeader()->resizeSection(0, 300); + + if (qsettings->contains("icon_view_zoom")) + mainwindow->setIconViewZoom(qsettings->value("icon_view_zoom", 50).toInt()); + if (qsettings->contains("theme")) { QString themeStr = qsettings->value("theme").toString(); @@ -548,13 +570,24 @@ static void* ui_companion_qt_init(void) mainwindow->setCurrentViewType(MainWindow::VIEW_TYPE_ICONS); else mainwindow->setCurrentViewType(MainWindow::VIEW_TYPE_LIST); - - /* we set it to the same thing a second time so that m_lastViewType is also equal to the startup view type */ - mainwindow->setCurrentViewType(mainwindow->getCurrentViewType()); } else mainwindow->setCurrentViewType(MainWindow::VIEW_TYPE_LIST); + if (qsettings->contains("icon_view_thumbnail_type")) + { + QString thumbnailType = qsettings->value("icon_view_thumbnail_type", "boxart").toString(); + + if (thumbnailType == "boxart") + mainwindow->setCurrentThumbnailType(THUMBNAIL_TYPE_BOXART); + else if (thumbnailType == "screenshot") + mainwindow->setCurrentThumbnailType(THUMBNAIL_TYPE_SCREENSHOT); + else if (thumbnailType == "title") + mainwindow->setCurrentThumbnailType(THUMBNAIL_TYPE_TITLE_SCREEN); + else + mainwindow->setCurrentThumbnailType(THUMBNAIL_TYPE_BOXART); + } + /* We make sure to hook up the tab widget callback only after the tabs themselves have been added, * but before changing to a specific one, to avoid the callback firing before the view type is set. */ @@ -611,6 +644,8 @@ static void* ui_companion_qt_init(void) } } + mainwindow->initContentTableWidget(); + return handle; } @@ -632,30 +667,27 @@ static void ui_companion_qt_toggle(void *data, bool force) ui_window_qt_t *win_handle = (ui_window_qt_t*)handle->window; settings_t *settings = config_get_ptr(); -#ifdef HAVE_DYNAMIC - if (!retroarch_core_set_on_cmdline()) -#endif - if (settings->bools.ui_companion_toggle || force) + if (settings->bools.ui_companion_toggle || force) + { + if (settings->bools.video_fullscreen) + command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); + + win_handle->qtWindow->activateWindow(); + win_handle->qtWindow->raise(); + video_driver_show_mouse(); + win_handle->qtWindow->show(); + + if (video_driver_started_fullscreen()) + win_handle->qtWindow->lower(); + + if (!already_started) { - if (settings->bools.video_fullscreen) - command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); + already_started = true; - win_handle->qtWindow->activateWindow(); - win_handle->qtWindow->raise(); - video_driver_show_mouse(); - win_handle->qtWindow->show(); - - if (video_driver_started_fullscreen()) - win_handle->qtWindow->lower(); - - if (!already_started) - { - already_started = true; - - if (win_handle->qtWindow->settings()->value("show_welcome_screen", true).toBool()) - win_handle->qtWindow->showWelcomeScreen(); - } + if (win_handle->qtWindow->settings()->value("show_welcome_screen", true).toBool()) + win_handle->qtWindow->showWelcomeScreen(); } + } } static void ui_companion_qt_event_command(void *data, enum event_command cmd) diff --git a/ui/drivers/ui_qt.h b/ui/drivers/ui_qt.h index 7c050d075b..cad3009d9e 100644 --- a/ui/drivers/ui_qt.h +++ b/ui/drivers/ui_qt.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -38,14 +38,27 @@ #include #include #include +#include +#include +#include +#include +#include +#include "qt/filedropwidget.h" + +#ifndef CXX_BUILD extern "C" { +#endif + #include #include #include #include "../ui_companion_driver.h" #include "../../gfx/video_driver.h" + +#ifndef CXX_BUILD } +#endif #define ALL_PLAYLISTS_TOKEN "|||ALL|||" #define ICON_PATH "/xmb/dot-art/png/" @@ -84,7 +97,7 @@ class LoadCoreWindow; class MainWindow; class ThumbnailWidget; class ThumbnailLabel; -class FlowLayout; +class GridView; class ShaderParamsDialog; class CoreOptionsDialog; class CoreInfoDialog; @@ -96,19 +109,58 @@ enum SpecialPlaylist SPECIAL_PLAYLIST_HISTORY }; -class GridItem : public QObject +enum ThumbnailType +{ + THUMBNAIL_TYPE_BOXART, + THUMBNAIL_TYPE_SCREENSHOT, + THUMBNAIL_TYPE_TITLE_SCREEN, +}; + +class PlaylistModel : public QAbstractListModel { Q_OBJECT -public: - GridItem(); - QPointer widget; - QPointer label; - QHash hash; - QImage image; - QPixmap pixmap; - QFutureWatcher imageWatcher; - QString labelText; +public: + enum Roles + { + HASH = Qt::UserRole + 1, + THUMBNAIL + }; + + PlaylistModel(QObject *parent = 0); + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + Qt::ItemFlags flags(const QModelIndex &index) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + void addPlaylistItems(const QStringList &paths, bool add = false); + void addDir(QString path, QFlags showHidden); + void setThumbnailType(const ThumbnailType type); + void loadThumbnail(const QModelIndex &index); + void reloadThumbnail(const QModelIndex &index); + void reloadThumbnailPath(const QString path); + void reloadSystemThumbnails(const QString system); + void setThumbnailCacheLimit(int limit); + +signals: + void imageLoaded(const QImage image, const QModelIndex &index, const QString &path); + +private slots: + void onImageLoaded(const QImage image, const QModelIndex &index, const QString &path); + +private: + QVector > m_contents; + QCache m_cache; + QSet m_pendingImages; + QVector m_imageFormats; + QRegularExpression m_fileSanitizerRegex; + ThumbnailType m_thumbnailType = THUMBNAIL_TYPE_BOXART; + QString getThumbnailPath(const QModelIndex &index, QString type) const; + QString getCurrentTypeThumbnailPath(const QModelIndex &index) const; + void getPlaylistItems(QString path); + void loadImage(const QModelIndex &index, const QString &path); }; class ThumbnailWidget : public QFrame @@ -145,11 +197,11 @@ protected: void paintEvent(QPaintEvent *event); void resizeEvent(QResizeEvent *event); private: - void updateMargins(); + void updateMargins(); - QPixmap *m_pixmap; - int m_pixmapWidth; - int m_pixmapHeight; + QPixmap *m_pixmap; + int m_pixmapWidth; + int m_pixmapHeight; }; class TreeView : public QTreeView @@ -164,17 +216,12 @@ protected slots: void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); }; -class TableWidget : public QTableWidget +class TableView : public QTableView { Q_OBJECT public: - TableWidget(QWidget *parent = 0); + TableView(QWidget *parent = 0); bool isEditorOpen(); -signals: - void enterPressed(); - void deletePressed(); -protected: - void keyPressEvent(QKeyEvent *event); }; class ListWidget : public QListWidget @@ -233,6 +280,33 @@ public slots: void appendMessage(const QString& text); }; +/* Used to store styling since delegates don't inherit QWidget. */ +class GridItem : public QWidget +{ + Q_OBJECT + + Q_PROPERTY(QString thumbnailvalign READ getThumbnailVerticalAlign WRITE setThumbnailVerticalAlign) + Q_PROPERTY(int padding READ getPadding WRITE setPadding) + +public: + GridItem(QWidget* parent); + + Qt::AlignmentFlag thumbnailVerticalAlignmentFlag; + int padding; + + int getPadding() const; + void setPadding(const int value); + QString getThumbnailVerticalAlign() const; + void setThumbnailVerticalAlign(const QString valign); +}; + +class FileSystemProxyModel : public QSortFilterProxyModel +{ +protected: + virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); +}; + class MainWindow : public QMainWindow { Q_OBJECT @@ -244,6 +318,12 @@ public: VIEW_TYPE_LIST }; + enum BrowserType + { + BROWSER_TYPE_PLAYLISTS, + BROWSER_TYPE_FILES + }; + enum Theme { THEME_SYSTEM_DEFAULT, @@ -263,10 +343,14 @@ public: MainWindow(QWidget *parent = NULL); ~MainWindow(); TreeView* dirTreeView(); + PlaylistModel* playlistModel(); ListWidget* playlistListWidget(); - TableWidget* contentTableWidget(); - FlowLayout* contentGridLayout(); - QWidget* contentGridWidget(); + QStackedWidget* centralWidget(); + TableView* contentTableView(); + QTableView* fileTableView(); + FileDropWidget* playlistViews(); + GridView* contentGridView(); + QWidget* playlistViewsAndFooter(); QWidget* searchWidget(); QLineEdit* searchLineEdit(); QComboBox* launchWithComboBox(); @@ -289,20 +373,28 @@ public: bool setCustomThemeFile(QString filePath); void setCustomThemeString(QString qss); const QString& customThemeString() const; - GridItem* doDeferredImageLoad(GridItem *item, QString path); void setCurrentViewType(ViewType viewType); QString getCurrentViewTypeString(); ViewType getCurrentViewType(); + void setCurrentThumbnailType(ThumbnailType thumbnailType); + QString getCurrentThumbnailTypeString(); + ThumbnailType getCurrentThumbnailType(); + ThumbnailType getThumbnailTypeFromString(QString thumbnailType); void setAllPlaylistsListMaxCount(int count); void setAllPlaylistsGridMaxCount(int count); + void setThumbnailCacheLimit(int count); PlaylistEntryDialog* playlistEntryDialog(); void addFilesToPlaylist(QStringList files); QString getCurrentPlaylistPath(); + QModelIndex getCurrentContentIndex(); QHash getCurrentContentHash(); + QHash getFileContentHash(const QModelIndex &index); static double lerp(double x, double y, double a, double b, double d); QString getSpecialPlaylistPath(SpecialPlaylist playlist); QVector > getPlaylists(); QString getScrubbedString(QString str); + void setDefaultCustomProperties(); + void setIconViewZoom(int zoomValue); signals: void thumbnailChanged(const QPixmap &pixmap); @@ -317,6 +409,7 @@ signals: void showInfoMessageDeferred(QString msg); void extractArchiveDeferred(QString path, QString extractionDir, QString tempExtension, retro_task_callback_t cb); void itemChanged(); + void updateThumbnails(); void gridItemChanged(QString title); void gotThumbnailDownload(QString system, QString title); void scrollToDownloads(QString path); @@ -327,15 +420,13 @@ public slots: void onBrowserUpClicked(); void onBrowserStartClicked(); void initContentTableWidget(); - void initContentGridLayout(); void onViewClosedDocksAboutToShow(); void onShowHiddenDockWidgetAction(); void setCoreActions(); void onRunClicked(); void loadContent(const QHash &contentHash); void onStartCoreClicked(); - void onTableWidgetEnterPressed(); - void onTableWidgetDeletePressed(); + void onDropWidgetEnterPressed(); void selectBrowserDir(QString path); void resizeThumbnails(bool one, bool two, bool three); void onResizeThumbnailOne(); @@ -365,24 +456,23 @@ public slots: void downloadAllThumbnails(QString system, QUrl url = QUrl()); void downloadPlaylistThumbnails(QString playlistPath); void downloadNextPlaylistThumbnail(QString system, QString title, QString type, QUrl url = QUrl()); + void changeThumbnailType(ThumbnailType type); private slots: void onLoadCoreClicked(const QStringList &extensionFilters = QStringList()); void onUnloadCoreMenuAction(); void onTimeout(); void onCoreLoaded(); + void onCurrentTableItemDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles); void onCurrentListItemChanged(QListWidgetItem *current, QListWidgetItem *previous); - void onCurrentTableItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous); - void onCurrentTableItemDataChanged(QTableWidgetItem *item); void onCurrentListItemDataChanged(QListWidgetItem *item); - void currentItemChanged(const QHash &hash); + void onCurrentItemChanged(const QModelIndex &index); + void onCurrentItemChanged(const QHash &hash); + void onCurrentFileChanged(const QModelIndex &index); void onSearchEnterPressed(); void onSearchLineEditEdited(const QString &text); - void addPlaylistItemsToTable(const QStringList &paths, bool all = false); - void addPlaylistHashToTable(const QVector > &items); - void addPlaylistItemsToGrid(const QStringList &paths, bool all = false); - void addPlaylistHashToGrid(const QVector > &items); - void onContentItemDoubleClicked(QTableWidgetItem *item); + void onContentItemDoubleClicked(const QModelIndex &index); + void onFileDoubleClicked(const QModelIndex &index); void onCoreLoadWindowClosed(); void onTreeViewItemsSelected(QModelIndexList selectedIndexes); void onSearchResetClicked(); @@ -390,13 +480,7 @@ private slots: void onFileBrowserTreeContextMenuRequested(const QPoint &pos); void onPlaylistWidgetContextMenuRequested(const QPoint &pos); void onStopClicked(); - void onDeferredImageLoaded(); void onZoomValueChanged(int value); - void onContentGridInited(); - void onUpdateGridItemPixmapFromImage(GridItem *item); - void onPendingItemUpdates(); - void onGridItemDoubleClicked(); - void onGridItemClicked(ThumbnailWidget *thumbnailWidget = NULL); void onPlaylistFilesDropped(QStringList files); void onShaderParamsClicked(); void onCoreOptionsClicked(); @@ -404,8 +488,8 @@ private slots: void onShowInfoMessage(QString msg); void onContributorsClicked(); void onItemChanged(); - void onGridItemChanged(QString title); void onFileSystemDirLoaded(const QString &path); + void onFileBrowserTableDirLoaded(const QString &path); void onDownloadScroll(QString path); void onDownloadScrollAgain(QString path); int onExtractArchive(QString path, QString extractionDir, QString tempExtension, retro_task_callback_t cb); @@ -439,14 +523,14 @@ private slots: void onPlaylistThumbnailDownloadReadyRead(); void onPlaylistThumbnailDownloadCanceled(); + void startTimer(); + void updateVisibleItems(); + private: void setCurrentCoreLabel(); void getPlaylistFiles(); bool isCoreLoaded(); bool isContentLessCore(); - void removeGridItems(); - void loadImageDeferred(GridItem *item, QString path); - void calcGridItemSize(GridItem *item, int zoomValue); bool updateCurrentPlaylistEntry(const QHash &contentHash); int extractArchive(QString path); void removeUpdateTempFiles(); @@ -454,8 +538,12 @@ private: void renamePlaylistItem(QListWidgetItem *item, QString newName); bool currentPlaylistIsSpecial(); bool currentPlaylistIsAll(); - QVector > getPlaylistItems(QString pathString); + void applySearch(); + void updateItemsCount(); + PlaylistModel *m_playlistModel; + QSortFilterProxyModel *m_proxyModel; + FileSystemProxyModel *m_proxyFileModel; LoadCoreWindow *m_loadCoreWindow; QTimer *m_timer; QString m_currentCore; @@ -463,8 +551,12 @@ private: QLabel *m_statusLabel; TreeView *m_dirTree; QFileSystemModel *m_dirModel; + QFileSystemModel *m_fileModel; ListWidget *m_listWidget; - TableWidget *m_tableWidget; + QStackedWidget *m_centralWidget; + TableView *m_tableView; + QTableView *m_fileTableView; + FileDropWidget *m_playlistViews; QWidget *m_searchWidget; QLineEdit *m_searchLineEdit; QDockWidget *m_searchDock; @@ -490,25 +582,22 @@ private: CoreInfoLabel *m_coreInfoLabel; CoreInfoWidget *m_coreInfoWidget; QDockWidget *m_logDock; - QWidget *m_logWidget; + QFrame *m_logWidget; LogTextEdit *m_logTextEdit; QVector m_imageFormats; QListWidgetItem *m_historyPlaylistsItem; QIcon m_folderIcon; QString m_customThemeString; - FlowLayout *m_gridLayout; - QWidget *m_gridWidget; - QScrollArea *m_gridScrollArea; - QVector > m_gridItems; + GridView *m_gridView; + QWidget *m_playlistViewsAndFooter; QWidget *m_gridLayoutWidget; QSlider *m_zoomSlider; int m_lastZoomSliderValue; - QList m_pendingItemUpdates; ViewType m_viewType; + ThumbnailType m_thumbnailType; QProgressBar *m_gridProgressBar; QWidget *m_gridProgressWidget; QHash m_currentGridHash; - ViewType m_lastViewType; QPointer m_currentGridWidget; int m_allPlaylistsListMaxCount; int m_allPlaylistsGridMaxCount; @@ -540,6 +629,15 @@ private: bool m_playlistThumbnailDownloadWasCanceled; QString m_pendingDirScrollPath; + QTimer *m_thumbnailTimer; + GridItem m_gridItem; + BrowserType m_currentBrowser; + QRegExp m_searchRegExp; + QByteArray m_fileTableHeaderState; + QWidget *m_zoomWidget; + QString m_itemsCountLiteral; + QLabel *m_itemsCountLabel; + protected: void closeEvent(QCloseEvent *event); void keyPressEvent(QKeyEvent *event); diff --git a/ui/drivers/ui_win32_resource.h b/ui/drivers/ui_win32_resource.h index e7090d701e..b071687311 100644 --- a/ui/drivers/ui_win32_resource.h +++ b/ui/drivers/ui_win32_resource.h @@ -1,5 +1,4 @@ - #define IDR_MENU 101 #define IDD_PICKCORE 103 #define ID_M_LOAD_CONTENT 40001 diff --git a/verbosity.c b/verbosity.c index 7489d2202e..876e8c823b 100644 --- a/verbosity.c +++ b/verbosity.c @@ -322,4 +322,3 @@ void RARCH_ERR(const char *fmt, ...) va_end(ap); } #endif - diff --git a/version_git.c b/version_git.c index 5ec10031b8..8f2edb65cc 100644 --- a/version_git.c +++ b/version_git.c @@ -18,4 +18,3 @@ #define STR_(x) #x #define STR(x) STR_(x) const char retroarch_git_version[] = STR(GIT_VERSION); - diff --git a/version_git.h b/version_git.h index 98c25d7566..a391d89e93 100644 --- a/version_git.h +++ b/version_git.h @@ -28,4 +28,3 @@ extern const char retroarch_git_version[]; RETRO_END_DECLS #endif - diff --git a/wii/app_booter/Makefile b/wii/app_booter/Makefile index 6a4b48fc92..1b87cbe924 100644 --- a/wii/app_booter/Makefile +++ b/wii/app_booter/Makefile @@ -63,4 +63,3 @@ clean: rm -f $(OBJ) .PHONY: clean - diff --git a/wii/app_booter/elf_abi.h b/wii/app_booter/elf_abi.h index b09261f76a..0595e104dd 100644 --- a/wii/app_booter/elf_abi.h +++ b/wii/app_booter/elf_abi.h @@ -404,7 +404,6 @@ typedef struct elf32_sym #define STV_HIDDEN 2 /* Symbol unavailable in other mods */ #define STV_PROTECTED 3 /* Not preemptible, not exported */ - /* Relocation entry with implicit addend */ typedef struct diff --git a/wii/app_booter/main.c b/wii/app_booter/main.c index 2a3086b0ed..571a377b17 100644 --- a/wii/app_booter/main.c +++ b/wii/app_booter/main.c @@ -137,7 +137,6 @@ static uint32_t load_dol_image(const void *dolstart) return dolfile->entry_point; } - /* if we name this main, GCC inserts the __eabi symbol, * even when we specify -mno-eabi. */ diff --git a/wii/libogc/include/asndlib.h b/wii/libogc/include/asndlib.h index ed62daf57a..328630ade9 100644 --- a/wii/libogc/include/asndlib.h +++ b/wii/libogc/include/asndlib.h @@ -26,7 +26,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #ifndef __ASNDLIB_H__ #define __ASNDLIB_H__ @@ -380,4 +379,3 @@ u32 ASND_GetDSP_ProcessTime(); #endif #endif - diff --git a/wii/libogc/include/bte/bd_addr.h b/wii/libogc/include/bte/bd_addr.h index b8c9698c8f..a5dcd957ee 100644 --- a/wii/libogc/include/bte/bd_addr.h +++ b/wii/libogc/include/bte/bd_addr.h @@ -71,7 +71,6 @@ struct bd_addr { (addr1)->addr[4] = (addr2)->addr[4]; \ (addr1)->addr[5] = (addr2)->addr[5]; }while(0) - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/wii/libogc/include/bte/bte.h b/wii/libogc/include/bte/bte.h index e05e9cdddb..b7d3fdc9a3 100644 --- a/wii/libogc/include/bte/bte.h +++ b/wii/libogc/include/bte/bte.h @@ -110,7 +110,6 @@ struct bte_pcb struct l2cap_pcb *ctl_pcb; struct l2cap_pcb *data_pcb; - s32 (*recv)(void *arg,void *buffer,u16 len); s32 (*conn_cfm)(void *arg,struct bte_pcb *pcb,u8 err); s32 (*disconn_cfm)(void *arg,struct bte_pcb *pcb,u8 err); @@ -151,4 +150,3 @@ s32 bte_sendmessageasync(struct bte_pcb *pcb,void *message,u16 len,s32 (*sent)(v #endif /* __cplusplus */ #endif - diff --git a/wii/libogc/include/debug.h b/wii/libogc/include/debug.h index a6139750ae..251b7f9732 100644 --- a/wii/libogc/include/debug.h +++ b/wii/libogc/include/debug.h @@ -17,7 +17,6 @@ extern const char *tcp_localip; extern const char *tcp_netmask; extern const char *tcp_gateway; - /*!\fn void _break() * \brief Stub function to insert the hardware break instruction. This function is used to enter the debug stub and to * connect with the host. The developer is free to insert this function at any position in project's source code. @@ -26,7 +25,6 @@ extern const char *tcp_gateway; */ void _break(); - /*!\fn void DEBUG_Init(s32 device_type,s32 channel_port) * \brief Performs the initialization of the debug stub. * \param[in] device_type type of device to use. can be either USB or TCP. diff --git a/wii/libogc/include/di/di.h b/wii/libogc/include/di/di.h index 952eeeb61d..fd481887d7 100644 --- a/wii/libogc/include/di/di.h +++ b/wii/libogc/include/di/di.h @@ -130,4 +130,3 @@ int DI_ClosePartition(void); #endif #endif - diff --git a/wii/libogc/include/fat.h b/wii/libogc/include/fat.h index 7d828f6e72..1d60af2921 100644 --- a/wii/libogc/include/fat.h +++ b/wii/libogc/include/fat.h @@ -28,7 +28,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #ifndef _LIBFAT_H #define _LIBFAT_H diff --git a/wii/libogc/include/gccore.h b/wii/libogc/include/gccore.h index f45b68345a..ba3efd0684 100644 --- a/wii/libogc/include/gccore.h +++ b/wii/libogc/include/gccore.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __GCCORE_H__ #define __GCCORE_H__ @@ -99,7 +98,6 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! * \mainpage * @@ -107,7 +105,6 @@ distribution. * - \subpage api_doc */ - /*! * \page intro Introduction * Welcome to the libOGC reference documentation. diff --git a/wii/libogc/include/gctypes.h b/wii/libogc/include/gctypes.h index 9b25df14f9..307dcf7b6f 100644 --- a/wii/libogc/include/gctypes.h +++ b/wii/libogc/include/gctypes.h @@ -47,7 +47,6 @@ typedef volatile float vf32; typedef volatile double vf64; /*+----------------------------------------------------------------------------------------------+*/ - typedef unsigned int BOOL; /*+----------------------------------------------------------------------------------------------+*/ // alias type typedefs @@ -78,7 +77,6 @@ typedef unsigned int BOOL; #endif /* BYTE_ORDER */ /*+----------------------------------------------------------------------------------------------+*/ - //! argv structure /*! \struct __argv @@ -106,5 +104,4 @@ extern struct __argv *__system_argv; #endif /* TYPES_H */ - /* END OF FILE */ diff --git a/wii/libogc/include/gcutil.h b/wii/libogc/include/gcutil.h index 3458ee037d..b53f2aeeee 100644 --- a/wii/libogc/include/gcutil.h +++ b/wii/libogc/include/gcutil.h @@ -9,4 +9,3 @@ #endif #endif /* _GCUTIL_H */ - diff --git a/wii/libogc/include/ipv4/lwip/icmp.h b/wii/libogc/include/ipv4/lwip/icmp.h index b86d3b9c79..98ef439cd5 100644 --- a/wii/libogc/include/ipv4/lwip/icmp.h +++ b/wii/libogc/include/ipv4/lwip/icmp.h @@ -109,4 +109,3 @@ PACK_STRUCT_END #define ICMPH_CODE_SET(hdr, code) ((hdr)->_type_code = htons((code) | (ICMPH_TYPE(hdr) << 8))) #endif /* __LWIP_ICMP_H__ */ - diff --git a/wii/libogc/include/ipv4/lwip/inet.h b/wii/libogc/include/ipv4/lwip/inet.h index 948dc6c090..c639097c54 100644 --- a/wii/libogc/include/ipv4/lwip/inet.h +++ b/wii/libogc/include/ipv4/lwip/inet.h @@ -84,4 +84,3 @@ u32_t ntohl(u32_t x); #endif #endif /* __LWIP_INET_H__ */ - diff --git a/wii/libogc/include/ipv4/lwip/ip.h b/wii/libogc/include/ipv4/lwip/ip.h index d407b3d694..c51f80a90c 100644 --- a/wii/libogc/include/ipv4/lwip/ip.h +++ b/wii/libogc/include/ipv4/lwip/ip.h @@ -40,7 +40,6 @@ #include "lwip/err.h" - void ip_init(void); struct netif *ip_route(struct ip_addr *dest); err_t ip_input(struct pbuf *p, struct netif *inp); @@ -65,7 +64,6 @@ err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, #endif /* IP_HDRINCL */ #define IP_HDRINCL NULL - /* This is the common part of all PCB types. It needs to be at the beginning of a PCB type definition. It is located here so that changes to this common part are made in one location instead of @@ -93,8 +91,6 @@ err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, #define SOF_OOBINLINE (u16_t)0x0100U /* leave received OOB data in line */ #define SOF_REUSEPORT (u16_t)0x0200U /* allow local address & port reuse */ - - #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -150,5 +146,3 @@ void ip_debug_print(struct pbuf *p); #endif /* IP_DEBUG */ #endif /* __LWIP_IP_H__ */ - - diff --git a/wii/libogc/include/ipv4/lwip/ip_addr.h b/wii/libogc/include/ipv4/lwip/ip_addr.h index fa921961de..4916a43a36 100644 --- a/wii/libogc/include/ipv4/lwip/ip_addr.h +++ b/wii/libogc/include/ipv4/lwip/ip_addr.h @@ -113,7 +113,6 @@ extern const struct ip_addr ip_addr_broadcast; #define IN_LOOPBACKNET 127 /* official! */ - #define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = htonl(((u32_t)(a & 0xff) << 24) | ((u32_t)(b & 0xff) << 16) | \ ((u32_t)(c & 0xff) << 8) | (u32_t)(d & 0xff)) @@ -140,7 +139,6 @@ u8_t ip_addr_isbroadcast(struct ip_addr *, struct netif *); #define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000)) - #define ip_addr_debug_print(debug, ipaddr) LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F, \ ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 24) & 0xff:0, \ ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 16) & 0xff:0, \ @@ -154,9 +152,3 @@ u8_t ip_addr_isbroadcast(struct ip_addr *, struct netif *); #define ip4_addr3(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff) #define ip4_addr4(ipaddr) ((u16_t)(ntohl((ipaddr)->addr)) & 0xff) #endif /* __LWIP_IP_ADDR_H__ */ - - - - - - diff --git a/wii/libogc/include/ipv4/lwip/ip_frag.h b/wii/libogc/include/ipv4/lwip/ip_frag.h index 4a932d960b..f5c9c40bce 100644 --- a/wii/libogc/include/ipv4/lwip/ip_frag.h +++ b/wii/libogc/include/ipv4/lwip/ip_frag.h @@ -43,5 +43,3 @@ struct pbuf * ip_reass(struct pbuf *p); err_t ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest); #endif /* __LWIP_IP_FRAG_H__ */ - - diff --git a/wii/libogc/include/lwip/api.h b/wii/libogc/include/lwip/api.h index ad1002c375..03e0a06dec 100644 --- a/wii/libogc/include/lwip/api.h +++ b/wii/libogc/include/lwip/api.h @@ -97,5 +97,3 @@ struct netconn { }; #endif /* __LWIP_API_H__ */ - - diff --git a/wii/libogc/include/lwip/api_msg.h b/wii/libogc/include/lwip/api_msg.h index 1f03120f1a..d297afa061 100644 --- a/wii/libogc/include/lwip/api_msg.h +++ b/wii/libogc/include/lwip/api_msg.h @@ -83,4 +83,3 @@ struct api_msg { }; #endif /* __LWIP_API_MSG_H__ */ - diff --git a/wii/libogc/include/lwip/arch.h b/wii/libogc/include/lwip/arch.h index 3a831d07d5..a27b2467eb 100644 --- a/wii/libogc/include/lwip/arch.h +++ b/wii/libogc/include/lwip/arch.h @@ -54,8 +54,6 @@ #define PACK_STRUCT_FIELD(x) x #endif /* PACK_STRUCT_FIELD */ - - #ifdef LWIP_PROVIDE_ERRNO #define EPERM 1 /* Operation not permitted */ @@ -186,7 +184,6 @@ #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ - #define ENSROK 0 /* DNS server returned answer with no data */ #define ENSRNODATA 160 /* DNS server returned answer with no data */ #define ENSRFORMERR 161 /* DNS server claims query was misformatted */ diff --git a/wii/libogc/include/lwip/debug.h b/wii/libogc/include/lwip/debug.h index 8555b938ed..0cb4dda4d2 100644 --- a/wii/libogc/include/lwip/debug.h +++ b/wii/libogc/include/lwip/debug.h @@ -82,9 +82,3 @@ #endif /* LWIP_DEBUG */ #endif /* __LWIP_DEBUG_H__ */ - - - - - - diff --git a/wii/libogc/include/lwip/def.h b/wii/libogc/include/lwip/def.h index b1da6d7291..24432639db 100644 --- a/wii/libogc/include/lwip/def.h +++ b/wii/libogc/include/lwip/def.h @@ -42,6 +42,4 @@ #define NULL ((void *)0) #endif - #endif /* __LWIP_DEF_H__ */ - diff --git a/wii/libogc/include/lwip/dhcp.h b/wii/libogc/include/lwip/dhcp.h index 04d72568c4..22efb24969 100644 --- a/wii/libogc/include/lwip/dhcp.h +++ b/wii/libogc/include/lwip/dhcp.h @@ -201,7 +201,6 @@ void dhcp_fine_tmr(void); #define DHCP_OPTION_MESSAGE_TYPE 53 /* RFC 2132 9.6, important for DHCP */ #define DHCP_OPTION_MESSAGE_TYPE_LEN 1 - #define DHCP_OPTION_SERVER_ID 54 /* RFC 2132 9.7, server IP address */ #define DHCP_OPTION_PARAMETER_REQUEST_LIST 55 /* RFC 2132 9.8, requested option types */ diff --git a/wii/libogc/include/lwip/err.h b/wii/libogc/include/lwip/err.h index 217ffed4bf..a907e81820 100644 --- a/wii/libogc/include/lwip/err.h +++ b/wii/libogc/include/lwip/err.h @@ -44,7 +44,6 @@ typedef s8_t err_t; #define ERR_MEM -1 /* Out of memory error. */ #define ERR_BUF -2 /* Buffer error. */ - #define ERR_ABRT -3 /* Connection aborted. */ #define ERR_RST -4 /* Connection reset. */ #define ERR_CLSD -5 /* Connection closed. */ @@ -61,7 +60,6 @@ typedef s8_t err_t; #define ERR_IF -11 /* Low-level netif error */ #define ERR_ISCONN -12 /* Already connected. */ - #ifdef LWIP_DEBUG extern char *lwip_strerr(err_t err); #else diff --git a/wii/libogc/include/lwip/lwipopts.h b/wii/libogc/include/lwip/lwipopts.h index 7313a3c6bc..fc7f3c6f3d 100644 --- a/wii/libogc/include/lwip/lwipopts.h +++ b/wii/libogc/include/lwip/lwipopts.h @@ -149,7 +149,6 @@ a lot of data that needs to be copied, this should be set high. */ /* ---------- ICMP options ---------- */ #define ICMP_TTL 255 - /* ---------- DHCP options ---------- */ /* Define LWIP_DHCP to 1 if you want DHCP configuration of interfaces. DHCP is not implemented in lwIP 0.5.1, however, so @@ -216,5 +215,4 @@ a lot of data that needs to be copied, this should be set high. */ #define DBG_MIN_LEVEL DBG_LEVEL_OFF #endif - #endif /* __LWIPOPTS_H__ */ diff --git a/wii/libogc/include/lwip/mem.h b/wii/libogc/include/lwip/mem.h index ae6db434ab..6c617d8f56 100644 --- a/wii/libogc/include/lwip/mem.h +++ b/wii/libogc/include/lwip/mem.h @@ -41,7 +41,6 @@ typedef u32_t mem_size_t; typedef u16_t mem_size_t; #endif /* MEM_SIZE > 64000 */ - void mem_init(void); void *mem_malloc(mem_size_t size); @@ -58,4 +57,3 @@ void *mem_reallocm(void *mem, mem_size_t size); #endif #endif /* __LWIP_MEM_H__ */ - diff --git a/wii/libogc/include/lwip/memp.h b/wii/libogc/include/lwip/memp.h index 7643f9f01e..7ddd273207 100644 --- a/wii/libogc/include/lwip/memp.h +++ b/wii/libogc/include/lwip/memp.h @@ -60,4 +60,3 @@ void *memp_realloc(memp_t fromtype, memp_t totype, void *mem); void memp_free(memp_t type, void *mem); #endif /* __LWIP_MEMP_H__ */ - diff --git a/wii/libogc/include/lwip/opt.h b/wii/libogc/include/lwip/opt.h index 4e7f0d84c4..e36fda4298 100644 --- a/wii/libogc/include/lwip/opt.h +++ b/wii/libogc/include/lwip/opt.h @@ -152,8 +152,6 @@ a lot of data that needs to be copied, this should be set high. */ #define PBUF_LINK_HLEN 14 #endif - - /* ---------- ARP options ---------- */ /** Number of active hardware address, IP address pairs cached */ @@ -274,7 +272,6 @@ a lot of data that needs to be copied, this should be set high. */ #define TCP_SYNMAXRTX 6 #endif - /* Controls if TCP should queue segments that arrive out of order. Define to 0 if your device is low on memory. */ #ifndef TCP_QUEUE_OOSEQ @@ -297,7 +294,6 @@ a lot of data that needs to be copied, this should be set high. */ #define TCP_SND_QUEUELEN 4 * TCP_SND_BUF/TCP_MSS #endif - /* Maximum number of retransmissions of data segments. */ /* Maximum number of retransmissions of SYN segments. */ @@ -326,7 +322,6 @@ a lot of data that needs to be copied, this should be set high. */ #define LWIP_COMPAT_SOCKETS 1 #endif - #ifndef TCPIP_THREAD_PRIO #define TCPIP_THREAD_PRIO 1 #endif @@ -343,14 +338,12 @@ a lot of data that needs to be copied, this should be set high. */ #define DEFAULT_THREAD_PRIO 1 #endif - /* ---------- Socket Options ---------- */ /* Enable SO_REUSEADDR and SO_REUSEPORT options */ #ifndef SO_REUSE # define SO_REUSE 0 #endif - /* ---------- Statistics options ---------- */ #ifndef LWIP_STATS #define LWIP_STATS 1 @@ -433,8 +426,6 @@ a lot of data that needs to be copied, this should be set high. */ #define NUM_PPP 1 /* Max PPP sessions. */ - - #ifndef PAP_SUPPORT #define PAP_SUPPORT 0 /* Set for PAP. */ #endif @@ -455,7 +446,6 @@ a lot of data that needs to be copied, this should be set high. */ #define MD5_SUPPORT 0 /* Set for MD5 (see also CHAP) */ #endif - /* * Timeouts. */ @@ -470,7 +460,6 @@ a lot of data that needs to be copied, this should be set high. */ #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */ #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ - /* Interval in seconds between keepalive echo requests, 0 to disable. */ #if 1 #define LCP_ECHOINTERVAL 0 @@ -504,7 +493,6 @@ a lot of data that needs to be copied, this should be set high. */ #define PPP_DEFMRU 296 /* Try for this */ #define PPP_MINMRU 128 /* No MRUs below this */ - #define MAXNAMELEN 256 /* max length of hostname or name for auth */ #define MAXSECRETLEN 256 /* max length of password or secret */ @@ -658,12 +646,8 @@ a lot of data that needs to be copied, this should be set high. */ #define DHCP_DEBUG DBG_OFF #endif - #ifndef DBG_MIN_LEVEL #define DBG_MIN_LEVEL DBG_LEVEL_OFF #endif #endif /* __LWIP_OPT_H__ */ - - - diff --git a/wii/libogc/include/lwip/pbuf.h b/wii/libogc/include/lwip/pbuf.h index 4039fd71c3..b7509bb7a8 100644 --- a/wii/libogc/include/lwip/pbuf.h +++ b/wii/libogc/include/lwip/pbuf.h @@ -35,7 +35,6 @@ #include "arch/cc.h" - #define PBUF_TRANSPORT_HLEN 20 #define PBUF_IP_HLEN 20 diff --git a/wii/libogc/include/lwip/raw.h b/wii/libogc/include/lwip/raw.h index 6f7a98717f..ef6478e60a 100644 --- a/wii/libogc/include/lwip/raw.h +++ b/wii/libogc/include/lwip/raw.h @@ -70,5 +70,4 @@ err_t raw_send (struct raw_pcb *pcb, struct pbuf *p); u8_t raw_input (struct pbuf *p, struct netif *inp); void raw_init (void); - #endif /* __LWIP_RAW_H__ */ diff --git a/wii/libogc/include/lwip/sockets.h b/wii/libogc/include/lwip/sockets.h index 9f5cec16ca..91beca3dbc 100644 --- a/wii/libogc/include/lwip/sockets.h +++ b/wii/libogc/include/lwip/sockets.h @@ -30,7 +30,6 @@ * */ - #ifndef __LWIP_SOCKETS_H__ #define __LWIP_SOCKETS_H__ #include "lwip/ip_addr.h" @@ -53,7 +52,6 @@ struct sockaddr { # define socklen_t int #endif - #define SOCK_STREAM 1 #define SOCK_DGRAM 2 #define SOCK_RAW 3 @@ -86,8 +84,6 @@ struct sockaddr { #define SO_ERROR 0x1007 /* get error status and clear */ #define SO_TYPE 0x1008 /* get socket type */ - - /* * Structure used for manipulating linger option. */ @@ -101,7 +97,6 @@ struct linger { */ #define SOL_SOCKET 0xfff /* options for socket level */ - #define AF_UNSPEC 0 #define AF_INET 2 #define PF_INET AF_INET @@ -117,14 +112,12 @@ struct linger { /* Flags we can use with send and recv. */ #define MSG_DONTWAIT 0x40 /* Nonblocking i/o for this operation only */ - /* * Options for level IPPROTO_IP */ #define IP_TOS 1 #define IP_TTL 2 - #define IPTOS_TOS_MASK 0x1E #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) #define IPTOS_LOWDELAY 0x10 @@ -147,7 +140,6 @@ struct linger { #define IPTOS_PREC_PRIORITY 0x20 #define IPTOS_PREC_ROUTINE 0x00 - /* * Commands for ioctlsocket(), taken from the BSD file fcntl.h. * @@ -268,4 +260,3 @@ int lwip_ioctl(int s, long cmd, void *argp); #endif /* LWIP_COMPAT_SOCKETS */ #endif /* __LWIP_SOCKETS_H__ */ - diff --git a/wii/libogc/include/lwip/stats.h b/wii/libogc/include/lwip/stats.h index a0468d3867..5b7137a4e6 100644 --- a/wii/libogc/include/lwip/stats.h +++ b/wii/libogc/include/lwip/stats.h @@ -99,7 +99,6 @@ struct stats_ { extern struct stats_ lwip_stats; - void stats_init(void); #define STATS_INC(x) ++lwip_stats.x @@ -152,7 +151,3 @@ void stats_display(void); #endif #endif /* __LWIP_STATS_H__ */ - - - - diff --git a/wii/libogc/include/lwip/sys.h b/wii/libogc/include/lwip/sys.h index 8ce1359642..6c07ff4693 100644 --- a/wii/libogc/include/lwip/sys.h +++ b/wii/libogc/include/lwip/sys.h @@ -36,7 +36,6 @@ #include "lwip/opt.h" - #if NO_SYS /* For a totally minimal and standalone system, we provide null @@ -118,7 +117,6 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout); void sys_mbox_free(sys_mbox_t mbox); void sys_mbox_fetch(sys_mbox_t mbox, void **msg); - /* Thread functions. */ sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio); diff --git a/wii/libogc/include/lwip/tcp.h b/wii/libogc/include/lwip/tcp.h index 5812280cb8..c36392b06d 100644 --- a/wii/libogc/include/lwip/tcp.h +++ b/wii/libogc/include/lwip/tcp.h @@ -99,7 +99,6 @@ void tcp_setprio (struct tcp_pcb *pcb, u8_t prio); void tcp_slowtmr (void); void tcp_fasttmr (void); - /* Only used by IP to pass a TCP segment to TCP: */ void tcp_input (struct pbuf *p, struct netif *inp); /* Used within the TCP code only: */ @@ -107,8 +106,6 @@ err_t tcp_output (struct tcp_pcb *pcb); void tcp_rexmit (struct tcp_pcb *pcb); void tcp_rexmit_rto (struct tcp_pcb *pcb); - - #define TCP_SEQ_LT(a,b) ((s32_t)((a)-(b)) < 0) #define TCP_SEQ_LEQ(a,b) ((s32_t)((a)-(b)) <= 0) #define TCP_SEQ_GT(a,b) ((s32_t)((a)-(b)) > 0) @@ -166,7 +163,6 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb); #define TCP_KEEPCNT 9 /* Counter for KEEPALIVE probes */ #define TCP_MAXIDLE TCP_KEEPCNT * TCP_KEEPINTVL /* Maximum KEEPALIVE probe time */ - #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -277,7 +273,6 @@ struct tcp_pcb { u16_t snd_buf; /* Available buffer space for sending (in bytes). */ u16_t snd_queuelen; /* Available buffer space for sending (in tcp_segs). */ - /* These are ordered by sequence number: */ struct tcp_seg *unsent; /* Unsent (queued) segments. */ struct tcp_seg *unacked; /* Sent but unacknowledged segments. */ @@ -528,6 +523,3 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */ } while(0) #endif /* LWIP_DEBUG */ #endif /* __LWIP_TCP_H__ */ - - - diff --git a/wii/libogc/include/lwip/udp.h b/wii/libogc/include/lwip/udp.h index 1460a6394a..9badba8839 100644 --- a/wii/libogc/include/lwip/udp.h +++ b/wii/libogc/include/lwip/udp.h @@ -100,5 +100,3 @@ void udp_debug_print(struct udp_hdr *udphdr); #define udp_debug_print(udphdr) #endif #endif /* __LWIP_UDP_H__ */ - - diff --git a/wii/libogc/include/netif/arch/cc.h b/wii/libogc/include/netif/arch/cc.h index 8e22488d23..f945b7b6db 100644 --- a/wii/libogc/include/netif/arch/cc.h +++ b/wii/libogc/include/netif/arch/cc.h @@ -48,7 +48,6 @@ typedef u32 u32_t; typedef s32 s32_t; typedef u32 mem_ptr_t; - #define PACK_STRUCT_FIELD(x) x #define PACK_STRUCT_STRUCT __attribute__((packed)) #define PACK_STRUCT_BEGIN @@ -69,5 +68,4 @@ typedef u32 mem_ptr_t; #define S32_F "d" #define X32_F "x" - #endif /* __ARCH_CC_H__ */ diff --git a/wii/libogc/include/netif/arch/init.h b/wii/libogc/include/netif/arch/init.h index 40098c71b9..0cd80cb217 100644 --- a/wii/libogc/include/netif/arch/init.h +++ b/wii/libogc/include/netif/arch/init.h @@ -40,7 +40,3 @@ void tcpip_init_done(void *); int wait_for_tcpip_init(void); #endif /* __ARCH_INIT_H__ */ - - - - diff --git a/wii/libogc/include/network.h b/wii/libogc/include/network.h index 91a526d1f1..dd6fcca4bd 100644 --- a/wii/libogc/include/network.h +++ b/wii/libogc/include/network.h @@ -40,8 +40,6 @@ #define SO_ERROR 0x1007 /* get error status and clear */ #define SO_TYPE 0x1008 /* get socket type */ - - /* * Structure used for manipulating linger option. */ @@ -76,7 +74,6 @@ struct linger { #define IP_TOS 1 #define IP_TTL 2 - #define IPTOS_TOS_MASK 0x1E #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) #define IPTOS_LOWDELAY 0x10 @@ -99,7 +96,6 @@ struct linger { #define IPTOS_PREC_PRIORITY 0x20 #define IPTOS_PREC_ROUTINE 0x00 - /* * Commands for ioctlsocket(), taken from the BSD file fcntl.h. * diff --git a/wii/libogc/include/ogc/aram.h b/wii/libogc/include/ogc/aram.h index df59ea1fc5..12beeb8f28 100644 --- a/wii/libogc/include/ogc/aram.h +++ b/wii/libogc/include/ogc/aram.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __ARAM_H__ #define __ARAM_H__ @@ -39,7 +38,6 @@ distribution. #include - /*! * \addtogroup dmamode ARAM DMA transfer direction * @{ @@ -52,8 +50,6 @@ distribution. * @} */ - - /*! * \addtogroup memmode ARAM memory access modes * @{ @@ -66,12 +62,10 @@ distribution. * @} */ - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /*! * \typedef void (*ARCallback)(void) * \brief function pointer typedef for the user's ARAM interrupt callback @@ -80,7 +74,6 @@ distribution. */ typedef void (*ARCallback)(void); - /*! * \fn ARCallback AR_RegisterCallback(ARCallback callback) * \brief Register the given function as a DMA callback @@ -93,7 +86,6 @@ typedef void (*ARCallback)(void); */ ARCallback AR_RegisterCallback(ARCallback callback); - /*! * \fn u32 AR_GetDMAStatus() * \brief Get current status of DMA @@ -102,7 +94,6 @@ ARCallback AR_RegisterCallback(ARCallback callback); */ u32 AR_GetDMAStatus(); - /*! * \fn u32 AR_Init(u32 *stack_idx_array,u32 num_entries) * \brief Initializes ARAM subsystem. @@ -146,7 +137,6 @@ u32 AR_GetDMAStatus(); */ u32 AR_Init(u32 *stack_idx_array,u32 num_entries); - /*! * \fn void AR_StartDMA(u32 dir,u32 memaddr,u32 aramaddr,u32 len) * \brief Initiates a DMA between main memory and ARAM. @@ -166,7 +156,6 @@ u32 AR_Init(u32 *stack_idx_array,u32 num_entries); */ void AR_StartDMA(u32 dir,u32 memaddr,u32 aramaddr,u32 len); - /*! * \fn u32 AR_Alloc(u32 len) * \brief Allocate a block of memory from ARAM having len bytes. @@ -179,7 +168,6 @@ void AR_StartDMA(u32 dir,u32 memaddr,u32 aramaddr,u32 len); */ u32 AR_Alloc(u32 len); - /*! * \fn u32 AR_Free(u32 *len) * \brief Free a block from ARAM @@ -190,7 +178,6 @@ u32 AR_Alloc(u32 len); */ u32 AR_Free(u32 *len); - /*! * \fn void AR_Clear(u32 flag) * \brief Clear ARAM memory @@ -201,7 +188,6 @@ u32 AR_Free(u32 *len); */ void AR_Clear(u32 flag); - /*! * \fn BOOL AR_CheckInit() * \brief Get the ARAM subsystem initialization flag @@ -211,7 +197,6 @@ void AR_Clear(u32 flag); */ BOOL AR_CheckInit(); - /*! * \fn void AR_Reset() * \brief Clears the ARAM subsystem initialization flag. @@ -222,7 +207,6 @@ BOOL AR_CheckInit(); */ void AR_Reset(); - /*! * \fn u32 AR_GetSize() * \brief Get the total size - in bytes - of ARAM as calculated during AR_Init() @@ -231,7 +215,6 @@ void AR_Reset(); */ u32 AR_GetSize(); - /*! * \fn u32 AR_GetBaseAddress() * \brief Get the baseaddress of ARAM memory @@ -240,7 +223,6 @@ u32 AR_GetSize(); */ u32 AR_GetBaseAddress(); - /*! * \fn u32 AR_GetInternalSize() * \brief Get the size of the internal ARAM memory @@ -249,7 +231,6 @@ u32 AR_GetBaseAddress(); */ u32 AR_GetInternalSize(); - /*! * \def AR_StartDMARead(maddr,araddr,tlen) * \brief Wraps the DMA read operation done by AR_StartDMA() @@ -257,7 +238,6 @@ u32 AR_GetInternalSize(); #define AR_StartDMARead(maddr,araddr,tlen) \ AR_StartDMA(AR_ARAMTOMRAM,maddr,araddr,tlen); - /*! * \def AR_StartDMAWrite(maddr,araddr,tlen) * \brief Wraps the DMA write operation done by AR_StartDMA() diff --git a/wii/libogc/include/ogc/arqmgr.h b/wii/libogc/include/ogc/arqmgr.h index 64e4259eca..5399212375 100644 --- a/wii/libogc/include/ogc/arqmgr.h +++ b/wii/libogc/include/ogc/arqmgr.h @@ -1,6 +1,5 @@ /*------------------------------------------------------------- - arqmgr.h -- ARAM task queue management Copyright (C) 2004 @@ -26,28 +25,23 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #ifndef __ARQMGR_H__ #define __ARQMGR_H__ - /*! * \file arqmgr.h * \brief ARAM queue managemnt subsystem * */ - #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /*! * \typedef void (*ARQMCallback)() * \brief function pointer typedef for the user's callback when ARAM operation has completed @@ -55,7 +49,6 @@ distribution. */ typedef void (*ARQMCallback)(s32 result); - /*! * \fn void ARQM_Init(u32 arambase,s32 len) * \brief Initialize the ARAM queue management system @@ -67,7 +60,6 @@ typedef void (*ARQMCallback)(s32 result); */ void ARQM_Init(u32 arambase,s32 len); - /*! * \fn u32 ARQM_PushData(void *buff,s32 len) * \brief Push the data onto the ARAM queue @@ -79,7 +71,6 @@ void ARQM_Init(u32 arambase,s32 len); */ u32 ARQM_PushData(void *buffer,s32 len); - /*! * \fn u32 ARQM_GetZeroBuffer() * \brief Returns ARAM address of 'zero buffer' @@ -88,7 +79,6 @@ u32 ARQM_PushData(void *buffer,s32 len); */ u32 ARQM_GetZeroBuffer(); - /*! * \fn u32 ARQM_GetStackPointer() * \brief Return the ARAM address of the next free stack pointer @@ -97,7 +87,6 @@ u32 ARQM_GetZeroBuffer(); */ u32 ARQM_GetStackPointer(); - /*! * \fn u32 ARQM_GetFreeSize() * \brief Return Returns remaining number of bytes on stack diff --git a/wii/libogc/include/ogc/arqueue.h b/wii/libogc/include/ogc/arqueue.h index 137e92978b..0c7d94cb14 100644 --- a/wii/libogc/include/ogc/arqueue.h +++ b/wii/libogc/include/ogc/arqueue.h @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #ifndef __ARQUEUE_H__ #define __ARQUEUE_H__ @@ -67,7 +65,6 @@ struct _arq_request { void ARQ_Init(); void ARQ_Reset(); - /*! * \fn void ARQ_PostRequest(ARQRequest *req,u32 owner,u32 dir,u32 prio,u32 aram_addr,u32 mram_addr,u32 len) * \brief Enqueue a ARAM DMA transfer request. @@ -85,7 +82,6 @@ void ARQ_Reset(); */ void ARQ_PostRequest(ARQRequest *req,u32 owner,u32 dir,u32 prio,u32 aram_addr,u32 mram_addr,u32 len); - /*! * \fn void ARQ_PostRequestAsync(ARQRequest *req,u32 owner,u32 dir,u32 prio,u32 aram_addr,u32 mram_addr,u32 len,ARQCallback cb) * \brief Enqueue a ARAM DMA transfer request. diff --git a/wii/libogc/include/ogc/audio.h b/wii/libogc/include/ogc/audio.h index c37fe3cf28..e7aa109d9e 100644 --- a/wii/libogc/include/ogc/audio.h +++ b/wii/libogc/include/ogc/audio.h @@ -25,11 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - - -------------------------------------------------------------*/ - #ifndef __AUDIO_H__ #define __AUDIO_H__ @@ -52,8 +49,6 @@ distribution. * @} */ - - /*! * \addtogroup ai_sample_rates AI sampling rates * @{ @@ -78,7 +73,6 @@ distribution. */ typedef void (*AIDCallback)(void); - /*! * \typedef void (*AISCallback)(u32 smp_cnt) * \brief function pointer typedef for the user's Audio Streaming interrupt callback @@ -87,7 +81,6 @@ typedef void (*AIDCallback)(void); */ typedef void (*AISCallback)(u32 smp_cnt); - /*! * \fn AISCallback AUDIO_RegisterStreamCallback(AISCallback callback) * \brief Register a user callback function for the AUDIO streaming interface @@ -98,7 +91,6 @@ typedef void (*AISCallback)(u32 smp_cnt); */ AISCallback AUDIO_RegisterStreamCallback(AISCallback callback); - /*! * \fn void AUDIO_Init(u8 *stack) * \brief Initialize the AUDIO subsystem @@ -109,7 +101,6 @@ AISCallback AUDIO_RegisterStreamCallback(AISCallback callback); */ void AUDIO_Init(u8 *stack); - /*! * \fn void AUDIO_SetStreamVolLeft(u8 vol) * \brief Set streaming volume on the left channel. @@ -120,7 +111,6 @@ void AUDIO_Init(u8 *stack); */ void AUDIO_SetStreamVolLeft(u8 vol); - /*! * \fn u8 AUDIO_GetStreamVolLeft() * \brief Get streaming volume of the left channel. @@ -129,7 +119,6 @@ void AUDIO_SetStreamVolLeft(u8 vol); */ u8 AUDIO_GetStreamVolLeft(); - /*! * \fn void AUDIO_SetStreamVolRight(u8 vol) * \brief set streaming volume of the right channel. @@ -140,7 +129,6 @@ u8 AUDIO_GetStreamVolLeft(); */ void AUDIO_SetStreamVolRight(u8 vol); - /*! * \fn u8 AUDIO_GetStreamVolRight() * \brief Get streaming volume of the right channel. @@ -149,7 +137,6 @@ void AUDIO_SetStreamVolRight(u8 vol); */ u8 AUDIO_GetStreamVolRight(); - /*! * \fn void AUDIO_SetStreamSampleRate(u32 rate) * \brief Set streaming sample rate @@ -160,7 +147,6 @@ u8 AUDIO_GetStreamVolRight(); */ void AUDIO_SetStreamSampleRate(u32 rate); - /*! * \fn u32 AUDIO_GetStreamSampleRate() * \brief Get streaming sample rate @@ -169,7 +155,6 @@ void AUDIO_SetStreamSampleRate(u32 rate); */ u32 AUDIO_GetStreamSampleRate(); - /*! * \fn AIDCallback AUDIO_RegisterDMACallback(AIDCallback callback) * \brief Register a user callback function for the audio DMA interface. @@ -183,7 +168,6 @@ u32 AUDIO_GetStreamSampleRate(); */ AIDCallback AUDIO_RegisterDMACallback(AIDCallback callback); - /*! * \fn void AUDIO_InitDMA(u32 startaddr,u32 len) * \brief Initialize an audio DMA transfer @@ -195,7 +179,6 @@ AIDCallback AUDIO_RegisterDMACallback(AIDCallback callback); */ void AUDIO_InitDMA(u32 startaddr,u32 len); - /*! * \fn u16 AUDIO_GetDMAEnableFlag() * \brief Get the audio DMA flag @@ -204,7 +187,6 @@ void AUDIO_InitDMA(u32 startaddr,u32 len); */ u16 AUDIO_GetDMAEnableFlag(); - /*! * \fn void AUDIO_StartDMA() * \brief Start the audio DMA operation. @@ -216,7 +198,6 @@ u16 AUDIO_GetDMAEnableFlag(); */ void AUDIO_StartDMA(); - /*! * \fn void AUDIO_StopDMA() * \brief Stop the previously started audio DMA operation. @@ -225,7 +206,6 @@ void AUDIO_StartDMA(); */ void AUDIO_StopDMA(); - /*! * \fn u32 AUDIO_GetDMABytesLeft() * \brief Get the count of bytes, left to play, from the audio DMA interface @@ -234,7 +214,6 @@ void AUDIO_StopDMA(); */ u32 AUDIO_GetDMABytesLeft(); - /*! * \fn u32 AUDIO_GetDMALength() * \brief Get the DMA transfer length configured in the audio DMA interface. @@ -243,7 +222,6 @@ u32 AUDIO_GetDMABytesLeft(); */ u32 AUDIO_GetDMALength(); - /*! * \fn u32 AUDIO_GetDMAStartAddr() * \brief Get the main memory address for the DMA operation. @@ -252,7 +230,6 @@ u32 AUDIO_GetDMALength(); */ u32 AUDIO_GetDMAStartAddr(); - /*! * \fn void AUDIO_SetStreamTrigger(u32 cnt) * \brief Set the sample count for the stream trigger @@ -263,7 +240,6 @@ u32 AUDIO_GetDMAStartAddr(); */ void AUDIO_SetStreamTrigger(u32 cnt); - /*! * \fn void AUDIO_ResetStreamSampleCnt() * \brief Reset the stream sample count register. @@ -272,7 +248,6 @@ void AUDIO_SetStreamTrigger(u32 cnt); */ void AUDIO_ResetStreamSampleCnt(); - /*! * \fn void AUDIO_SetDSPSampleRate(u8 rate) * \brief Set the sampling rate for the DSP interface @@ -283,7 +258,6 @@ void AUDIO_ResetStreamSampleCnt(); */ void AUDIO_SetDSPSampleRate(u8 rate); - /*! * \fn u32 AUDIO_GetDSPSampleRate() * \brief Get the sampling rate for the DSP interface @@ -292,7 +266,6 @@ void AUDIO_SetDSPSampleRate(u8 rate); */ u32 AUDIO_GetDSPSampleRate(); - /*! * \fn void AUDIO_SetStreamPlayState(u32 state) * \brief Set the play state for the streaming audio interface @@ -303,7 +276,6 @@ u32 AUDIO_GetDSPSampleRate(); */ void AUDIO_SetStreamPlayState(u32 state); - /*! * \fn u32 AUDIO_GetStreamPlayState() * \brief Get the play state from the streaming audio interface diff --git a/wii/libogc/include/ogc/cache.h b/wii/libogc/include/ogc/cache.h index 0753956a1f..401a1460e0 100644 --- a/wii/libogc/include/ogc/cache.h +++ b/wii/libogc/include/ogc/cache.h @@ -1,6 +1,5 @@ /*------------------------------------------------------------- - cache.h -- Cache interface Copyright (C) 2004 @@ -26,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #ifndef __CACHE_H__ #define __CACHE_H__ @@ -47,7 +44,6 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! * \fn void DCEnable() * \brief Enable L1 d-cache @@ -56,7 +52,6 @@ distribution. */ void DCEnable(); - /*! * \fn void DCDisable() * \brief Disable L1 d-cache @@ -65,7 +60,6 @@ void DCEnable(); */ void DCDisable(); - /*! * \fn void DCFreeze() * \brief Current contents of the L1 d-cache are locked down and will not be cast out. @@ -77,7 +71,6 @@ void DCDisable(); */ void DCFreeze(); - /*! * \fn void DCUnfreeze() * \brief Undoes actions of DCFreeze(). @@ -89,7 +82,6 @@ void DCFreeze(); */ void DCUnfreeze(); - /*! * \fn void DCFlashInvalidate() * \brief Invalidate L1 d-cache. @@ -101,7 +93,6 @@ void DCUnfreeze(); */ void DCFlashInvalidate(); - /*! * \fn void DCInvalidateRange(void *startaddress,u32 len) * \brief Invalidates a given range of the d-cache. @@ -115,7 +106,6 @@ void DCFlashInvalidate(); */ void DCInvalidateRange(void *startaddress,u32 len); - /*! * \fn void DCFlushRange(void *startaddress,u32 len) * \brief Flushes a given range. @@ -143,7 +133,6 @@ void DCFlushRange(void *startaddress,u32 len); */ void DCStoreRange(void *startaddress,u32 len); - /*! * \fn void DCFlushRangeNoSync(void *startaddress,u32 len) * \brief Flushes a given range. @@ -158,7 +147,6 @@ void DCStoreRange(void *startaddress,u32 len); */ void DCFlushRangeNoSync(void *startaddress,u32 len); - /*! * \fn void DCStoreRangeNoSync(void *startaddress,u32 len) * \brief Ensures a range of memory is updated with any modified data in the cache. @@ -172,7 +160,6 @@ void DCFlushRangeNoSync(void *startaddress,u32 len); */ void DCStoreRangeNoSync(void *startaddress,u32 len); - /*! * \fn void DCZeroRange(void *startaddress,u32 len) * \brief Loads a range of memory into cache and zeroes all the cache lines. @@ -184,7 +171,6 @@ void DCStoreRangeNoSync(void *startaddress,u32 len); */ void DCZeroRange(void *startaddress,u32 len); - /*! * \fn void DCTouchRange(void *startaddress,u32 len) * \brief Loads a range of memory into cache. @@ -196,7 +182,6 @@ void DCZeroRange(void *startaddress,u32 len); */ void DCTouchRange(void *startaddress,u32 len); - /*! * \fn void ICSync() * \brief Performs an instruction cache synchronization. @@ -207,7 +192,6 @@ void DCTouchRange(void *startaddress,u32 len); */ void ICSync(); - /*! * \fn void ICFlashInvalidate() * \brief Invalidate the L1 i-cache. @@ -219,7 +203,6 @@ void ICSync(); */ void ICFlashInvalidate(); - /*! * \fn void ICEnable() * \brief Enable L1 i-cache @@ -228,7 +211,6 @@ void ICFlashInvalidate(); */ void ICEnable(); - /*! * \fn void ICDisable() * \brief Disable L1 i-cache @@ -237,7 +219,6 @@ void ICEnable(); */ void ICDisable(); - /*! * \fn void ICFreeze() * \brief Current contents of the L1 i-cache are locked down and will not be cast out. @@ -249,7 +230,6 @@ void ICDisable(); */ void ICFreeze(); - /*! * \fn void ICUnfreeze() * \brief Undoes actions of ICFreeze(). @@ -261,7 +241,6 @@ void ICFreeze(); */ void ICUnfreeze(); - /*! * \fn void ICBlockInvalidate(void *startaddress) * \brief Invalidates a block in the i-cache. @@ -274,7 +253,6 @@ void ICUnfreeze(); */ void ICBlockInvalidate(void *startaddress); - /*! * \fn void ICInvalidateRange(void *startaddress,u32 len) * \brief Invalidate a range in the L1 i-cache. diff --git a/wii/libogc/include/ogc/card.h b/wii/libogc/include/ogc/card.h index 65d5d07be6..d94c43320f 100644 --- a/wii/libogc/include/ogc/card.h +++ b/wii/libogc/include/ogc/card.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __CARD_H__ #define __CARD_H__ @@ -37,7 +36,6 @@ distribution. */ - #include /*! \addtogroup cardsolts Memory card slots @@ -49,7 +47,6 @@ distribution. /*! @} */ - #define CARD_WORKAREA (5*8*1024) /*!< minimum size of the workarea passed to Mount[Async]() */ #define CARD_READSIZE 512 /*!< minimum size of block to read from memory card */ #define CARD_FILENAMELEN 32 /*!< maximum filename length */ @@ -79,7 +76,6 @@ distribution. /*! @} */ - /* File attribute defines */ #define CARD_ATTRIB_PUBLIC 0x04 #define CARD_ATTRIB_NOCOPY 0x08 @@ -117,7 +113,6 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! \typedef struct _card_file card_file \brief structure to hold the fileinformations upon open and for later use. \param chn CARD slot. @@ -134,7 +129,6 @@ typedef struct _card_file { u16 iblock; } card_file; - /*! \typedef struct card_dir \brief structure to hold the information of a directory entry \param chn CARD slot. @@ -156,7 +150,6 @@ typedef struct _card_dir { bool showall; } card_dir; - /*! \typedef struct card_stat \brief structure to hold the additional statistical informations. \param filename[CARD_FILENAMELEN] name of the file on card. @@ -209,7 +202,6 @@ typedef struct _card_stat { */ typedef void (*cardcallback)(s32 chan,s32 result); - /*! \fn s32 CARD_Init(const char *gamecode,const char *company) \brief Performs the initialization of the memory card subsystem \param[in] gamecode pointer to a 4byte long string to specify the vendors game code. May be NULL @@ -219,7 +211,6 @@ typedef void (*cardcallback)(s32 chan,s32 result); */ s32 CARD_Init(const char *gamecode,const char *company); - /*! \fn s32 CARD_Probe(s32 chn) \brief Performs a check against the desired EXI channel if a device is inserted \param[in] chn CARD slot @@ -228,7 +219,6 @@ s32 CARD_Init(const char *gamecode,const char *company); */ s32 CARD_Probe(s32 chn); - /*! \fn s32 CARD_ProbeEx(s32 chn,s32 *mem_size,s32 *sect_size) \brief Performs a check against the desired EXI channel if a memory card is inserted or mounted \param[in] chn CARD slot @@ -239,7 +229,6 @@ s32 CARD_Probe(s32 chn); */ s32 CARD_ProbeEx(s32 chn,s32 *mem_size,s32 *sect_size); - /*! \fn s32 CARD_Mount(s32 chn,void *workarea,cardcallback detach_cb) \brief Mounts the memory card in the slot CHN. Synchronous version. \param[in] chn CARD slot @@ -250,7 +239,6 @@ s32 CARD_ProbeEx(s32 chn,s32 *mem_size,s32 *sect_size); */ s32 CARD_Mount(s32 chn,void *workarea,cardcallback detach_cb); - /*! \fn s32 CARD_MountAsync(s32 chn,void *workarea,cardcallback detach_cb,cardcallback attach_cb) \brief Mounts the memory card in the slot CHN. This function returns immediately. Asynchronous version. \param[in] chn CARD slot @@ -262,7 +250,6 @@ s32 CARD_Mount(s32 chn,void *workarea,cardcallback detach_cb); */ s32 CARD_MountAsync(s32 chn,void *workarea,cardcallback detach_cb,cardcallback attach_cb); - /*! \fn s32 CARD_Unmount(s32 chn) \brief Unmounts the memory card in the slot CHN and releases the EXI bus. \param[in] chn CARD slot @@ -271,7 +258,6 @@ s32 CARD_MountAsync(s32 chn,void *workarea,cardcallback detach_cb,cardcallback a */ s32 CARD_Unmount(s32 chn); - /*! \fn s32 CARD_Read(card_file *file,void *buffer,u32 len,u32 offset) \brief Reads the data from the file into the buffer from the given offset with the given length. Synchronous version \param[in] file pointer to the card_file structure. It holds the fileinformations to read from. @@ -283,7 +269,6 @@ s32 CARD_Unmount(s32 chn); */ s32 CARD_Read(card_file *file,void *buffer,u32 len,u32 offset); - /*! \fn s32 CARD_ReadAsync(card_file *file,void *buffer,u32 len,u32 offset,cardcallback callback) \brief Reads the data from the file into the buffer from the given offset with the given length. This function returns immediately. Asynchronous version \param[in] file pointer to the card_file structure. It holds the fileinformations to read from. @@ -296,7 +281,6 @@ s32 CARD_Read(card_file *file,void *buffer,u32 len,u32 offset); */ s32 CARD_ReadAsync(card_file *file,void *buffer,u32 len,u32 offset,cardcallback callback); - /*! \fn s32 CARD_Open(s32 chn,const char *filename,card_file *file) \brief Opens the file with the given filename and fills in the fileinformations. \param[in] chn CARD slot @@ -307,7 +291,6 @@ s32 CARD_ReadAsync(card_file *file,void *buffer,u32 len,u32 offset,cardcallback */ s32 CARD_Open(s32 chn,const char *filename,card_file *file); - /*! \fn s32 CARD_OpenEntry(s32 chn,card_dir *entry,card_file *file) \brief Opens the file with the given filename and fills in the fileinformations. \param[in] chn CARD slot @@ -318,7 +301,6 @@ s32 CARD_Open(s32 chn,const char *filename,card_file *file); */ s32 CARD_OpenEntry(s32 chn,card_dir *entry,card_file *file); - /*! \fn s32 CARD_Close(card_file *file) \brief Closes the file with the given card_file structure and releases the handle. \param[in] file pointer to the card_file structure to close. @@ -327,7 +309,6 @@ s32 CARD_OpenEntry(s32 chn,card_dir *entry,card_file *file); */ s32 CARD_Close(card_file *file); - /*! \fn s32 CARD_Create(s32 chn,const char *filename,u32 size,card_file *file) \brief Creates a new file with the given filename and fills in the fileinformations. Synchronous version. \param[in] chn CARD slot @@ -339,7 +320,6 @@ s32 CARD_Close(card_file *file); */ s32 CARD_Create(s32 chn,const char *filename,u32 size,card_file *file); - /*! \fn s32 CARD_CreateAsync(s32 chn,const char *filename,u32 size,card_file *file,cardcallback callback) \brief Creates a new file with the given filename and fills in the fileinformations. This function returns immediately. Asynchronous version. \param[in] chn CARD slot @@ -352,7 +332,6 @@ s32 CARD_Create(s32 chn,const char *filename,u32 size,card_file *file); */ s32 CARD_CreateAsync(s32 chn,const char *filename,u32 size,card_file *file,cardcallback callback); - /*! \fn s32 CARD_CreateEntry(s32 chn,card_dir *entry,card_file *file) \brief Creates a new file with the given filename and fills in the fileinformations. Synchronous version. \param[in] chn CARD slot @@ -363,7 +342,6 @@ s32 CARD_CreateAsync(s32 chn,const char *filename,u32 size,card_file *file,cardc */ s32 CARD_CreateEntry(s32 chn,card_dir *direntry,card_file *file); - /*! \fn s32 CARD_CreateEntryAsync(s32 chn,card_dir *entry,card_file *file,cardcallback callback) \brief Creates a new file with the given filename and fills in the fileinformations. This function returns immediately. Asynchronous version. \param[in] chn CARD slot @@ -375,7 +353,6 @@ s32 CARD_CreateEntry(s32 chn,card_dir *direntry,card_file *file); */ s32 CARD_CreateEntryAsync(s32 chn,card_dir *direntry,card_file *file,cardcallback callback); - /*! \fn s32 CARD_Delete(s32 chn,const char *filename) \brief Deletes a file with the given filename. Synchronous version. \param[in] chn CARD slot @@ -385,7 +362,6 @@ s32 CARD_CreateEntryAsync(s32 chn,card_dir *direntry,card_file *file,cardcallbac */ s32 CARD_Delete(s32 chn,const char *filename); - /*! \fn s32 CARD_DeleteAsync(s32 chn,const char *filename,cardcallback callback) \brief Deletes a file with the given filename. This function returns immediately. Asynchronous version. \param[in] chn CARD slot @@ -396,7 +372,6 @@ s32 CARD_Delete(s32 chn,const char *filename); */ s32 CARD_DeleteAsync(s32 chn,const char *filename,cardcallback callback); - /*! \fn s32 CARD_DeleteEntry(s32 chn,card_dir *dir_entry) \brief Deletes a file with the given directory entry informations. \param[in] chn CARD slot @@ -406,7 +381,6 @@ s32 CARD_DeleteAsync(s32 chn,const char *filename,cardcallback callback); */ s32 CARD_DeleteEntry(s32 chn,card_dir *dir_entry); - /*! \fn s32 CARD_DeleteEntryAsync(s32 chn,card_dir *dir_entry,cardcallback callback) \brief Deletes a file with the given directory entry informations. This function returns immediately. Asynchronous version. \param[in] chn CARD slot @@ -417,7 +391,6 @@ s32 CARD_DeleteEntry(s32 chn,card_dir *dir_entry); */ s32 CARD_DeleteEntryAsync(s32 chn,card_dir *dir_entry,cardcallback callback); - /*! \fn s32 CARD_Write(card_file *file,void *buffer,u32 len,u32 offset) \brief Writes the data to the file from the buffer to the given offset with the given length. Synchronous version \param[in] file pointer to the card_file structure which holds the fileinformations. @@ -429,7 +402,6 @@ s32 CARD_DeleteEntryAsync(s32 chn,card_dir *dir_entry,cardcallback callback); */ s32 CARD_Write(card_file *file,void *buffer,u32 len,u32 offset); - /*! \fn s32 CARD_WriteAsync(card_file *file,void *buffer,u32 len,u32 offset,cardcallback callback) \brief Writes the data to the file from the buffer to the given offset with the given length. This function returns immediately. Asynchronous version \param[in] file pointer to the card_file structure which holds the fileinformations. @@ -442,7 +414,6 @@ s32 CARD_Write(card_file *file,void *buffer,u32 len,u32 offset); */ s32 CARD_WriteAsync(card_file *file,void *buffer,u32 len,u32 offset,cardcallback callback); - /*! \fn s32 CARD_GetErrorCode(s32 chn) \brief Returns the result code from the last operation. \param[in] chn CARD slot @@ -451,7 +422,6 @@ s32 CARD_WriteAsync(card_file *file,void *buffer,u32 len,u32 offset,cardcallback */ s32 CARD_GetErrorCode(s32 chn); - /*! \fn s32 CARD_FindFirst(s32 chn, card_dir *dir, bool showall) \brief Start to iterate thru the memory card's directory structure and returns the first directory entry. \param[in] chn CARD slot @@ -462,7 +432,6 @@ s32 CARD_GetErrorCode(s32 chn); */ s32 CARD_FindFirst(s32 chn, card_dir *dir, bool showall); - /*! \fn s32 CARD_FindNext(card_dir *dir) \brief Returns the next directory entry from the memory cards directory structure. \param[out] dir pointer to card_dir structure to receive the result set. @@ -471,7 +440,6 @@ s32 CARD_FindFirst(s32 chn, card_dir *dir, bool showall); */ s32 CARD_FindNext(card_dir *dir); - /*! \fn s32 CARD_GetDirectory(s32 chn, card_dir *dir_entries, s32 *count, bool showall) \brief Returns the directory entries. size of entries is max. 128. \param[in] chn CARD slot @@ -483,7 +451,6 @@ s32 CARD_FindNext(card_dir *dir); */ s32 CARD_GetDirectory(s32 chn, card_dir *dir_entries, s32 *count, bool showall); - /*! \fn s32 CARD_GetSectorSize(s32 chn,u32 *sector_size) \brief Returns the next directory entry from the memory cards directory structure. \param[in] chn CARD slot. @@ -493,7 +460,6 @@ s32 CARD_GetDirectory(s32 chn, card_dir *dir_entries, s32 *count, bool showall); */ s32 CARD_GetSectorSize(s32 chn,u32 *sector_size); - /*! \fn s32 CARD_GetBlockCount(s32 chn,u32 *block_count) \brief Returns the next directory entry from the memory cards directory structure. \param[in] chn CARD slot. @@ -503,7 +469,6 @@ s32 CARD_GetSectorSize(s32 chn,u32 *sector_size); */ s32 CARD_GetBlockCount(s32 chn,u32 *block_count); - /*! \fn s32 CARD_GetStatus(s32 chn,s32 fileno,card_stat *stats) \brief Get additional file statistic informations. \param[in] chn CARD slot. @@ -514,7 +479,6 @@ s32 CARD_GetBlockCount(s32 chn,u32 *block_count); */ s32 CARD_GetStatus(s32 chn,s32 fileno,card_stat *stats); - /*! \fn s32 CARD_SetStatus(s32 chn,s32 fileno,card_stat *stats) \brief Set additional file statistic informations. Synchronous version. \param[in] chn CARD slot. @@ -525,7 +489,6 @@ s32 CARD_GetStatus(s32 chn,s32 fileno,card_stat *stats); */ s32 CARD_SetStatus(s32 chn,s32 fileno,card_stat *stats); - /*! \fn s32 CARD_SetStatusAsync(s32 chn,s32 fileno,card_stat *stats,cardcallback callback) \brief Set additional file statistic informations. This function returns immediately. Asynchronous version. \param[in] chn CARD slot. @@ -537,7 +500,6 @@ s32 CARD_SetStatus(s32 chn,s32 fileno,card_stat *stats); */ s32 CARD_SetStatusAsync(s32 chn,s32 fileno,card_stat *stats,cardcallback callback); - /*! \fn s32 CARD_GetAttributes(s32 chn,s32 fileno,u8 *attr) \brief Get additional file attributes. Synchronous version. \param[in] chn CARD slot. @@ -548,7 +510,6 @@ s32 CARD_SetStatusAsync(s32 chn,s32 fileno,card_stat *stats,cardcallback callbac */ s32 CARD_GetAttributes(s32 chn,s32 fileno,u8 *attr); - /*! \fn s32 CARD_SetAttributes(s32 chn,s32 fileno,u8 attr) \brief Set additional file attributes. Synchronous version. \param[in] chn CARD slot. @@ -559,7 +520,6 @@ s32 CARD_GetAttributes(s32 chn,s32 fileno,u8 *attr); */ s32 CARD_SetAttributes(s32 chn,s32 fileno,u8 attr); - /*! \fn s32 CARD_SetAttributesAsync(s32 chn,s32 fileno,u8 attr,cardcallback callback) \brief Set additional file attributes. This function returns immediately. Asynchronous version. \param[in] chn CARD slot. @@ -580,7 +540,6 @@ s32 CARD_Format(s32 chn); */ s32 CARD_FormatAsync(s32 chn,cardcallback callback); - /*! \fn s32 CARD_SetCompany(const char *company) \brief Set additional file attributes. This function returns immediately. Asynchronous version. \param[in] chn CARD slot. @@ -589,7 +548,6 @@ s32 CARD_FormatAsync(s32 chn,cardcallback callback); */ s32 CARD_SetCompany(const char *company); - /*! \fn s32 CARD_SetGamecode(const char *gamecode) \brief Set additional file attributes. This function returns immediately. Asynchronous version. \param[in] chn CARD slot. diff --git a/wii/libogc/include/ogc/cast.h b/wii/libogc/include/ogc/cast.h index 49016dc3b4..4cbeb36bbc 100644 --- a/wii/libogc/include/ogc/cast.h +++ b/wii/libogc/include/ogc/cast.h @@ -85,7 +85,6 @@ static inline void CAST_SetGQR7(u32 type,u32 scale) __set_gqr(GQR7,val); } - /******************************************************************/ /* */ /* cast from int to float */ diff --git a/wii/libogc/include/ogc/cond.h b/wii/libogc/include/ogc/cond.h index 1d06bfb1b4..0468beeebe 100644 --- a/wii/libogc/include/ogc/cond.h +++ b/wii/libogc/include/ogc/cond.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __COND_H__ #define __COND_H__ @@ -45,13 +44,11 @@ distribution. extern "C" { #endif - /*! \typedef u32 cond_t \brief typedef for the condition variable handle */ typedef u32 cond_t; - /*! \fn s32 LWP_CondInit(cond_t *cond) \brief Initialize condition variable \param[out] cond pointer to the cond_t handle @@ -60,7 +57,6 @@ typedef u32 cond_t; */ s32 LWP_CondInit(cond_t *cond); - /*! \fn s32 LWP_CondWait(cond_t cond,mutex_t mutex) \brief Wait on condition variable. \param[in] cond handle to the cond_t structure @@ -70,7 +66,6 @@ s32 LWP_CondInit(cond_t *cond); */ s32 LWP_CondWait(cond_t cond,mutex_t mutex); - /*! \fn s32 LWP_CondSignal(cond_t cond) \brief Signal a specific thread waiting on this condition variable to wake up. \param[in] cond handle to the cond_t structure @@ -79,7 +74,6 @@ s32 LWP_CondWait(cond_t cond,mutex_t mutex); */ s32 LWP_CondSignal(cond_t cond); - /*! \fn s32 LWP_CondBroadcast(cond_t cond) \brief Broadcast all threads waiting on this condition variable to wake up. \param[in] cond handle to the cond_t structure @@ -88,7 +82,6 @@ s32 LWP_CondSignal(cond_t cond); */ s32 LWP_CondBroadcast(cond_t cond); - /*! \fn s32 LWP_CondTimedWait(cond_t cond,mutex_t mutex,const struct timespec *abstime) \brief Timed wait on a conditionvariable. \param[in] cond handle to the cond_t structure @@ -99,7 +92,6 @@ s32 LWP_CondBroadcast(cond_t cond); */ s32 LWP_CondTimedWait(cond_t cond,mutex_t mutex,const struct timespec *abstime); - /*! \fn s32 LWP_CondDestroy(cond_t cond) \brief Destroy condition variable, release all threads and handles blocked on that condition variable. \param[in] cond handle to the cond_t structure diff --git a/wii/libogc/include/ogc/disc_io.h b/wii/libogc/include/ogc/disc_io.h index f1650a0471..a558e6bfe6 100644 --- a/wii/libogc/include/ogc/disc_io.h +++ b/wii/libogc/include/ogc/disc_io.h @@ -33,7 +33,6 @@ #include #include - #define FEATURE_MEDIUM_CANREAD 0x00000001 #define FEATURE_MEDIUM_CANWRITE 0x00000002 #define FEATURE_GAMECUBE_SLOTA 0x00000010 diff --git a/wii/libogc/include/ogc/dsp.h b/wii/libogc/include/ogc/dsp.h index 743fd186db..57fc5a86a9 100644 --- a/wii/libogc/include/ogc/dsp.h +++ b/wii/libogc/include/ogc/dsp.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __DSP_H__ #define __DSP_H__ @@ -53,7 +52,6 @@ distribution. * @} */ - /*! * \addtogroup dsp_taskflag DSP task flags * \brief DSP task queue state flag indicating the task's current queue state. Multiple states are OR'd. @@ -72,27 +70,23 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! \typedef struct _dsp_task dsptask_t \brief forward typdef to struct _dsp_task. This struture holds certain DSP task information for execution. */ typedef struct _dsp_task dsptask_t; - /*! \typedef void (*DSPTaskCallback)(dsptask_t *task) \brief function pointer typedef for the user's DSP task callbacks \param[in] task pointer to the dsp_task structure. */ typedef void (*DSPTaskCallback)(dsptask_t *task); - /*! \typedef void (*DSPCallback)(void) \brief function pointer typedef for the user's DSP interrupt callback */ typedef void (*DSPCallback)(void); - /*! \typedef struct _dsp_task dsptask_t \param state current task \ref dsp_taskstate "state" set \param prio priority of the task @@ -137,7 +131,6 @@ struct _dsp_task { struct _dsp_task *prev; }; - /*! \fn void DSP_Init() \brief Initialize DSP subsystem. @@ -145,7 +138,6 @@ struct _dsp_task { */ void DSP_Init(); - /*! \fn u32 DSP_CheckMailTo() \brief Check if mail was sent to DSP @@ -153,7 +145,6 @@ void DSP_Init(); */ u32 DSP_CheckMailTo(); - /*! \fn u32 DSP_CheckMailFrom() \brief Check for mail from DSP @@ -161,7 +152,6 @@ u32 DSP_CheckMailTo(); */ u32 DSP_CheckMailFrom(); - /*! \fn u32 DSP_ReadMailFrom() \brief Read mail from DSP @@ -169,7 +159,6 @@ u32 DSP_CheckMailFrom(); */ u32 DSP_ReadMailFrom(); - /*! \fn void DSP_AssertInt() \brief Asserts the processor interface interrupt @@ -177,7 +166,6 @@ u32 DSP_ReadMailFrom(); */ void DSP_AssertInt(); - /*! \fn void DSP_SendMailTo(u32 mail) \brief Send mail to DSP \param[in] mail value to send @@ -186,7 +174,6 @@ void DSP_AssertInt(); */ void DSP_SendMailTo(u32 mail); - /*! \fn u32 DSP_ReadCPUtoDSP() \brief Read back CPU->DSP mailbox @@ -194,7 +181,6 @@ void DSP_SendMailTo(u32 mail); */ u32 DSP_ReadCPUtoDSP(); - /*! \fn dsptask_t* DSP_AddTask(dsptask_t *task) \brief Add a DSP task to the tasklist and start executing if necessary. \param[in] task pointer to a dsptask_t structure which holds all necessary values for DSP task execution. diff --git a/wii/libogc/include/ogc/dvd.h b/wii/libogc/include/ogc/dvd.h index 5fbbc6aa68..cf5cde358b 100644 --- a/wii/libogc/include/ogc/dvd.h +++ b/wii/libogc/include/ogc/dvd.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __DVD_H__ #define __DVD_H__ @@ -69,7 +68,6 @@ distribution. * @} */ - /*! * \addtogroup dvd_resetmode DVD reset modes * @{ @@ -83,7 +81,6 @@ distribution. * @} */ - /*! * \addtogroup dvd_motorctrlmode DVD motor control modes * @{ @@ -98,12 +95,10 @@ distribution. * @} */ - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /*! * \typedef struct _dvddiskid dvddiskid * \brief forward typedef for struct _dvddiskid @@ -141,14 +136,12 @@ struct _dvddiskid { */ typedef struct _dvdcmdblk dvdcmdblk; - /*! * \typedef void (*dvdcbcallback)(s32 result,dvdcmdblk *block) * \brief function pointer typedef for the user's operations callback */ typedef void (*dvdcbcallback)(s32 result,dvdcmdblk *block); - /*! * \typedef struct _dvdcmdblk dvdcmdblk * @@ -168,14 +161,12 @@ struct _dvdcmdblk { void *usrdata; }; - /*! * \typedef struct _dvddrvinfo dvddrvinfo * \brief forward typedef for struct _dvddrvinfo */ typedef struct _dvddrvinfo dvddrvinfo; - /*! * \typedef struct _dvddrvinfo dvddrvinfo * @@ -194,14 +185,12 @@ struct _dvddrvinfo { u8 pad[24]; }; - /*! * \typedef struct _dvdfileinfo dvdfileinfo * \brief forward typedef for struct _dvdfileinfo */ typedef struct _dvdfileinfo dvdfileinfo; - /*! * \typedef void (*dvdcallback)(s32 result,dvdfileinfo *info) * \brief function pointer typedef for the user's DVD operation callback @@ -211,7 +200,6 @@ typedef struct _dvdfileinfo dvdfileinfo; */ typedef void (*dvdcallback)(s32 result,dvdfileinfo *info); - /*! * \typedef struct _dvdfileinfo dvdfileinfo * @@ -224,7 +212,6 @@ struct _dvdfileinfo { dvdcallback cb; }; - /*! * \fn void DVD_Init() * \brief Initializes the DVD subsystem @@ -236,7 +223,6 @@ struct _dvdfileinfo { void DVD_Init(); void DVD_Pause(); - /*! * \fn void DVD_Reset(u32 reset_mode) * \brief Performs a reset of the drive and FW respectively. @@ -247,7 +233,6 @@ void DVD_Pause(); */ void DVD_Reset(u32 reset_mode); - /*! * \fn s32 DVD_Mount() * \brief Mounts the DVD drive. @@ -259,7 +244,6 @@ void DVD_Reset(u32 reset_mode); s32 DVD_Mount(); s32 DVD_GetDriveStatus(); - /*! * \fn s32 DVD_MountAsync(dvdcmdblk *block,dvdcbcallback cb) * \brief Mounts the DVD drive. @@ -282,7 +266,6 @@ s32 DVD_GetDriveStatus(); */ s32 DVD_MountAsync(dvdcmdblk *block,dvdcbcallback cb); - /*! * \fn s32 DVD_ControlDrive(dvdcmdblk *block,u32 cmd) * \brief Controls the drive's motor and behavior. @@ -296,7 +279,6 @@ s32 DVD_MountAsync(dvdcmdblk *block,dvdcbcallback cb); */ s32 DVD_ControlDrive(dvdcmdblk *block,u32 cmd); - /*! * \fn s32 DVD_ControlDriveAsync(dvdcmdblk *block,u32 cmd,dvdcbcallback cb) * \brief Controls the drive's motor and behavior. @@ -309,7 +291,6 @@ s32 DVD_ControlDrive(dvdcmdblk *block,u32 cmd); */ s32 DVD_ControlDriveAsync(dvdcmdblk *block,u32 cmd,dvdcbcallback cb); - /*! * \fn s32 DVD_SetGCMOffset(dvdcmdblk *block,u32 offset) * \brief Sets the offset to the GCM. Used for multigame discs. @@ -323,7 +304,6 @@ s32 DVD_ControlDriveAsync(dvdcmdblk *block,u32 cmd,dvdcbcallback cb); */ s32 DVD_SetGCMOffset(dvdcmdblk *block,s64 offset); - /*! * \fn s32 DVD_SetGCMOffsetAsync(dvdcmdblk *block,u32 offset,dvdcbcallback cb) * \brief Sets the offset to the GCM. Used for multigame discs. diff --git a/wii/libogc/include/ogc/exi.h b/wii/libogc/include/ogc/exi.h index 57b484c44d..48e832ea50 100644 --- a/wii/libogc/include/ogc/exi.h +++ b/wii/libogc/include/ogc/exi.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __EXI_H__ #define __EXI_H__ @@ -37,7 +36,6 @@ distribution. */ - #include "gctypes.h" /*! @@ -53,7 +51,6 @@ distribution. * @} */ - /*! * \addtogroup exi_channels EXI channels * @{ @@ -68,7 +65,6 @@ distribution. * @} */ - /*! * \addtogroup exi_devices EXI devices * @{ @@ -83,7 +79,6 @@ distribution. * @} */ - /*! * \addtogroup exi_speed EXI device frequencies * @{ @@ -100,7 +95,6 @@ distribution. * @} */ - /*! * \addtogroup exi_flags EXI device operation flags * @{ @@ -116,7 +110,6 @@ distribution. * @} */ - /*! * \addtogroup exi_mcident EXI memory card identifier * @{ @@ -133,7 +126,6 @@ distribution. * @} */ - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -145,7 +137,6 @@ distribution. */ typedef s32 (*EXICallback)(s32 chn,s32 dev); - /*! \fn s32 EXI_ProbeEx(s32 nChn) \brief Performs an extended probe of the EXI channel \param[in] nChn EXI channel to probe @@ -154,7 +145,6 @@ typedef s32 (*EXICallback)(s32 chn,s32 dev); */ s32 EXI_ProbeEx(s32 nChn); - /*! \fn s32 EXI_Probe(s32 nChn) \brief Probes the EXI channel \param[in] nChn EXI channel to probe @@ -163,7 +153,6 @@ s32 EXI_ProbeEx(s32 nChn); */ s32 EXI_Probe(s32 nChn); - /*! \fn s32 EXI_Lock(s32 nChn,s32 nDev,EXICallback unlockCB) \brief Try to lock the desired EXI channel on the given device. \param[in] nChn EXI channel to lock @@ -174,7 +163,6 @@ s32 EXI_Probe(s32 nChn); */ s32 EXI_Lock(s32 nChn,s32 nDev,EXICallback unlockCB); - /*! \fn s32 EXI_Unlock(s32 nChn) \brief Unlock the desired EXI channel. \param[in] nChn EXI channel to unlock @@ -183,7 +171,6 @@ s32 EXI_Lock(s32 nChn,s32 nDev,EXICallback unlockCB); */ s32 EXI_Unlock(s32 nChn); - /*! \fn s32 EXI_Select(s32 nChn,s32 nDev,s32 nFrq) \brief Selects the spedified EXI channel on the given device with the given frequency \param[in] nChn EXI channel to select @@ -194,7 +181,6 @@ s32 EXI_Unlock(s32 nChn); */ s32 EXI_Select(s32 nChn,s32 nDev,s32 nFrq); - /*! \fn s32 EXI_SelectSD(s32 nChn,s32 nDev,s32 nFrq) \brief Performs a special select, for SD cards or adapters respectively, on the given device with the given frequence \param[in] nChn EXI channel to select @@ -205,7 +191,6 @@ s32 EXI_Select(s32 nChn,s32 nDev,s32 nFrq); */ s32 EXI_SelectSD(s32 nChn,s32 nDev,s32 nFrq); - /*! \fn s32 EXI_Deselect(s32 nChn) \brief Deselects the EXI channel. \param[in] nChn EXI channel to deselect @@ -214,7 +199,6 @@ s32 EXI_SelectSD(s32 nChn,s32 nDev,s32 nFrq); */ s32 EXI_Deselect(s32 nChn); - /*! \fn s32 EXI_Sync(s32 nChn) \brief Synchronize or finish respectively the last EXI transfer. \param[in] nChn EXI channel to select @@ -223,7 +207,6 @@ s32 EXI_Deselect(s32 nChn); */ s32 EXI_Sync(s32 nChn); - /*! \fn s32 EXI_Imm(s32 nChn,void *pData,u32 nLen,u32 nMode,EXICallback tc_cb) \brief Initializes an immediate mode EXI transfer. \param[in] nChn EXI channel to select @@ -236,7 +219,6 @@ s32 EXI_Sync(s32 nChn); */ s32 EXI_Imm(s32 nChn,void *pData,u32 nLen,u32 nMode,EXICallback tc_cb); - /*! \fn s32 EXI_ImmEx(s32 nChn,void *pData,u32 nLen,u32 nMode) \brief Initializes an extended immediate mode EXI transfer. \param[in] nChn EXI channel to select @@ -248,7 +230,6 @@ s32 EXI_Imm(s32 nChn,void *pData,u32 nLen,u32 nMode,EXICallback tc_cb); */ s32 EXI_ImmEx(s32 nChn,void *pData,u32 nLen,u32 nMode); - /*! \fn s32 EXI_Dma(s32 nChn,void *pData,u32 nLen,u32 nMode,EXICallback tc_cb) \brief Initializes a DMA mode EXI transfer. \param[in] nChn EXI channel to select @@ -261,7 +242,6 @@ s32 EXI_ImmEx(s32 nChn,void *pData,u32 nLen,u32 nMode); */ s32 EXI_Dma(s32 nChn,void *pData,u32 nLen,u32 nMode,EXICallback tc_cb); - /*! \fn s32 EXI_GetState(s32 nChn) \brief Get the EXI state \param[in] nChn EXI channel to select @@ -270,7 +250,6 @@ s32 EXI_Dma(s32 nChn,void *pData,u32 nLen,u32 nMode,EXICallback tc_cb); */ s32 EXI_GetState(s32 nChn); - /*! \fn s32 EXI_GetID(s32 nChn,s32 nDev,u32 *nId) \brief Get the ID of the connected EXI device on the given channel \param[in] nChn EXI channel to select @@ -281,7 +260,6 @@ s32 EXI_GetState(s32 nChn); */ s32 EXI_GetID(s32 nChn,s32 nDev,u32 *nId); - /*! \fn s32 EXI_Attach(s32 nChn,EXICallback ext_cb) \brief Attach the device on the given channel \param[in] nChn EXI channel to select @@ -291,7 +269,6 @@ s32 EXI_GetID(s32 nChn,s32 nDev,u32 *nId); */ s32 EXI_Attach(s32 nChn,EXICallback ext_cb); - /*! \fn s32 EXI_Detach(s32 nChn) \brief Detach the device on the given channel \param[in] nChn EXI channel to select @@ -300,7 +277,6 @@ s32 EXI_Attach(s32 nChn,EXICallback ext_cb); */ s32 EXI_Detach(s32 nChn); - /*! \fn void EXI_ProbeReset() \brief Resets certain internal flags and counters and performs a probe on all 3 channels. @@ -308,7 +284,6 @@ s32 EXI_Detach(s32 nChn); */ void EXI_ProbeReset(); - /*! \fn EXICallback EXI_RegisterEXICallback(s32 nChn,EXICallback exi_cb) \brief Register a callback function in the EXI driver for the EXI interrupt. \param[in] nChn EXI channel to select diff --git a/wii/libogc/include/ogc/gu.h b/wii/libogc/include/ogc/gu.h index 324f9d5232..10c3c4eeab 100644 --- a/wii/libogc/include/ogc/gu.h +++ b/wii/libogc/include/ogc/gu.h @@ -210,7 +210,6 @@ void guPerspective(Mtx44 mt,f32 fovy,f32 aspect,f32 n,f32 f); */ void guOrtho(Mtx44 mt,f32 t,f32 b,f32 l,f32 r,f32 n,f32 f); - /*! * \fn void guLightPerspective(Mtx mt,f32 fovY,f32 aspect,f32 scaleS,f32 scaleT,f32 transS,f32 transT) * \brief Sets a 3x4 perspective projection matrix from field of view and aspect ratio parameters, two scale values, and two @@ -302,7 +301,6 @@ void guLightOrtho(Mtx mt,f32 t,f32 b,f32 l,f32 r,f32 scaleS,f32 scaleT,f32 trans */ void guLightFrustum(Mtx mt,f32 t,f32 b,f32 l,f32 r,f32 n,f32 scaleS,f32 scaleT,f32 transS,f32 transT); - /*! * \fn void guLookAt(Mtx mt,guVector *camPos,guVector *camUp,guVector *target) * \brief Sets a world-space to camera-space transformation matrix. @@ -324,7 +322,6 @@ void guLightFrustum(Mtx mt,f32 t,f32 b,f32 l,f32 r,f32 n,f32 scaleS,f32 scaleT,f */ void guLookAt(Mtx mt,guVector *camPos,guVector *camUp,guVector *target); - /*! * \fn void guVecHalfAngle(guVector *a,guVector *b,guVector *half) * \brief Computes a vector that lies halfway between \a a and \a b. diff --git a/wii/libogc/include/ogc/gx.h b/wii/libogc/include/ogc/gx.h index 50462e84f4..22184190c7 100644 --- a/wii/libogc/include/ogc/gx.h +++ b/wii/libogc/include/ogc/gx.h @@ -75,7 +75,6 @@ /*! @} */ - /*! \addtogroup vtxattrin Vertex data input type * @{ */ @@ -86,7 +85,6 @@ /*! @} */ - /*! \addtogroup compsize Number of components in an attribute * @{ */ @@ -358,7 +356,6 @@ /*! @} */ - /*! \addtogroup texgentyp Texture coordinate generation type * @{ */ @@ -501,7 +498,6 @@ /*! @} */ - /*! \addtogroup tevcolorarg TEV color combiner input * @{ */ @@ -525,7 +521,6 @@ /*! @} */ - /*! \addtogroup tevalphaarg TEV alpha combiner input * @{ */ @@ -541,7 +536,6 @@ /*! @} */ - /*! \addtogroup tevstage TEV stage * \details The GameCube's Graphics Processor (GP) can use up to 16 stages to compute a texel for a particular surface. * By default, each texture will use two stages, but it can be configured through various functions calls. @@ -570,7 +564,6 @@ /*! @} */ - /*! \addtogroup tevop TEV combiner operator * @{ */ @@ -590,7 +583,6 @@ /*! @} */ - /*! \addtogroup tevbias TEV bias value * @{ */ @@ -602,7 +594,6 @@ /*! @} */ - /*! \addtogroup tevclampmode TEV clamping mode * \note These modes are used for a function which is not implementable on production (i.e. retail) GameCube hardware. * @{ @@ -616,7 +607,6 @@ /*! @} */ - /*! \addtogroup tevscale TEV scale value * @{ */ @@ -629,7 +619,6 @@ /*! @} */ - /*! \addtogroup tevcoloutreg TEV color/output register * @{ */ @@ -642,7 +631,6 @@ /*! @} */ - /*! \addtogroup cullmode Backface culling mode * @{ */ @@ -757,7 +745,6 @@ #define GX_TEV_KASEL_K3_A 0x1F /*!< K3[A] register */ /*! @} */ - /*! \addtogroup tevswapsel TEV color swap table entry * @{ */ @@ -770,7 +757,6 @@ /*! @} */ - /* tev color chan */ #define GX_CH_RED 0 #define GX_CH_GREEN 1 @@ -902,7 +888,6 @@ #define GX_FOG_REVEXP2 GX_FOG_PERSP_REVEXP2 /*! @} */ - /* pixel format */ #define GX_PF_RGB8_Z24 0 #define GX_PF_RGBA6_Z24 1 @@ -932,7 +917,6 @@ /*! @} */ - /*! \addtogroup gammamode Gamma values * @{ */ @@ -943,7 +927,6 @@ /*! @} */ - /*! \addtogroup copymode EFB copy mode * \brief Controls whether all lines, only even lines, or only odd lines are copied from the EFB. * @{ @@ -2625,7 +2608,6 @@ void GX_SetTevAlphaIn(u8 tevstage,u8 a,u8 b,u8 c,u8 d); */ void GX_SetTevColorOp(u8 tevstage,u8 tevop,u8 tevbias,u8 tevscale,u8 clamp,u8 tevregid); - /*! * \fn void GX_SetTevAlphaOp(u8 tevstage,u8 tevop,u8 tevbias,u8 tevscale,u8 clamp,u8 tevregid) * \brief Sets the \a tevop, \a tevbias, \a tevscale and \a clamp-mode operation for the alpha combiner diff --git a/wii/libogc/include/ogc/gx_struct.h b/wii/libogc/include/ogc/gx_struct.h index e90f519b98..4e36799c82 100644 --- a/wii/libogc/include/ogc/gx_struct.h +++ b/wii/libogc/include/ogc/gx_struct.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __GX_STRUCT_H__ #define __GX_STRUCT_H__ @@ -42,7 +41,6 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! \typedef struct _gx_rmodeobj GXRModeObj \brief structure to hold the selected video and render settings diff --git a/wii/libogc/include/ogc/irq.h b/wii/libogc/include/ogc/irq.h index 2dae7bdc90..64e990cc51 100644 --- a/wii/libogc/include/ogc/irq.h +++ b/wii/libogc/include/ogc/irq.h @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #ifndef __IRQ_H__ #define __IRQ_H__ @@ -125,7 +123,6 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! \typedef void (*raw_irq_handler_t)(u32 irq,void *ctx) \brief function pointer typedef for the interrupt handler callback \param[in] irq interrupt number of triggered interrupt. @@ -133,7 +130,6 @@ distribution. */ typedef void (*raw_irq_handler_t)(u32 irq,void *ctx); - /*! \fn raw_irq_handler_t IRQ_Request(u32 nIrq,raw_irq_handler_t pHndl,void *pCtx) \brief Register an interrupt handler. \param[in] nIrq interrupt number to which to register the handler @@ -144,7 +140,6 @@ typedef void (*raw_irq_handler_t)(u32 irq,void *ctx); */ raw_irq_handler_t IRQ_Request(u32 nIrq,raw_irq_handler_t pHndl,void *pCtx); - /*! \fn raw_irq_handler_t IRQ_Free(u32 nIrq) \brief Free an interrupt handler. \param[in] nIrq interrupt number for which to free the handler @@ -153,7 +148,6 @@ raw_irq_handler_t IRQ_Request(u32 nIrq,raw_irq_handler_t pHndl,void *pCtx); */ raw_irq_handler_t IRQ_Free(u32 nIrq); - /*! \fn raw_irq_handler_t IRQ_GetHandler(u32 nIrq) \brief Get the handler from interrupt number \param[in] nIrq interrupt number for which to retrieve the handler @@ -162,7 +156,6 @@ raw_irq_handler_t IRQ_Free(u32 nIrq); */ raw_irq_handler_t IRQ_GetHandler(u32 nIrq); - /*! \fn u32 IRQ_Disable() \brief Disable the complete IRQ subsystem. No interrupts will be served. Multithreading kernel fully disabled. @@ -170,7 +163,6 @@ raw_irq_handler_t IRQ_GetHandler(u32 nIrq); */ u32 IRQ_Disable(void); - /*! \fn u32 IRQ_Restore(u32 level) \brief Restore the IRQ subsystem with the given level. This is function should be used together with IRQ_Disable() \param[in] level IRQ level to restore to. diff --git a/wii/libogc/include/ogc/lwp.h b/wii/libogc/include/ogc/lwp.h index 1e3c8cc398..6a1dcab2b2 100644 --- a/wii/libogc/include/ogc/lwp.h +++ b/wii/libogc/include/ogc/lwp.h @@ -25,11 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - - -------------------------------------------------------------*/ - #ifndef __LWP_H__ #define __LWP_H__ @@ -55,13 +52,11 @@ distribution. extern "C" { #endif - /*! \typedef u32 lwp_t \brief typedef for the thread context handle */ typedef u32 lwp_t; - /*! \typedef u32 lwpq_t \brief typedef for the thread queue's context handle */ @@ -80,7 +75,6 @@ typedef u32 lwpq_t; */ s32 LWP_CreateThread(lwp_t *thethread,void* (*entry)(void *),void *arg,void *stackbase,u32 stack_size,u8 prio); - /*! \fn s32 LWP_SuspendThread(lwp_t thethread) \brief Suspend the given thread. \param[in] thethread handle to the thread context which should be suspended. @@ -89,7 +83,6 @@ s32 LWP_CreateThread(lwp_t *thethread,void* (*entry)(void *),void *arg,void *sta */ s32 LWP_SuspendThread(lwp_t thethread); - /*! \fn s32 LWP_ResumeThread(lwp_t thethread) \brief Resume the given thread. \param[in] thethread handle to the thread context which should be resumed. @@ -98,7 +91,6 @@ s32 LWP_SuspendThread(lwp_t thethread); */ s32 LWP_ResumeThread(lwp_t thethread); - /*! \fn BOOL LWP_ThreadIsSuspended(lwp_t thethread) \brief Test whether the given thread is suspended or not \param[in] thethread handle to the thread context which should be tested. @@ -107,7 +99,6 @@ s32 LWP_ResumeThread(lwp_t thethread); */ BOOL LWP_ThreadIsSuspended(lwp_t thethread); - /*! \fn lwp_t LWP_GetSelf() \brief Return the handle to the current thread. @@ -115,7 +106,6 @@ BOOL LWP_ThreadIsSuspended(lwp_t thethread); */ lwp_t LWP_GetSelf(); - /*! \fn void LWP_SetThreadPriority(lwp_t thethread,u32 prio) \brief Set the priority of the given thread. \param[in] thethread handle to the thread context whos priority should be changed. If NULL, the current thread will be taken. @@ -125,7 +115,6 @@ lwp_t LWP_GetSelf(); */ void LWP_SetThreadPriority(lwp_t thethread,u32 prio); - /*! \fn void LWP_YieldThread() \brief Yield the current thread to another one with higher priority or if not running at the same priority which state is runnable. @@ -133,7 +122,6 @@ void LWP_SetThreadPriority(lwp_t thethread,u32 prio); */ void LWP_YieldThread(); - /*! \fn void LWP_Reschedule(u32 prio) \brief Reschedule all threads running at the given priority \param[in] prio priority level to reschedule @@ -142,7 +130,6 @@ void LWP_YieldThread(); */ void LWP_Reschedule(u32 prio); - /*! \fn s32 LWP_JoinThread(lwp_t thethread,void **value_ptr) \brief Join the given thread. \param[in] thethread handle to the thread's context which should be joined to wait on termination. @@ -152,7 +139,6 @@ void LWP_Reschedule(u32 prio); */ s32 LWP_JoinThread(lwp_t thethread,void **value_ptr); - /*! \fn void LWP_InitQueue(lwpq_t *thequeue) \brief Initialize the thread synchronization queue \param[in] thequeue pointer to a lwpq_t handle. @@ -161,7 +147,6 @@ s32 LWP_JoinThread(lwp_t thethread,void **value_ptr); */ s32 LWP_InitQueue(lwpq_t *thequeue); - /*! \fn void LWP_CloseQueue(lwpq_t thequeue) \brief Close the thread synchronization queue and releas the handle \param[in] thequeue handle to the thread's synchronization queue @@ -170,7 +155,6 @@ s32 LWP_InitQueue(lwpq_t *thequeue); */ void LWP_CloseQueue(lwpq_t thequeue); - /*! \fn s32 LWP_ThreadSleep(lwpq_t thequeue) \brief Pushes the current thread onto the given thread synchronization queue and sets the thread state to blocked. \param[in] thequeue handle to the thread's synchronization queue to push the thread on @@ -179,7 +163,6 @@ void LWP_CloseQueue(lwpq_t thequeue); */ s32 LWP_ThreadSleep(lwpq_t thequeue); - /*! \fn void LWP_ThreadSignal(lwpq_t thequeue) \brief Signals one thread to be revmoved from the thread synchronization queue and sets it back to running state. \param[in] thequeue handle to the thread's synchronization queue to pop the blocked thread off @@ -188,7 +171,6 @@ s32 LWP_ThreadSleep(lwpq_t thequeue); */ void LWP_ThreadSignal(lwpq_t thequeue); - /*! \fn void LWP_ThreadBroadcast(lwpq_t thequeue) \brief Removes all blocked threads from the thread synchronization queue and sets them back to running state. \param[in] thequeue handle to the thread's synchronization queue to pop the blocked threads off diff --git a/wii/libogc/include/ogc/lwp_config.h b/wii/libogc/include/ogc/lwp_config.h index beda421e54..ca938f3185 100644 --- a/wii/libogc/include/ogc/lwp_config.h +++ b/wii/libogc/include/ogc/lwp_config.h @@ -1,7 +1,6 @@ #ifndef __LWP_CONFIG_H__ #define __LWP_CONFIG_H__ - #define LWP_MAX_MQUEUES 64 #define LWP_MAX_MUTEXES 64 diff --git a/wii/libogc/include/ogc/lwp_watchdog.h b/wii/libogc/include/ogc/lwp_watchdog.h index ed49a06fb9..456aeadbdb 100644 --- a/wii/libogc/include/ogc/lwp_watchdog.h +++ b/wii/libogc/include/ogc/lwp_watchdog.h @@ -38,7 +38,6 @@ #define tick_microsecs(ticks) ((((u64)(ticks)*8)%(u64)(TB_TIMER_CLOCK/125))) #define tick_nanosecs(ticks) ((((u64)(ticks)*8000)%(u64)(TB_TIMER_CLOCK/125))) - #define secs_to_ticks(sec) ((u64)(sec)*(TB_TIMER_CLOCK*1000)) #define millisecs_to_ticks(msec) ((u64)(msec)*(TB_TIMER_CLOCK)) #define microsecs_to_ticks(usec) (((u64)(usec)*(TB_TIMER_CLOCK/125))/8) diff --git a/wii/libogc/include/ogc/machine/asm.h b/wii/libogc/include/ogc/machine/asm.h index ed28f7895b..8fe90ff114 100644 --- a/wii/libogc/include/ogc/machine/asm.h +++ b/wii/libogc/include/ogc/machine/asm.h @@ -13,7 +13,6 @@ #define cr6 6 #define cr7 7 - /* General Purpose Registers (GPRs) */ #define r0 0 @@ -51,7 +50,6 @@ #define r30 30 #define r31 31 - /* Floating Point Registers (FPRs) */ #define fr0 0 @@ -135,7 +133,6 @@ #define MMCR0 952 #define MMCR1 956 - #define LINK_REGISTER_CALLEE_UPDATE_ROOM 4 #define EXCEPTION_NUMBER 8 #define SRR0_OFFSET 12 diff --git a/wii/libogc/include/ogc/machine/spinlock.h b/wii/libogc/include/ogc/machine/spinlock.h index 3081ee145b..13251dde37 100644 --- a/wii/libogc/include/ogc/machine/spinlock.h +++ b/wii/libogc/include/ogc/machine/spinlock.h @@ -187,5 +187,4 @@ static __inline__ void write_unlock(rwlock_t *rw) rw->lock = 0; } - #endif diff --git a/wii/libogc/include/ogc/message.h b/wii/libogc/include/ogc/message.h index 1105446942..977d8cf330 100644 --- a/wii/libogc/include/ogc/message.h +++ b/wii/libogc/include/ogc/message.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __MESSAGE_H__ #define __MESSAGE_H__ @@ -46,25 +45,20 @@ distribution. #define MQ_MSG_BLOCK 0 #define MQ_MSG_NOBLOCK 1 - #ifdef __cplusplus extern "C" { #endif - /*! \typedef u32 mqbox_t \brief typedef for the message queue handle */ typedef u32 mqbox_t; - /*! \typedef void* mqmsg_t \brief typedef for the message pointer */ typedef void* mqmsg_t; - - /*! \fn u32 MQ_Init(mqbox_t *mqbox,u32 count) \brief Initializes a message queue \param[out] mqbox pointer to the mqbox_t handle. @@ -74,7 +68,6 @@ typedef void* mqmsg_t; */ s32 MQ_Init(mqbox_t *mqbox,u32 count); - /*! \fn void MQ_Close(mqbox_t mqbox) \brief Closes the message queue and releases all memory. \param[in] mqbox handle to the mqbox_t structure. @@ -83,7 +76,6 @@ s32 MQ_Init(mqbox_t *mqbox,u32 count); */ void MQ_Close(mqbox_t mqbox); - /*! \fn BOOL MQ_Send(mqbox_t mqbox,mqmsg_t msg,u32 flags) \brief Sends a message to the given message queue. \param[in] mqbox mqbox_t handle to the message queue @@ -94,7 +86,6 @@ void MQ_Close(mqbox_t mqbox); */ BOOL MQ_Send(mqbox_t mqbox,mqmsg_t msg,u32 flags); - /*! \fn BOOL MQ_Jam(mqbox_t mqbox,mqmsg_t msg,u32 flags) \brief Sends a message to the given message queue and jams it in front of the queue. \param[in] mqbox mqbox_t handle to the message queue @@ -105,7 +96,6 @@ BOOL MQ_Send(mqbox_t mqbox,mqmsg_t msg,u32 flags); */ BOOL MQ_Jam(mqbox_t mqbox,mqmsg_t msg,u32 flags); - /*! \fn BOOL MQ_Receive(mqbox_t mqbox,mqmsg_t *msg,u32 flags) \brief Sends a message to the given message queue. \param[in] mqbox mqbox_t handle to the message queue diff --git a/wii/libogc/include/ogc/mutex.h b/wii/libogc/include/ogc/mutex.h index e6dd1981b3..288fcd5c69 100644 --- a/wii/libogc/include/ogc/mutex.h +++ b/wii/libogc/include/ogc/mutex.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __MUTEX_H__ #define __MUTEX_H__ @@ -44,13 +43,11 @@ distribution. extern "C" { #endif - /*! \typedef u32 mutex_t \brief typedef for the mutex handle */ typedef u32 mutex_t; - /*! \fn s32 LWP_MutexInit(mutex_t *mutex,bool use_recursive) \brief Initializes a mutex lock. \param[out] mutex pointer to a mutex_t handle. @@ -60,7 +57,6 @@ typedef u32 mutex_t; */ s32 LWP_MutexInit(mutex_t *mutex,bool use_recursive); - /*! \fn s32 LWP_MutexDestroy(mutex_t mutex) \brief Close mutex lock, release all threads and handles locked on this mutex. \param[in] mutex handle to the mutex_t structure. @@ -69,7 +65,6 @@ s32 LWP_MutexInit(mutex_t *mutex,bool use_recursive); */ s32 LWP_MutexDestroy(mutex_t mutex); - /*! \fn s32 LWP_MutexLock(mutex_t mutex) \brief Enter the mutex lock. \param[in] mutex handle to the mutext_t structure. @@ -78,7 +73,6 @@ s32 LWP_MutexDestroy(mutex_t mutex); */ s32 LWP_MutexLock(mutex_t mutex); - /*! \fn s32 LWP_MutexTryLock(mutex_t mutex) \brief Try to enter the mutex lock. \param[in] mutex handle to the mutex_t structure. @@ -87,7 +81,6 @@ s32 LWP_MutexLock(mutex_t mutex); */ s32 LWP_MutexTryLock(mutex_t mutex); - /*! \fn s32 LWP_MutexUnlock(mutex_t mutex) \brief Release the mutex lock and let other threads process further on this mutex. \param[in] mutex handle to the mutex_t structure. diff --git a/wii/libogc/include/ogc/pad.h b/wii/libogc/include/ogc/pad.h index 3488c5c5b4..498dc39ff4 100644 --- a/wii/libogc/include/ogc/pad.h +++ b/wii/libogc/include/ogc/pad.h @@ -85,7 +85,6 @@ s8 PAD_StickY(int pad); u8 PAD_TriggerL(int pad); u8 PAD_TriggerR(int pad); - sampling_callback PAD_SetSamplingCallback(sampling_callback cb); /*+----------------------------------------------------------------------------------------------+*/ diff --git a/wii/libogc/include/ogc/semaphore.h b/wii/libogc/include/ogc/semaphore.h index bae6d4c514..854be37dde 100644 --- a/wii/libogc/include/ogc/semaphore.h +++ b/wii/libogc/include/ogc/semaphore.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __SEMAPHORE_H__ #define __SEMAPHORE_H__ @@ -36,7 +35,6 @@ distribution. */ - #include #define LWP_SEM_NULL 0xffffffff @@ -45,13 +43,11 @@ distribution. extern "C" { #endif - /*! \typedef u32 sem_t \brief typedef for the semaphore handle */ typedef u32 sem_t; - /*! \fn s32 LWP_SemInit(sem_t *sem,u32 start,u32 max) \brief Initializes a semaphore. \param[out] sem pointer to a sem_t handle. @@ -62,7 +58,6 @@ typedef u32 sem_t; */ s32 LWP_SemInit(sem_t *sem,u32 start,u32 max); - /*! \fn s32 LWP_SemDestroy(sem_t sem) \brief Close and destroy a semaphore, release all threads and handles locked on this semaphore. \param[in] sem handle to the sem_t structure. @@ -71,7 +66,6 @@ s32 LWP_SemInit(sem_t *sem,u32 start,u32 max); */ s32 LWP_SemDestroy(sem_t sem); - /*! \fn s32 LWP_SemWait(sem_t sem) \brief Count down semaphore counter and enter lock if counter <=0 \param[in] sem handle to the sem_t structure. @@ -80,7 +74,6 @@ s32 LWP_SemDestroy(sem_t sem); */ s32 LWP_SemWait(sem_t sem); - /*! \fn s32 LWP_SemPost(sem_t sem) \brief Count up semaphore counter and release lock if counter >0 \param[in] sem handle to the sem_t structure. diff --git a/wii/libogc/include/ogc/system.h b/wii/libogc/include/ogc/system.h index b82e251438..0beb00023b 100644 --- a/wii/libogc/include/ogc/system.h +++ b/wii/libogc/include/ogc/system.h @@ -25,14 +25,11 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #ifndef __SYSTEM_H__ #define __SYSTEM_H__ - /*! \file system.h \brief OS functions and initialization @@ -67,7 +64,6 @@ distribution. *@} */ - /*! * \addtogroup sys_mprotchans OS memory protection channels * @{ @@ -83,7 +79,6 @@ distribution. *@} */ - /*! * \addtogroup sys_mprotmodes OS memory protection modes * @{ @@ -101,8 +96,6 @@ distribution. #define SYS_FONTSIZE_ANSI (288 + 131072) #define SYS_FONTSIZE_SJIS (3840 + 1179648) - - /*! * \addtogroup sys_mcastmacros OS memory casting macros * @{ @@ -130,14 +123,12 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! * \typedef u32 syswd_t * \brief handle typedef for the alarm context */ typedef u32 syswd_t; - /*! * \typedef struct _syssram syssram * \brief holds the stored configuration value from the system SRAM area @@ -165,7 +156,6 @@ struct _syssram { u8 flags; } ATTRIBUTE_PACKED; - /*! * \typedef struct _syssramex syssramex * \brief holds the stored configuration value from the extended SRAM area @@ -237,7 +227,6 @@ struct _sys_resetinfo { */ void SYS_Init(); - /*! * \fn void* SYS_AllocateFramebuffer(GXRModeObj *rmode) * \brief Allocate cacheline aligned memory for the external framebuffer based on the rendermode object. @@ -247,13 +236,11 @@ void SYS_Init(); */ void* SYS_AllocateFramebuffer(GXRModeObj *rmode); - void SYS_ProtectRange(u32 chan,void *addr,u32 bytes,u32 cntrl); void SYS_StartPMC(u32 mcr0val,u32 mcr1val); void SYS_DumpPMC(); void SYS_StopPMC(); - /*! \fn s32 SYS_CreateAlarm(syswd_t *thealarm) \brief Create/initialize sysalarm structure \param[in] thealarm pointer to the handle to store the created alarm context identifier @@ -262,7 +249,6 @@ void SYS_StopPMC(); */ s32 SYS_CreateAlarm(syswd_t *thealarm); - /*! \fn s32 SYS_SetAlarm(syswd_t thealarm,const struct timespec *tp,alarmcallback cb) \brief Set the alarm parameters for a one-shot alarm, add to the list of alarms and start. \param[in] thealarm identifier to the alarm context to be initialize for a one-shot alarm @@ -273,7 +259,6 @@ s32 SYS_CreateAlarm(syswd_t *thealarm); */ s32 SYS_SetAlarm(syswd_t thealarm,const struct timespec *tp,alarmcallback cb,void *cbarg); - /*! \fn s32 SYS_SetPeriodicAlarm(syswd_t thealarm,const struct timespec *tp_start,const struct timespec *tp_period,alarmcallback cb) \brief Set the alarm parameters for a periodioc alarm, add to the list of alarms and start. The alarm and interval persists as long as SYS_CancelAlarm() isn't called. \param[in] thealarm identifier to the alarm context to be initialized for a periodic alarm @@ -285,7 +270,6 @@ s32 SYS_SetAlarm(syswd_t thealarm,const struct timespec *tp,alarmcallback cb,voi */ s32 SYS_SetPeriodicAlarm(syswd_t thealarm,const struct timespec *tp_start,const struct timespec *tp_period,alarmcallback cb,void *cbarg); - /*! \fn s32 SYS_RemoveAlarm(syswd_t thealarm) \brief Remove the given alarm context from the list of contexts and destroy it \param[in] thealarm identifier to the alarm context to be removed and destroyed @@ -294,7 +278,6 @@ s32 SYS_SetPeriodicAlarm(syswd_t thealarm,const struct timespec *tp_start,const */ s32 SYS_RemoveAlarm(syswd_t thealarm); - /*! \fn s32 SYS_CancelAlarm(syswd_t thealarm) \brief Cancel the alarm, but do not remove from the list of contexts. \param[in] thealarm identifier to the alram context to be canceled @@ -303,7 +286,6 @@ s32 SYS_RemoveAlarm(syswd_t thealarm); */ s32 SYS_CancelAlarm(syswd_t thealarm); - void SYS_SetWirelessID(u32 chan,u32 id); u32 SYS_GetWirelessID(u32 chan); u32 SYS_GetFontEncoding(); diff --git a/wii/libogc/include/ogc/texconv.h b/wii/libogc/include/ogc/texconv.h index 3a07ee0ca7..1c20fe1926 100644 --- a/wii/libogc/include/ogc/texconv.h +++ b/wii/libogc/include/ogc/texconv.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __TEXCONV_H__ #define __TEXTCONV_H__ diff --git a/wii/libogc/include/ogc/video.h b/wii/libogc/include/ogc/video.h index 866bd910cf..b8347e87fb 100644 --- a/wii/libogc/include/ogc/video.h +++ b/wii/libogc/include/ogc/video.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __VIDEO_H__ #define __VIDEO_H__ @@ -45,7 +44,6 @@ distribution. extern "C" { #endif /* __cplusplus */ - /*! * \typedef void (*VIRetraceCallback)(u32 retraceCnt) * \brief function pointer typedef for the user's retrace callback @@ -58,7 +56,6 @@ typedef void (*VIPositionCallback)(u32 posX,u32 posY); void* VIDEO_GetNextFramebuffer(); void* VIDEO_GetCurrentFramebuffer(); - /*! * \fn void VIDEO_Init() * \brief Initializes the VIDEO subsystem. This call should be done in the early stages of your main() @@ -67,7 +64,6 @@ void* VIDEO_GetCurrentFramebuffer(); */ void VIDEO_Init(); - /*! * \fn void VIDEO_Flush() * \brief Flush the shadow registers to the drivers video registers. @@ -76,7 +72,6 @@ void VIDEO_Init(); */ void VIDEO_Flush(); - /*! * \fn void VIDEO_SetBlack(bool black) * \brief Blackout the VIDEO interface. @@ -87,7 +82,6 @@ void VIDEO_Flush(); */ void VIDEO_SetBlack(bool black); - /*! * \fn u32 VIDEO_GetNextField() * \brief Get the next field in DS mode. @@ -96,7 +90,6 @@ void VIDEO_SetBlack(bool black); */ u32 VIDEO_GetNextField(); - /*! * \fn u32 VIDEO_GetCurrentLine() * \brief Get current video line @@ -105,7 +98,6 @@ u32 VIDEO_GetNextField(); */ u32 VIDEO_GetCurrentLine(); - /*! * \fn u32 VIDEO_GetCurrentTvMode() * \brief Get current configured TV mode @@ -114,7 +106,6 @@ u32 VIDEO_GetCurrentLine(); */ u32 VIDEO_GetCurrentTvMode(); - /*! * \fn void VIDEO_Configure(GXRModeObj *rmode) * \brief Configure the VI with the given render mode object @@ -139,7 +130,6 @@ u32 VIDEO_GetFrameBufferSize(GXRModeObj *rmode); */ void VIDEO_ClearFrameBuffer(GXRModeObj *rmode,void *fb,u32 color); - /*! * \fn void VIDEO_WaitVSync(void) * \brief Wait on the next vertical retrace @@ -148,7 +138,6 @@ void VIDEO_ClearFrameBuffer(GXRModeObj *rmode,void *fb,u32 color); */ void VIDEO_WaitVSync(void); - /*! * \fn void VIDEO_SetNextFramebuffer(void *fb) * \brief Set the framebuffer for the next VI register update. @@ -157,7 +146,6 @@ void VIDEO_WaitVSync(void); */ void VIDEO_SetNextFramebuffer(void *fb); - /*! * \fn void VIDEO_SetNextRightFramebuffer(void *fb) * \brief Set the right framebuffer for the next VI register update. This is used for 3D Gloves for instance. @@ -166,7 +154,6 @@ void VIDEO_SetNextFramebuffer(void *fb); */ void VIDEO_SetNextRightFramebuffer(void *fb); - /*! * \fn VIRetraceCallback VIDEO_SetPreRetraceCallback(VIRetraceCallback callback) * \brief Set the Pre-Retrace callback function. This function is called within the video interrupt handler before the VI registers will be updated. @@ -177,7 +164,6 @@ void VIDEO_SetNextRightFramebuffer(void *fb); */ VIRetraceCallback VIDEO_SetPreRetraceCallback(VIRetraceCallback callback); - /*! * \fn VIRetraceCallback VIDEO_SetPostRetraceCallback(VIRetraceCallback callback) * \brief Set the Post-Retrace callback function. This function is called within the video interrupt handler after the VI registers are updated. @@ -188,7 +174,6 @@ VIRetraceCallback VIDEO_SetPreRetraceCallback(VIRetraceCallback callback); */ VIRetraceCallback VIDEO_SetPostRetraceCallback(VIRetraceCallback callback); - /*! * \fn u32 VIDEO_HaveComponentCable(void) * \brief Check for a component cable. This function returns 1 when a Component (YPbPr) cable is connected. diff --git a/wii/libogc/include/ogc/video_types.h b/wii/libogc/include/ogc/video_types.h index 9a03873d82..a3669eff54 100644 --- a/wii/libogc/include/ogc/video_types.h +++ b/wii/libogc/include/ogc/video_types.h @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #ifndef __VIDEO_TYPES_H__ #define __VIDEO_TYPES_H__ @@ -43,7 +42,6 @@ distribution. * @{ */ - #define VI_DISPLAY_PIX_SZ 2 /*!< multiplier to get real pixel size in bytes */ /*! @@ -59,7 +57,6 @@ distribution. * @} */ - /*! * \addtogroup vi_standardtypedef VIDEO standard types * @{ @@ -76,11 +73,9 @@ distribution. * @} */ - #define VI_XFBMODE_SF 0 #define VI_XFBMODE_DF 1 - /*! * \addtogroup vi_fielddef VIDEO field types * @{ @@ -93,7 +88,6 @@ distribution. * @} */ - // Maximum screen space #define VI_MAX_WIDTH_NTSC 720 #define VI_MAX_HEIGHT_NTSC 480 @@ -113,7 +107,6 @@ distribution. * @} */ - #define VI_TVMODE(fmt, mode) ( ((fmt) << 2) + (mode) ) #define VI_TVMODE_NTSC_INT VI_TVMODE(VI_NTSC, VI_INTERLACE) @@ -137,13 +130,11 @@ distribution. #define VI_TVMODE_DEBUG_PAL_INT VI_TVMODE(VI_DEBUG_PAL, VI_INTERLACE) #define VI_TVMODE_DEBUG_PAL_DS VI_TVMODE(VI_DEBUG_PAL, VI_NON_INTERLACE) - /*! * \addtogroup vi_defines List of defines used for the VIDEO subsystem * @{ */ - /*! * \addtogroup gxrmode_obj VIDEO render modes * @{ diff --git a/wii/libogc/include/samplerate.h b/wii/libogc/include/samplerate.h index 9232dc29da..f7a8d29fa0 100644 --- a/wii/libogc/include/samplerate.h +++ b/wii/libogc/include/samplerate.h @@ -28,7 +28,6 @@ extern "C" { #endif /* __cplusplus */ - /* Opaque data type SRC_STATE. */ typedef struct SRC_STATE_tag SRC_STATE ; @@ -179,7 +178,6 @@ enum void src_short_to_float_array (const short *in, float *out, int len) ; void src_float_to_short_array (const float *in, short *out, int len) ; - #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ @@ -193,4 +191,3 @@ void src_float_to_short_array (const float *in, short *out, int len) ; ** ** arch-tag: 5421ef3e-c898-4ec3-8671-ea03d943ee00 */ - diff --git a/wii/libogc/include/sdcard/card_io.h b/wii/libogc/include/sdcard/card_io.h index 265947b55f..3953984d55 100644 --- a/wii/libogc/include/sdcard/card_io.h +++ b/wii/libogc/include/sdcard/card_io.h @@ -27,7 +27,6 @@ extern u8 g_CID[MAX_DRIVE][16]; extern u8 g_mCode[MAX_MI_NUM]; extern u16 g_dCode[MAX_MI_NUM][MAX_DI_NUM]; - void sdgecko_initIODefault(); s32 sdgecko_initIO(s32 drv_no); s32 sdgecko_preIO(s32 drv_no); @@ -43,7 +42,6 @@ s32 sdgecko_doUnmount(s32 drv_no); void sdgecko_insertedCB(s32 drv_no); void sdgecko_ejectedCB(s32 drv_no); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/wii/libogc/include/sdcard/wiisd_io.h b/wii/libogc/include/sdcard/wiisd_io.h index 8c1e62b6ac..ceca2ee9e4 100644 --- a/wii/libogc/include/sdcard/wiisd_io.h +++ b/wii/libogc/include/sdcard/wiisd_io.h @@ -8,7 +8,6 @@ Michael Wiedenbauer (shagkur) Dave Murphy (WinterMute) - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/wii/libogc/include/smb.h b/wii/libogc/include/smb.h index 579f1979c4..749576ff44 100644 --- a/wii/libogc/include/smb.h +++ b/wii/libogc/include/smb.h @@ -81,7 +81,6 @@ #define SMB_DENY_READ 0x30 #define SMB_DENY_NONE 0x40 - #ifdef __cplusplus extern "C" { #endif diff --git a/wii/libogc/include/wiikeyboard/keyboard.h b/wii/libogc/include/wiikeyboard/keyboard.h index 150086f291..f31d8bc4ac 100644 --- a/wii/libogc/include/wiikeyboard/keyboard.h +++ b/wii/libogc/include/wiikeyboard/keyboard.h @@ -83,10 +83,8 @@ s32 KEYBOARD_Deinit(void); s32 KEYBOARD_GetEvent(keyboard_event *event); s32 KEYBOARD_FlushEvents(void); - #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __KEYBOARD_H__ */ - diff --git a/wii/libogc/include/wiikeyboard/usbkeyboard.h b/wii/libogc/include/wiikeyboard/usbkeyboard.h index a5da919a18..bea7943231 100644 --- a/wii/libogc/include/wiikeyboard/usbkeyboard.h +++ b/wii/libogc/include/wiikeyboard/usbkeyboard.h @@ -73,4 +73,3 @@ s32 USBKeyboard_ToggleLed(const USBKeyboard_led led); #endif /* __cplusplus */ #endif /* __USBKEYBOARD_H__ */ - diff --git a/wii/libogc/include/wiiuse/wiiuse.h b/wii/libogc/include/wiiuse/wiiuse.h index 649e5a6dd9..68becb3931 100644 --- a/wii/libogc/include/wiiuse/wiiuse.h +++ b/wii/libogc/include/wiiuse/wiiuse.h @@ -191,7 +191,6 @@ typedef short sword; typedef unsigned int uint; typedef char sint; - struct wiimote_t; struct vec3b_t; struct orient_t; @@ -258,7 +257,6 @@ struct cmd_blk_t struct cmd_blk_t *next; }; - /** * @struct vec2b_t * @brief Unsigned x,y byte vector. @@ -267,7 +265,6 @@ typedef struct vec2b_t { ubyte x, y; } vec2b_t; - /** * @struct vec3b_t * @brief Unsigned x,y,z byte vector. @@ -284,7 +281,6 @@ typedef struct vec3w_t { uword x, y, z; } vec3w_t; - /** * @struct vec3f_t * @brief Signed x,y,z float struct. @@ -293,7 +289,6 @@ typedef struct vec3f_t { float x, y, z; } vec3f_t; - /** * @struct orient_t * @brief Orientation struct. @@ -309,7 +304,6 @@ typedef struct orient_t { float a_pitch; /**< absolute pitch, unsmoothed */ } orient_t; - /** * @struct gforce_t * @brief Gravity force struct. @@ -318,7 +312,6 @@ typedef struct gforce_t { float x, y, z; } gforce_t; - /** * @struct accel_t * @brief Accelerometer struct. For any device with an accelerometer. @@ -332,7 +325,6 @@ typedef struct accel_t { float st_alpha; /**< alpha value for smoothing [0-1] */ } accel_t; - /** * @struct ir_dot_t * @brief A single IR source. @@ -346,7 +338,6 @@ typedef struct ir_dot_t { ubyte size; /**< size of the IR dot (0-15) */ } ir_dot_t; - typedef struct fdot_t { float x,y; } fdot_t; @@ -369,7 +360,6 @@ typedef enum aspect_t { WIIUSE_ASPECT_16_9 } aspect_t; - /** * @struct ir_t * @brief IR struct. Hold all data related to the IR tracking. @@ -404,7 +394,6 @@ typedef struct ir_t { } ir_t; - /** * @struct joystick_t * @brief Joystick calibration structure. @@ -430,7 +419,6 @@ typedef struct joystick_t { float mag; /**< magnitude of the joystick (range 0-1) */ } joystick_t; - /** * @struct nunchuk_t * @brief Nunchuk expansion device. @@ -451,7 +439,6 @@ typedef struct nunchuk_t { struct gforce_t gforce; /**< current gravity forces on each axis */ } nunchuk_t; - /** * @struct classic_ctrl_t * @brief Classic controller expansion device. @@ -473,7 +460,6 @@ typedef struct classic_ctrl_t { ubyte type; /**< original, pro, wiiu pro */ } classic_ctrl_t; - /** * @struct guitar_hero_3_t * @brief Guitar Hero 3 expansion device. @@ -537,7 +523,6 @@ typedef struct expansion_t { }; } expansion_t; - /** * @enum win32_bt_stack_t * @brief Available bluetooth stacks for Windows. @@ -548,7 +533,6 @@ typedef enum win_bt_stack_t { WIIUSE_STACK_BLUESOLEIL } win_bt_stack_t; - /** * @struct wiimote_state_t * @brief Significant data from the previous event. @@ -561,7 +545,6 @@ typedef struct wiimote_state_t { struct expansion_t exp; } wiimote_state_t; - /** * @enum WIIUSE_EVENT_TYPE * @brief Events that wiiuse can generate from a poll. diff --git a/wii/libogc/libdb/debug.c b/wii/libogc/libdb/debug.c index d30351d7a3..2ca0f28d35 100644 --- a/wii/libogc/libdb/debug.c +++ b/wii/libogc/libdb/debug.c @@ -426,7 +426,6 @@ static void gdbstub_report_exception(frame_context *frame,s32 thread) } - void c_debug_handler(frame_context *frame) { char *ptr; @@ -650,4 +649,3 @@ void DEBUG_Init(s32 device_type,s32 channel_port) } __lwp_thread_dispatchenable(); } - diff --git a/wii/libogc/libdb/geckousb.c b/wii/libogc/libdb/geckousb.c index fed8f3424d..f0b936e612 100644 --- a/wii/libogc/libdb/geckousb.c +++ b/wii/libogc/libdb/geckousb.c @@ -89,7 +89,6 @@ static void __usb_flush(s32 chn) EXI_Unlock(chn); } - static int __usb_isgeckoalive(s32 chn) { s32 ret; diff --git a/wii/libogc/libdb/tcpip.c b/wii/libogc/libdb/tcpip.c index 0b88c0794d..f42610d737 100644 --- a/wii/libogc/libdb/tcpip.c +++ b/wii/libogc/libdb/tcpip.c @@ -176,7 +176,6 @@ static s8_t tcpip_recved(void *arg,struct uip_tcp_pcb *pcb,struct uip_pbuf *p,s8 return UIP_ERR_OK; } - static s8_t tcpip_accept_func(void *arg,struct uip_tcp_pcb *newpcb,s8_t err) { s32_t s; @@ -463,4 +462,3 @@ void tcpip_starttimer(s32_t s) if(tcpip_time==0 && sock->pcb && (uip_tcp_active_pcbs || uip_tcp_tw_pcbs)) tcpip_time = gettime(); } - diff --git a/wii/libogc/libdb/uIP/bba.c b/wii/libogc/libdb/uIP/bba.c index a228f61f1b..e34576f64a 100644 --- a/wii/libogc/libdb/uIP/bba.c +++ b/wii/libogc/libdb/uIP/bba.c @@ -346,7 +346,6 @@ static inline void bba_insdata(void *val,u32 len) EXI_ImmEx(EXI_CHANNEL_0,val,len,EXI_READ); } - static inline void bba_outsregister(u32 reg) { u32 req; @@ -373,14 +372,12 @@ static u32 __bba_getlink_state_async() { u32 ret; - if(EXI_Lock(EXI_CHANNEL_0,EXI_DEVICE_2,NULL)==0) return 0; ret = __linkstate(); EXI_Unlock(EXI_CHANNEL_0); return ret; } - static u32 __bba_read_cid() { u16 cmd = 0; diff --git a/wii/libogc/libdb/uIP/uip.h b/wii/libogc/libdb/uIP/uip.h index 06790c4129..95141ade46 100644 --- a/wii/libogc/libdb/uIP/uip.h +++ b/wii/libogc/libdb/uIP/uip.h @@ -14,7 +14,6 @@ * */ - /* * Copyright (c) 2001-2003, Adam Dunkels. * All rights reserved. @@ -171,6 +170,4 @@ u16_t htons(u16_t val); #endif /* __UIP_H__ */ - /** @} */ - diff --git a/wii/libogc/libdb/uIP/uip_arch.c b/wii/libogc/libdb/uIP/uip_arch.c index 17432a8f8e..060b129412 100644 --- a/wii/libogc/libdb/uIP/uip_arch.c +++ b/wii/libogc/libdb/uIP/uip_arch.c @@ -41,7 +41,6 @@ #include "uip_tcp.h" #include "uip_pbuf.h" - /*-----------------------------------------------------------------------------------*/ u16_t uip_chksum(u16_t *sdata, u32_t len) { diff --git a/wii/libogc/libdb/uIP/uip_arch.h b/wii/libogc/libdb/uIP/uip_arch.h index e90744cb02..1ab9d0ca83 100644 --- a/wii/libogc/libdb/uIP/uip_arch.h +++ b/wii/libogc/libdb/uIP/uip_arch.h @@ -133,8 +133,6 @@ u16_t uip_ipchksum_pbuf(struct uip_pbuf *p); */ u16_t uip_chksum_pseudo(struct uip_pbuf *p,struct uip_ip_addr *src,struct uip_ip_addr *dst,u8_t proto,u16_t proto_len); - - extern void tcpip_tmr_needed(); #define tcp_tmr_needed tcpip_tmr_needed diff --git a/wii/libogc/libdb/uIP/uip_arp.c b/wii/libogc/libdb/uIP/uip_arp.c index 1c7d43827a..c1baebbbe5 100644 --- a/wii/libogc/libdb/uIP/uip_arp.c +++ b/wii/libogc/libdb/uIP/uip_arp.c @@ -57,7 +57,6 @@ * */ - #include "uip_pbuf.h" #include "uip_netif.h" #include "uip_arp.h" @@ -78,7 +77,6 @@ struct uip_stats uip_stat; #define UIP_STAT(s) #endif /* UIP_STATISTICS == 1 */ - #define ARP_TRY_HARD 0x01 #define ARP_MAXAGE 240 diff --git a/wii/libogc/libdb/uIP/uip_arp.h b/wii/libogc/libdb/uIP/uip_arp.h index 40ae3c69ea..4cb0f95e1e 100644 --- a/wii/libogc/libdb/uIP/uip_arp.h +++ b/wii/libogc/libdb/uIP/uip_arp.h @@ -14,7 +14,6 @@ * \author Adam Dunkels */ - /* * Copyright (c) 2001-2003, Adam Dunkels. * All rights reserved. @@ -100,7 +99,6 @@ struct uip_ethip_hdr { } PACK_STRUCT_STRUCT; PACK_STRUCT_END - extern struct uip_eth_addr uip_ethaddr; struct uip_pbuf; @@ -146,5 +144,3 @@ s8_t uip_arp_arpquery(struct uip_netif *netif,struct uip_ip_addr *ipaddr,struct s8_t uip_arp_arprequest(struct uip_netif *netif,struct uip_ip_addr *ipaddr); #endif /* __UIP_ARP_H__ */ - - diff --git a/wii/libogc/libdb/uIP/uip_icmp.h b/wii/libogc/libdb/uIP/uip_icmp.h index 42928a0fab..0a8e29b30f 100644 --- a/wii/libogc/libdb/uIP/uip_icmp.h +++ b/wii/libogc/libdb/uIP/uip_icmp.h @@ -53,7 +53,6 @@ PACK_STRUCT_END struct uip_pbuf; struct uip_netif; - void uip_icmpinput(struct uip_pbuf *p,struct uip_netif *inp); void uip_icmp_destunreach(struct uip_pbuf *p,enum uip_icmp_dur_type t); diff --git a/wii/libogc/libdb/uIP/uip_ip.h b/wii/libogc/libdb/uIP/uip_ip.h index 5a2c6f9e92..adf9af3974 100644 --- a/wii/libogc/libdb/uIP/uip_ip.h +++ b/wii/libogc/libdb/uIP/uip_ip.h @@ -120,7 +120,6 @@ struct uip_pbuf; struct uip_netif; struct ip_addr; - void uip_ipinit(); u32_t uip_ipaddr(const u8_t *cp); @@ -131,5 +130,4 @@ s8_t uip_ipoutput_if(struct uip_pbuf *p,struct uip_ip_addr *src,struct uip_ip_ad struct uip_netif* uip_iproute(struct uip_ip_addr *dst); u8_t uip_ipaddr_isbroadcast(struct uip_ip_addr *addr,struct uip_netif *netif); - #endif diff --git a/wii/libogc/libdb/uIP/uip_netif.c b/wii/libogc/libdb/uIP/uip_netif.c index bfcbf0c914..383b7d2b1a 100644 --- a/wii/libogc/libdb/uIP/uip_netif.c +++ b/wii/libogc/libdb/uIP/uip_netif.c @@ -27,7 +27,6 @@ struct uip_stats uip_stat; #define UIP_STAT(s) #endif /* UIP_STATISTICS == 1 */ - struct uip_netif *uip_netif_list; struct uip_netif *uip_netif_default; diff --git a/wii/libogc/libdb/uIP/uip_pbuf.c b/wii/libogc/libdb/uIP/uip_pbuf.c index a5c4ee5cbe..c71190d407 100644 --- a/wii/libogc/libdb/uIP/uip_pbuf.c +++ b/wii/libogc/libdb/uIP/uip_pbuf.c @@ -186,7 +186,6 @@ u8_t uip_pbuf_header(struct uip_pbuf *p,s16_t hdr_size_inc) if(hdr_size_inc==0 || p==NULL) return 0; - payload = p->payload; if(p->flags==UIP_PBUF_FLAG_POOL || p->flags==UIP_PBUF_FLAG_RAM) { p->payload = (u8_t*)p->payload-hdr_size_inc; diff --git a/wii/libogc/libdb/uIP/uipopt.h b/wii/libogc/libdb/uIP/uipopt.h index d282e1d492..b6f8fbe91a 100644 --- a/wii/libogc/libdb/uIP/uipopt.h +++ b/wii/libogc/libdb/uIP/uipopt.h @@ -258,7 +258,6 @@ typedef u16 uip_stats_t; #define UIP_TCP_SEGS 32 - /** * Determines if support for TCP urgent data notification should be * compiled in. @@ -301,7 +300,6 @@ typedef u16 uip_stats_t; */ #define UIP_TCP_MSS (1460) - #define UIP_TCP_SND_BUF (4*UIP_TCP_MSS) #define UIP_TCP_SND_QUEUELEN (4*UIP_TCP_SND_BUF/UIP_TCP_MSS) @@ -316,7 +314,6 @@ typedef u16 uip_stats_t; */ #define UIP_TIME_WAIT_TIMEOUT 120 - /** @} */ /*------------------------------------------------------------------------------*/ /** @@ -367,7 +364,6 @@ typedef u16 uip_stats_t; #define UIP_PBUF_ROM_NUM 128 - /** * Determines if statistics support should be compiled in. * diff --git a/wii/libogc/libfat/cache.c b/wii/libogc/libfat/cache.c index 07576b9cbf..1cf425452b 100644 --- a/wii/libogc/libfat/cache.c +++ b/wii/libogc/libfat/cache.c @@ -70,7 +70,6 @@ CACHE* _FAT_cache_constructor (unsigned int numberOfPages, unsigned int sectorsP cache->sectorsPerPage = sectorsPerPage; cache->bytesPerSector = bytesPerSector; - cacheEntries = (CACHE_ENTRY*) _FAT_mem_allocate ( sizeof(CACHE_ENTRY) * numberOfPages); if (cacheEntries == NULL) { _FAT_mem_free (cache); @@ -103,7 +102,6 @@ void _FAT_cache_destructor (CACHE* cache) { _FAT_mem_free (cache); } - static u32 accessCounter = 0; static u32 accessTime(){ @@ -111,7 +109,6 @@ static u32 accessTime(){ return accessCounter; } - static CACHE_ENTRY* _FAT_cache_getPage(CACHE *cache,sec_t sector) { unsigned int i; @@ -265,7 +262,6 @@ bool _FAT_cache_eraseWritePartialSector (CACHE* cache, const void* buffer, sec_t return true; } - bool _FAT_cache_writeSectors (CACHE* cache, sec_t sector, sec_t numSectors, const void* buffer) { sec_t sec; diff --git a/wii/libogc/libfat/cache.h b/wii/libogc/libfat/cache.h index 07bb14c23e..27b4884c45 100644 --- a/wii/libogc/libfat/cache.h +++ b/wii/libogc/libfat/cache.h @@ -125,4 +125,3 @@ CACHE* _FAT_cache_constructor (unsigned int numberOfPages, unsigned int sectorsP void _FAT_cache_destructor (CACHE* cache); #endif // _CACHE_H - diff --git a/wii/libogc/libfat/directory.c b/wii/libogc/libfat/directory.c index 65906d844b..2f9b1650e5 100644 --- a/wii/libogc/libfat/directory.c +++ b/wii/libogc/libfat/directory.c @@ -200,7 +200,6 @@ static int _FAT_directory_mbsncasecmp (const char* s1, const char* s2, size_t le return towlower(wc1) - towlower(wc2); } - static bool _FAT_directory_entryGetAlias (const u8* entryData, char* destName) { char c; bool caseInfo; @@ -525,8 +524,6 @@ bool _FAT_directory_entryFromPosition (PARTITION* partition, DIR_ENTRY* entry) { return true; } - - bool _FAT_directory_entryFromPath (PARTITION* partition, DIR_ENTRY* entry, const char* path, const char* pathEnd) { size_t dirnameLength; const char* pathPosition; diff --git a/wii/libogc/libfat/disc.c b/wii/libogc/libfat/disc.c index 43592d4d35..df07252ee4 100644 --- a/wii/libogc/libfat/disc.c +++ b/wii/libogc/libfat/disc.c @@ -109,4 +109,3 @@ const INTERFACE_ID _FAT_disc_interfaces[] = { }; #endif - diff --git a/wii/libogc/libfat/fatdir.c b/wii/libogc/libfat/fatdir.c index 1ef5aec6d5..1113d6aecf 100644 --- a/wii/libogc/libfat/fatdir.c +++ b/wii/libogc/libfat/fatdir.c @@ -44,7 +44,6 @@ #include "filetime.h" #include "lock.h" - int _FAT_stat_r (struct _reent *r, const char *path, struct stat *st) { PARTITION* partition = NULL; DIR_ENTRY dirEntry; @@ -127,7 +126,6 @@ int _FAT_unlink_r (struct _reent *r, const char *path) { cluster = _FAT_directory_entryGetCluster (partition, dirEntry.entryData); - // If this is a directory, make sure it is empty if (_FAT_directory_isDirectory (&dirEntry)) { nextEntry = _FAT_directory_getFirstEntry (partition, &dirContents, cluster); @@ -425,7 +423,6 @@ int _FAT_mkdir_r (struct _reent *r, const char *path, int mode) { _FAT_cache_eraseWritePartialSector ( partition->cache, newEntryData, _FAT_fat_clusterToSector (partition, dirCluster), 0, DIR_ENTRY_DATA_SIZE); - // Create the double dot entry within the directory // if ParentDir == Rootdir then ".."" always link to Cluster 0 diff --git a/wii/libogc/libfat/fatdir.h b/wii/libogc/libfat/fatdir.h index 79fd2df90e..508cad78d7 100644 --- a/wii/libogc/libfat/fatdir.h +++ b/wii/libogc/libfat/fatdir.h @@ -28,7 +28,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #ifndef _FATDIR_H #define _FATDIR_H @@ -69,5 +68,4 @@ extern int _FAT_dirreset_r (struct _reent *r, DIR_ITER *dirState); extern int _FAT_dirnext_r (struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *filestat); extern int _FAT_dirclose_r (struct _reent *r, DIR_ITER *dirState); - #endif // _FATDIR_H diff --git a/wii/libogc/libfat/fatfile.c b/wii/libogc/libfat/fatfile.c index 06c2ca7c1e..054b4675bf 100644 --- a/wii/libogc/libfat/fatfile.c +++ b/wii/libogc/libfat/fatfile.c @@ -30,7 +30,6 @@ 2009-10-23 oggzee: fixes for cluster aligned file size (write, truncate, seek) */ - #include "fatfile.h" #include @@ -102,7 +101,6 @@ int FAT_setAttr(const char *file, uint8_t attr) { // Lock Partition _FAT_lock(&partition->lock); - // Write Data _FAT_cache_writePartialSector ( partition->cache // Cache to write @@ -124,7 +122,6 @@ int FAT_setAttr(const char *file, uint8_t attr) { return 0; } - int _FAT_open_r (struct _reent *r, void *fileStruct, const char *path, int flags, int mode) { PARTITION* partition = NULL; bool fileExists; @@ -381,7 +378,6 @@ int _FAT_syncToDisc (FILE_STRUCT* file) { return 0; } - int _FAT_close_r (struct _reent *r, void *fd) { FILE_STRUCT* file = (FILE_STRUCT*) fd; int ret = 0; @@ -807,7 +803,6 @@ ssize_t _FAT_write_r (struct _reent *r, void *fd, const char *ptr, size_t len) { ptr += tempVar; position.byte += tempVar; - // Move onto next sector if (position.byte >= partition->bytesPerSector) { position.byte = 0; @@ -917,7 +912,6 @@ ssize_t _FAT_write_r (struct _reent *r, void *fd, const char *ptr, size_t len) { remain = 0; } - // Amount written is the originally requested amount minus stuff remaining len = len - remain; @@ -940,7 +934,6 @@ ssize_t _FAT_write_r (struct _reent *r, void *fd, const char *ptr, size_t len) { return len; } - off_t _FAT_seek_r (struct _reent *r, void *fd, off_t pos, int dir) { FILE_STRUCT* file = (FILE_STRUCT*) fd; PARTITION* partition; @@ -1041,8 +1034,6 @@ off_t _FAT_seek_r (struct _reent *r, void *fd, off_t pos, int dir) { return position; } - - int _FAT_fstat_r (struct _reent *r, void *fd, struct stat *st) { FILE_STRUCT* file = (FILE_STRUCT*) fd; PARTITION* partition; diff --git a/wii/libogc/libfat/fatfile.h b/wii/libogc/libfat/fatfile.h index d2ae24ce52..b84bdc9c58 100644 --- a/wii/libogc/libfat/fatfile.h +++ b/wii/libogc/libfat/fatfile.h @@ -28,7 +28,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #ifndef _FATFILE_H #define _FATFILE_H diff --git a/wii/libogc/libfat/file_allocation_table.c b/wii/libogc/libfat/file_allocation_table.c index 72f8aa74aa..f4ffa901d5 100644 --- a/wii/libogc/libfat/file_allocation_table.c +++ b/wii/libogc/libfat/file_allocation_table.c @@ -27,7 +27,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include "file_allocation_table.h" #include "partition.h" #include "mem_allocate.h" @@ -58,7 +57,6 @@ uint32_t _FAT_fat_nextCluster(PARTITION* partition, uint32_t cluster) sector = partition->fat.fatStart + (((cluster * 3) / 2) / partition->bytesPerSector); offset = ((cluster * 3) / 2) % partition->bytesPerSector; - _FAT_cache_readLittleEndianValue (partition->cache, &nextCluster, sector, offset, sizeof(u8)); offset++; @@ -294,7 +292,6 @@ uint32_t _FAT_fat_linkFreeClusterCleared (PARTITION* partition, uint32_t cluster return newCluster; } - /*----------------------------------------------------------------- _FAT_fat_clearLinks frees any cluster used by a file @@ -390,4 +387,3 @@ unsigned int _FAT_fat_freeClusterCount (PARTITION* partition) { return count; } - diff --git a/wii/libogc/libfat/file_allocation_table.h b/wii/libogc/libfat/file_allocation_table.h index 4ba181130e..d5076ffe63 100644 --- a/wii/libogc/libfat/file_allocation_table.h +++ b/wii/libogc/libfat/file_allocation_table.h @@ -43,7 +43,6 @@ #define CLUSTERS_PER_FAT12 4085 #define CLUSTERS_PER_FAT16 65525 - uint32_t _FAT_fat_nextCluster(PARTITION* partition, uint32_t cluster); uint32_t _FAT_fat_linkFreeCluster(PARTITION* partition, uint32_t cluster); diff --git a/wii/libogc/libfat/filetime.c b/wii/libogc/libfat/filetime.c index a3c1c591b0..13ee2c8453 100644 --- a/wii/libogc/libfat/filetime.c +++ b/wii/libogc/libfat/filetime.c @@ -26,7 +26,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include #include "filetime.h" #include "common.h" @@ -66,7 +65,6 @@ uint16_t _FAT_filetime_getTimeFromRTC (void) { #endif } - uint16_t _FAT_filetime_getDateFromRTC (void) { #ifdef USE_RTC_TIME struct tm timeParts; diff --git a/wii/libogc/libfat/filetime.h b/wii/libogc/libfat/filetime.h index 9d6e70c93d..bc6149252a 100644 --- a/wii/libogc/libfat/filetime.h +++ b/wii/libogc/libfat/filetime.h @@ -37,5 +37,4 @@ uint16_t _FAT_filetime_getDateFromRTC (void); time_t _FAT_filetime_to_time_t (uint16_t t, uint16_t d); - #endif // _FILETIME_H diff --git a/wii/libogc/libfat/lock.h b/wii/libogc/libfat/lock.h index de5723a9cb..ef089876e8 100644 --- a/wii/libogc/libfat/lock.h +++ b/wii/libogc/libfat/lock.h @@ -67,6 +67,4 @@ void _FAT_unlock(mutex_t *mutex); #endif // USE_LWP_LOCK - #endif // _LOCK_H - diff --git a/wii/libogc/libfat/partition.c b/wii/libogc/libfat/partition.c index 1584e0ed59..b06aec6fc8 100644 --- a/wii/libogc/libfat/partition.c +++ b/wii/libogc/libfat/partition.c @@ -169,7 +169,6 @@ sec_t FindFirstValidPartition(const DISC_INTERFACE* disc) return ret; } - PARTITION* _FAT_partition_constructor_buf (const DISC_INTERFACE* disc, uint32_t cacheSize, uint32_t sectorsPerPage, sec_t startSector, uint8_t *sectorBuffer) { PARTITION* partition; @@ -309,7 +308,6 @@ PARTITION* _FAT_partition_constructor (const DISC_INTERFACE* disc, uint32_t cach return ret; } - void _FAT_partition_destructor (PARTITION* partition) { FILE_STRUCT* nextFile; diff --git a/wii/libogc/libogc/aram.c b/wii/libogc/libogc/aram.c index a306c4564b..cf095ac0c1 100644 --- a/wii/libogc/libogc/aram.c +++ b/wii/libogc/libogc/aram.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include @@ -296,7 +295,6 @@ static void __ARCheckSize() static u32 dummy_data[8] ATTRIBUTE_ALIGN(32); static u32 buffer[8] ATTRIBUTE_ALIGN(32); - while(!(_dspReg[11]&0x0001)); __ARSize = __ARInternalSize = arsize = 0x1000000; diff --git a/wii/libogc/libogc/arqmgr.c b/wii/libogc/libogc/arqmgr.c index 21dbf2d97a..e04a848c9d 100644 --- a/wii/libogc/libogc/arqmgr.c +++ b/wii/libogc/libogc/arqmgr.c @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #include #include "asm.h" diff --git a/wii/libogc/libogc/arqueue.c b/wii/libogc/libogc/arqueue.c index 04e5c2a54b..3cb66086e8 100644 --- a/wii/libogc/libogc/arqueue.c +++ b/wii/libogc/libogc/arqueue.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include @@ -254,4 +253,3 @@ u32 ARQ_RemoveOwnerRequest(u32 owner) return cnt; } - diff --git a/wii/libogc/libogc/audio.c b/wii/libogc/libogc/audio.c index 037688660a..5c2ae1e45c 100644 --- a/wii/libogc/libogc/audio.c +++ b/wii/libogc/libogc/audio.c @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #include #include "asm.h" #include "processor.h" diff --git a/wii/libogc/libogc/cache.c b/wii/libogc/libogc/cache.c index e9b35ade13..2e0846f6f2 100644 --- a/wii/libogc/libogc/cache.c +++ b/wii/libogc/libogc/cache.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include "cache.h" diff --git a/wii/libogc/libogc/cache_asm.S b/wii/libogc/libogc/cache_asm.S index a6e39de916..6782eb4109 100644 --- a/wii/libogc/libogc/cache_asm.S +++ b/wii/libogc/libogc/cache_asm.S @@ -468,4 +468,3 @@ LCStoreBlocks: ori r6,r6,0x0002 mtspr DMAL,r6 blr - diff --git a/wii/libogc/libogc/card.c b/wii/libogc/libogc/card.c index 2d47a074db..0ed29626fe 100644 --- a/wii/libogc/libogc/card.c +++ b/wii/libogc/libogc/card.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include @@ -419,7 +418,6 @@ static void __card_updateiconoffsets(struct card_direntry *entry,card_stat *stat stats->offset_icon_tlut[i] = -1; break; - } } // stats->offset_data = iconaddr; @@ -894,7 +892,6 @@ static void __timeouthandler(syswd_t alarm,void *cbarg) } if(chn=EXI_CHANNEL_2) return; - if(card->attached) { EXI_RegisterEXICallback(chn,NULL); cb = card->card_exi_cb; @@ -2050,7 +2047,6 @@ static s32 __dounlock(s32 chn,u32 *key) if(__card_readarrayunlock(chn,array_addr,tmp_buffer,len,0)<0) return CARD_ERROR_NOCARD; - val = exnor_1st(array_addr,(len<<3)+1); { u32 a,b,c,r1,r2,r3; diff --git a/wii/libogc/libogc/cond.c b/wii/libogc/libogc/cond.c index 2e8904084e..9733926765 100644 --- a/wii/libogc/libogc/cond.c +++ b/wii/libogc/libogc/cond.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include "asm.h" @@ -99,7 +98,6 @@ static s32 __lwp_cond_waitsupp(cond_t cond,mutex_t mutex,u64 timeout,u8 timedout return EINVAL; } - LWP_MutexUnlock(mutex); if(!timedout) { thecond->lock = mutex; diff --git a/wii/libogc/libogc/conf.c b/wii/libogc/libogc/conf.c index 3f26fdf15a..91fd50df6f 100644 --- a/wii/libogc/libogc/conf.c +++ b/wii/libogc/libogc/conf.c @@ -36,7 +36,6 @@ distribution. #include "processor.h" #include "conf.h" - static int __conf_inited = 0; static u8 __conf_buffer[0x4000] ATTRIBUTE_ALIGN(32); static char __conf_txt_buffer[0x101] ATTRIBUTE_ALIGN(32); diff --git a/wii/libogc/libogc/console.c b/wii/libogc/libogc/console.c index 8d7550aff1..1e8d4517df 100644 --- a/wii/libogc/libogc/console.c +++ b/wii/libogc/libogc/console.c @@ -99,7 +99,6 @@ void __console_vipostcb(u32 retraceCnt) do_xfb_copy = FALSE; } - static void __console_drawc(int c) { console_data_s *con; @@ -641,4 +640,3 @@ void CON_EnableGecko(int channel,int safe) } } } - diff --git a/wii/libogc/libogc/console.h b/wii/libogc/libogc/console.h index df05b1e798..fd0275589d 100644 --- a/wii/libogc/libogc/console.h +++ b/wii/libogc/libogc/console.h @@ -1,7 +1,6 @@ #ifndef __CONSOLE_H__ #define __CONSOLE_H__ - #define FONT_XSIZE 8 #define FONT_YSIZE 16 #define FONT_XFACTOR 1 diff --git a/wii/libogc/libogc/console_font_8x16.c b/wii/libogc/libogc/console_font_8x16.c index 21ef8da057..55d8009901 100644 --- a/wii/libogc/libogc/console_font_8x16.c +++ b/wii/libogc/libogc/console_font_8x16.c @@ -4609,5 +4609,3 @@ unsigned char console_font_8x16[] = { 0x00, /* 00000000 */ }; - - diff --git a/wii/libogc/libogc/decrementer.c b/wii/libogc/libogc/decrementer.c index eb1c962c33..12f1cef1ca 100644 --- a/wii/libogc/libogc/decrementer.c +++ b/wii/libogc/libogc/decrementer.c @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #include #include #include "asm.h" diff --git a/wii/libogc/libogc/dsp.c b/wii/libogc/libogc/dsp.c index 01b16f8013..20a0044df0 100644 --- a/wii/libogc/libogc/dsp.c +++ b/wii/libogc/libogc/dsp.c @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #include #include #include "asm.h" diff --git a/wii/libogc/libogc/dvd.c b/wii/libogc/libogc/dvd.c index 823e14e78c..a751dcd50d 100644 --- a/wii/libogc/libogc/dvd.c +++ b/wii/libogc/libogc/dvd.c @@ -31,7 +31,6 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ #include #include @@ -1346,7 +1345,6 @@ static void __dvd_patchdrivecb(s32 result) DVD_LowFuncCall(0x0040d000,__dvd_finalpatchcb); } - static void __dvd_unlockdrivecb(s32 result) { u32 i; diff --git a/wii/libogc/libogc/es.c b/wii/libogc/libogc/es.c index df4bd501e8..29ecc79946 100644 --- a/wii/libogc/libogc/es.c +++ b/wii/libogc/libogc/es.c @@ -100,7 +100,6 @@ distribution. #define IOCTL_ES_GETSHAREDCONTENTCNT 0x36 #define IOCTL_ES_GETSHAREDCONTENTS 0x37 - #define ES_HEAP_SIZE 0x800 #define ISALIGNED(x) ((((u32)x)&0x1F)==0) @@ -130,7 +129,6 @@ s32 __ES_Init(void) __es_fd = ret; } - __ES_InitFS(); return 0; @@ -927,7 +925,6 @@ static int _ES_read_r (struct _reent *r, void *fd, char *ptr, size_t len) { int read = 0; int res; - LWP_MutexLock(file->mutex); if(file->cfd < 0) { LWP_MutexUnlock(file->mutex); diff --git a/wii/libogc/libogc/exception.c b/wii/libogc/libogc/exception.c index e79a4fcdbf..421f366d29 100644 --- a/wii/libogc/libogc/exception.c +++ b/wii/libogc/libogc/exception.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include @@ -263,4 +262,3 @@ void c_default_exceptionhandler(frame_context *pCtx) waitForReload(); } - diff --git a/wii/libogc/libogc/exception_handler.S b/wii/libogc/libogc/exception_handler.S index 6ff209ad3d..43ccc968b9 100644 --- a/wii/libogc/libogc/exception_handler.S +++ b/wii/libogc/libogc/exception_handler.S @@ -238,6 +238,3 @@ systemcallhandler_start: rfi systemcallhandler_end: nop - - - diff --git a/wii/libogc/libogc/exi.c b/wii/libogc/libogc/exi.c index 961fd46592..c9e8b71e8b 100644 --- a/wii/libogc/libogc/exi.c +++ b/wii/libogc/libogc/exi.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include @@ -56,7 +55,6 @@ distribution. #define _SHIFTR(v, s, w) \ ((u32)(((u32)(v) >> (s)) & ((0x01 << (w)) - 1))) - struct _lck_dev { lwp_node node; u32 dev; @@ -730,7 +728,6 @@ void __ext_irq_handler(u32 nIrq,void *pCtx) if(exi->CallbackEXT) exi->CallbackEXT(chan,dev); } - /* EXI UART stuff */ static s32 __probebarnacle(s32 chn,u32 dev,u32 *rev) { @@ -795,7 +792,6 @@ void __SYS_EnableBarnacle(s32 chn,u32 dev) if(__probebarnacle(chn,dev,&rev)==0) return; - exi_uart_chan = chn; exi_uart_dev = dev; exi_uart_barnacle_enabled = 0xa5ff005a; diff --git a/wii/libogc/libogc/gcsd.c b/wii/libogc/libogc/gcsd.c index 5d41f048d7..5c9fb97721 100644 --- a/wii/libogc/libogc/gcsd.c +++ b/wii/libogc/libogc/gcsd.c @@ -55,7 +55,6 @@ static bool __gcsd_startup(int n) return __gcsd_isInserted(n); } - static bool __gcsd_readSectors(int n, u32 sector, u32 numSectors, void *buffer) { s32 ret; @@ -89,7 +88,6 @@ static bool __gcsd_shutdown(int n) return true; } - static bool __gcsda_startup(void) { return __gcsd_startup(0); @@ -120,8 +118,6 @@ static bool __gcsda_shutdown(void) return __gcsd_shutdown(0); } - - static bool __gcsdb_startup(void) { return __gcsd_startup(1); diff --git a/wii/libogc/libogc/gu.c b/wii/libogc/libogc/gu.c index 2c906ffb92..672b0ac1c1 100644 --- a/wii/libogc/libogc/gu.c +++ b/wii/libogc/libogc/gu.c @@ -410,16 +410,13 @@ u32 c_guMtxInverse(Mtx src,Mtx inv) else m = inv; - // compute the determinant of the upper 3x3 submatrix det = src[0][0]*src[1][1]*src[2][2] + src[0][1]*src[1][2]*src[2][0] + src[0][2]*src[1][0]*src[2][1] - src[2][0]*src[1][1]*src[0][2] - src[1][0]*src[0][1]*src[2][2] - src[0][0]*src[2][1]*src[1][2]; - // check if matrix is singular if(det==0.0f)return 0; - // compute the inverse of the upper submatrix: // find the transposed matrix of cofactors of the upper submatrix @@ -427,7 +424,6 @@ u32 c_guMtxInverse(Mtx src,Mtx inv) det = 1.0f / det; - m[0][0] = (src[1][1]*src[2][2] - src[2][1]*src[1][2]) * det; m[0][1] = -(src[0][1]*src[2][2] - src[2][1]*src[0][2]) * det; m[0][2] = (src[0][1]*src[1][2] - src[1][1]*src[0][2]) * det; @@ -440,7 +436,6 @@ u32 c_guMtxInverse(Mtx src,Mtx inv) m[2][1] = -(src[0][0]*src[2][1] - src[2][0]*src[0][1]) * det; m[2][2] = (src[0][0]*src[1][1] - src[1][0]*src[0][1]) * det; - // compute (invA)*(-C) m[0][3] = -m[0][0]*src[0][3] - m[0][1]*src[1][3] - m[0][2]*src[2][3]; m[1][3] = -m[1][0]*src[0][3] - m[1][1]*src[1][3] - m[1][2]*src[2][3]; @@ -463,12 +458,10 @@ void c_guMtxTranspose(Mtx src,Mtx xPose) else m = xPose; - m[0][0] = src[0][0]; m[0][1] = src[1][0]; m[0][2] = src[2][0]; m[0][3] = 0.0f; m[1][0] = src[0][1]; m[1][1] = src[1][1]; m[1][2] = src[2][1]; m[1][3] = 0.0f; m[2][0] = src[0][2]; m[2][1] = src[1][2]; m[2][2] = src[2][2]; m[2][3] = 0.0f; - // copy back if needed if(m==mTmp) c_guMtxCopy(mTmp,xPose); @@ -511,7 +504,6 @@ u32 c_guMtxInvXpose(Mtx src, Mtx xPose) m[2][1] = -(src[0][0]*src[1][2] - src[1][0]*src[0][2]) * det; m[2][2] = (src[0][0]*src[1][1] - src[1][0]*src[0][1]) * det; - // The 4th columns should be zero m[0][3] = 0.0F; m[1][3] = 0.0F; @@ -549,7 +541,6 @@ void c_guMtxReflect(Mtx m,guVector *p,guVector *n) m[2][3] = pdotn * n->z; } - void c_guVecAdd(guVector *a,guVector *b,guVector *ab) { ab->x = a->x + b->x; @@ -571,7 +562,6 @@ void c_guVecScale(guVector *src,guVector *dst,f32 scale) dst->z = src->z * scale; } - void c_guVecNormalize(guVector *v) { f32 m; diff --git a/wii/libogc/libogc/gx.c b/wii/libogc/libogc/gx.c index ff9b413e78..e69478afa1 100644 --- a/wii/libogc/libogc/gx.c +++ b/wii/libogc/libogc/gx.c @@ -15,7 +15,6 @@ #define TEXCACHE_TESTING - #define GX_FINISH 2 #if defined(HW_DOL) @@ -129,7 +128,6 @@ static u32 _gxtexregionaddrtable[48] = }; #endif - extern u8 __gxregs[]; static struct __gx_regdef *__gx = (struct __gx_regdef*)__gxregs; static u8 _gx_saved_data[STRUCT_REGDEF_SIZE] ATTRIBUTE_ALIGN(32); @@ -1652,7 +1650,6 @@ void GX_SetDrawDone() _CPU_ISR_Restore(level); } - void GX_WaitDrawDone() { u32 level; @@ -2963,7 +2960,6 @@ u16 GX_GetTexObjWidth(GXTexObj* obj) return (((struct __gx_texobj*)obj)->tex_size & 0x3ff) + 1; } - void GX_GetTexObjAll(GXTexObj* obj, void** image_ptr, u16* width, u16* height, u8* format, u8* wrap_s, u8* wrap_t, u8* mipmap) { diff --git a/wii/libogc/libogc/ipc.c b/wii/libogc/libogc/ipc.c index 10fed37bce..9e145f0c77 100644 --- a/wii/libogc/libogc/ipc.c +++ b/wii/libogc/libogc/ipc.c @@ -1101,7 +1101,6 @@ s32 IOS_Ioctlv(s32 fd,s32 ioctl,s32 cnt_in,s32 cnt_io,ioctlv *argv) return ret; } - s32 IOS_IoctlvAsync(s32 fd,s32 ioctl,s32 cnt_in,s32 cnt_io,ioctlv *argv,ipccallback ipc_cb,void *usrdata) { s32 i; diff --git a/wii/libogc/libogc/irq.c b/wii/libogc/libogc/irq.c index 0e59f51e2b..36e25e3038 100644 --- a/wii/libogc/libogc/irq.c +++ b/wii/libogc/libogc/irq.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include "asm.h" diff --git a/wii/libogc/libogc/isfs.c b/wii/libogc/libogc/isfs.c index b08ca977d0..44f79443a1 100644 --- a/wii/libogc/libogc/isfs.c +++ b/wii/libogc/libogc/isfs.c @@ -108,7 +108,6 @@ struct isfs_cb void *funcargv[8]; }; - static s32 hId = -1; static s32 _fs_fd = -1; static char _dev_fs[] ATTRIBUTE_ALIGN(32) = "/dev/fs"; @@ -840,5 +839,4 @@ s32 ISFS_GetUsageAsync(const char* filepath, u32* usage1, u32* usage2,isfscallba return IOS_IoctlvAsync(_fs_fd,ISFS_IOCTL_GETUSAGE,1,2,param->fsusage.vector,__isfsFunctionCB,param); } - #endif /* defined(HW_RVL) */ diff --git a/wii/libogc/libogc/kprintf.c b/wii/libogc/libogc/kprintf.c index 976a756704..d3a7e232db 100644 --- a/wii/libogc/libogc/kprintf.c +++ b/wii/libogc/libogc/kprintf.c @@ -214,7 +214,6 @@ int kvsprintf(char *buf, const char *fmt, va_list args) field_width, precision, flags); continue; - case 'n': if (qualifier == 'l') { long * ip = va_arg(args, long *); diff --git a/wii/libogc/libogc/lock_supp.c b/wii/libogc/libogc/lock_supp.c index 82ceabbbca..e9fe1949c7 100644 --- a/wii/libogc/libogc/lock_supp.c +++ b/wii/libogc/libogc/lock_supp.c @@ -12,7 +12,6 @@ #include "processor.h" #include "mutex.h" - int __libogc_lock_init(int *lock,int recursive) { s32 ret; @@ -51,7 +50,6 @@ int __libogc_lock_acquire(int *lock) return LWP_MutexLock(plock); } - int __libogc_lock_release(int *lock) { mutex_t plock; @@ -61,4 +59,3 @@ int __libogc_lock_release(int *lock) plock = (mutex_t)*lock; return LWP_MutexUnlock(plock); } - diff --git a/wii/libogc/libogc/lwp.c b/wii/libogc/libogc/lwp.c index 678792adb7..0f338203e4 100644 --- a/wii/libogc/libogc/lwp.c +++ b/wii/libogc/libogc/lwp.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include "asm.h" @@ -301,7 +300,6 @@ BOOL LWP_ThreadIsSuspended(lwp_t thethread) return state; } - s32 LWP_JoinThread(lwp_t thethread,void **value_ptr) { u32 level; diff --git a/wii/libogc/libogc/lwp_heap.c b/wii/libogc/libogc/lwp_heap.c index a6d76498ce..905fea16c8 100644 --- a/wii/libogc/libogc/lwp_heap.c +++ b/wii/libogc/libogc/lwp_heap.c @@ -6,7 +6,6 @@ #include "lwp_heap.h" - u32 __lwp_heap_init(heap_cntrl *theheap,void *start_addr,u32 size,u32 pg_size) { u32 dsize,level; @@ -48,7 +47,6 @@ void* __lwp_heap_allocate(heap_cntrl *theheap,u32 size) void *ptr; u32 offset,level; - if(size>=(-1-HEAP_BLOCK_USED_OVERHEAD)) return NULL; _CPU_ISR_Disable(level); diff --git a/wii/libogc/libogc/lwp_threads.c b/wii/libogc/libogc/lwp_threads.c index 6a9d8657c0..1e36adc532 100644 --- a/wii/libogc/libogc/lwp_threads.c +++ b/wii/libogc/libogc/lwp_threads.c @@ -747,4 +747,3 @@ void __lwp_thread_coreinit() __sys_state_set(SYS_STATE_BEFORE_MT); } - diff --git a/wii/libogc/libogc/message.c b/wii/libogc/libogc/message.c index 4a529de321..c3ff9ca4a0 100644 --- a/wii/libogc/libogc/message.c +++ b/wii/libogc/libogc/message.c @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #include #include #include diff --git a/wii/libogc/libogc/mutex.c b/wii/libogc/libogc/mutex.c index 57a83f61fb..8148028b45 100644 --- a/wii/libogc/libogc/mutex.c +++ b/wii/libogc/libogc/mutex.c @@ -27,7 +27,6 @@ distribution. -------------------------------------------------------------*/ - #include #include #include "asm.h" @@ -71,7 +70,6 @@ void __lwp_mutex_init() __lwp_objmgr_initinfo(&_lwp_mutex_objects,LWP_MAX_MUTEXES,sizeof(mutex_st)); } - static __inline__ mutex_st* __lwp_mutex_open(mutex_t lock) { LWP_CHECK_MUTEX(lock); diff --git a/wii/libogc/libogc/network_common.c b/wii/libogc/libogc/network_common.c index 4ab126d2ff..5cd6a1bc7b 100644 --- a/wii/libogc/libogc/network_common.c +++ b/wii/libogc/libogc/network_common.c @@ -11,7 +11,6 @@ #define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') #endif - /* * Ascii internet address interpretation routine. * The value returned is in network order. @@ -162,7 +161,6 @@ char *inet_ntoa(struct in_addr addr) return str; } - #ifndef BYTE_ORDER #error BYTE_ORDER is not defined #endif diff --git a/wii/libogc/libogc/network_wii.c b/wii/libogc/libogc/network_wii.c index 5c76cd8f49..5ac1f409d9 100644 --- a/wii/libogc/libogc/network_wii.c +++ b/wii/libogc/libogc/network_wii.c @@ -27,7 +27,6 @@ distribution. #if defined(HW_RVL) - #define MAX_IP_RETRIES 100 #define MAX_INIT_RETRIES 32 @@ -1046,7 +1045,6 @@ s32 net_fcntl(s32 s, u32 cmd, u32 flags) if (net_ip_top_fd < 0) return -ENXIO; if (cmd != F_GETFL && cmd != F_SETFL) return -EINVAL; - params[0] = s; params[1] = cmd; params[2] = flags; @@ -1058,7 +1056,6 @@ s32 net_fcntl(s32 s, u32 cmd, u32 flags) return ret; } - /*! * \fn s32 net_poll(struct pollsd *sds, u32 nsds, s64 timeout) * \brief Poll a set of sockets for a set of events. diff --git a/wii/libogc/libogc/newlibc.c b/wii/libogc/libogc/newlibc.c index 4677607e71..f386c37cc6 100644 --- a/wii/libogc/libogc/newlibc.c +++ b/wii/libogc/libogc/newlibc.c @@ -68,5 +68,3 @@ void __libc_wrapup() _REENT = &libc_globl_reent; } } - - diff --git a/wii/libogc/libogc/pad.c b/wii/libogc/libogc/pad.c index 57726e8fb0..6210dc75ef 100644 --- a/wii/libogc/libogc/pad.c +++ b/wii/libogc/libogc/pad.c @@ -700,7 +700,6 @@ u32 PAD_ScanPads() return connected; } - u16 PAD_ButtonsUp(int pad) { if(padPAD_CHAN3 || __pad_keys[pad].chan==-1) return 0; diff --git a/wii/libogc/libogc/sdgecko_io.c b/wii/libogc/libogc/sdgecko_io.c index 19e469b5cf..b491aa08a2 100644 --- a/wii/libogc/libogc/sdgecko_io.c +++ b/wii/libogc/libogc/sdgecko_io.c @@ -310,7 +310,6 @@ static s32 __card_writecmd0(s32 drv_no) return CARDIO_ERROR_NOCARD; } - cnt = 0; while(cnt<20) { if(EXI_ImmEx(drv_no,dummy,128,EXI_WRITE)==0) { @@ -1222,7 +1221,6 @@ s32 sdgecko_readSectors(s32 drv_no,u32 sector_no,u32 num_sectors,void *buf) if(num_sectors<1) return CARDIO_ERROR_INTERNAL; - // Must be 512b, otherwise fail! if(PAGE_SIZE512!=_ioPageSize[drv_no]) { _ioPageSize[drv_no] = PAGE_SIZE512; @@ -1258,7 +1256,6 @@ s32 sdgecko_writeSectors(s32 drv_no,u32 sector_no,u32 num_sectors,const void *bu if(num_sectors<1) return CARDIO_ERROR_INTERNAL; - if(PAGE_SIZE512!=_ioPageSize[drv_no]) { _ioPageSize[drv_no] = PAGE_SIZE512; if((ret=__card_setblocklen(drv_no,_ioPageSize[drv_no]))!=0) return ret; diff --git a/wii/libogc/libogc/semaphore.c b/wii/libogc/libogc/semaphore.c index 9cb7e605c4..0f132531ed 100644 --- a/wii/libogc/libogc/semaphore.c +++ b/wii/libogc/libogc/semaphore.c @@ -25,10 +25,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -------------------------------------------------------------*/ - #include #include #include @@ -45,7 +43,6 @@ distribution. return NULL; \ } - typedef struct _sema_st { lwp_obj object; diff --git a/wii/libogc/libogc/stm.c b/wii/libogc/libogc/stm.c index 6bc9066ad5..bcb06752b3 100644 --- a/wii/libogc/libogc/stm.c +++ b/wii/libogc/libogc/stm.c @@ -238,6 +238,4 @@ s32 STM_RebootSystem() return res; } - - #endif /* defined(HW_RVL) */ diff --git a/wii/libogc/libogc/system.c b/wii/libogc/libogc/system.c index 9e76ae3e07..e6519743f4 100644 --- a/wii/libogc/libogc/system.c +++ b/wii/libogc/libogc/system.c @@ -195,7 +195,6 @@ extern void __console_init_ex(void *conbuffer,int tgt_xstart,int tgt_ystart,int extern int clock_gettime(struct timespec *tp); extern void timespec_subtract(const struct timespec *tp_start,const struct timespec *tp_end,struct timespec *result); - extern int __libogc_lock_init(int *lock,int recursive); extern int __libogc_lock_close(int *lock); extern int __libogc_lock_release(int *lock); @@ -1410,7 +1409,6 @@ void SYS_ProtectRange(u32 chan,void *addr,u32 bytes,u32 cntrl) if(cntrl==SYS_PROTECTRDWR) __MaskIrq(IRQMASK(chan)); - _CPU_ISR_Restore(level); } } diff --git a/wii/libogc/libogc/timesupp.c b/wii/libogc/libogc/timesupp.c index 8ca1be8ee9..6d3f51cb03 100644 --- a/wii/libogc/libogc/timesupp.c +++ b/wii/libogc/libogc/timesupp.c @@ -21,8 +21,6 @@ extern u32 __SYS_GetRTC(u32 *gctime); extern syssram* __SYS_LockSram(); extern u32 __SYS_UnlockSram(u32 write); - - u32 _DEFUN(gettick,(), _NOARGS) @@ -35,7 +33,6 @@ u32 _DEFUN(gettick,(), return result; } - u64 _DEFUN(gettime,(), _NOARGS) { @@ -320,4 +317,3 @@ int __libogc_gettod_r(struct _reent *ptr, struct timeval *tp, struct timezone *t } return 0; } - diff --git a/wii/libogc/libogc/usb.c b/wii/libogc/libogc/usb.c index f48c6ff2e4..6f08611e74 100644 --- a/wii/libogc/libogc/usb.c +++ b/wii/libogc/libogc/usb.c @@ -28,7 +28,6 @@ distribution. -------------------------------------------------------------*/ - /* Note: There are 3 types of USB interfaces here, the early ones * (V0: /dev/usb/oh0 and /dev/usb/oh1) and two later ones (V5: /dev/usb/ven * and /dev/usb/hid) which are similar but have some small @@ -1346,7 +1345,6 @@ s32 USB_DeviceChangeNotifyAsync(u8 interface_class, usbcallback cb, void* userda else if (interface_class==USB_CLASS_HID && hid_host) ret = add_devicechange_cb(&hid_host->device_change_notify, cb, userdata); - return ret; } @@ -1461,4 +1459,3 @@ s32 USB_ClearHalt(s32 fd, u8 endpoint) } #endif /* defined(HW_RVL) */ - diff --git a/wii/libogc/libogc/usbgecko.c b/wii/libogc/libogc/usbgecko.c index c00630a207..6c86ec64d1 100644 --- a/wii/libogc/libogc/usbgecko.c +++ b/wii/libogc/libogc/usbgecko.c @@ -14,7 +14,6 @@ #define _SHIFTR(v, s, w) \ ((u32)(((u32)(v) >> (s)) & ((0x01 << (w)) - 1))) - static u32 usbgecko_inited = 0; static lwpq_t wait_exi_queue[2]; diff --git a/wii/libogc/libogc/video.c b/wii/libogc/libogc/video.c index 9012530ea2..cb88c190e7 100644 --- a/wii/libogc/libogc/video.c +++ b/wii/libogc/libogc/video.c @@ -29,7 +29,6 @@ video.c -- VIDEO subsystem -------------------------------------------------------------*/ - #include #include #include @@ -328,7 +327,6 @@ GXRModeObj TVNtsc480IntAa = } }; - GXRModeObj TVNtsc480Prog = { VI_TVMODE_NTSC_PROG, // viDisplayMode @@ -1234,7 +1232,6 @@ GXRModeObj TVEurgb60Hz480ProgAa = } }; - static const u16 taps[26] = { 0x01F0,0x01DC,0x01AE,0x0174,0x0129,0x00DB, 0x008E,0x0046,0x000C,0x00E2,0x00CB,0x00C0, @@ -2534,7 +2531,6 @@ GXRModeObj *rmode = NULL; return mode; - } u32 VIDEO_GetCurrentLine() diff --git a/wii/libogc/libogc/wiilaunch.c b/wii/libogc/libogc/wiilaunch.c index 1acbffa8b6..367a957e20 100644 --- a/wii/libogc/libogc/wiilaunch.c +++ b/wii/libogc/libogc/wiilaunch.c @@ -76,7 +76,6 @@ typedef struct { #define RETURN_TO_SETTINGS 1 #define RETURN_TO_ARGS 2 - static NANDBootInfo nandboot ATTRIBUTE_ALIGN(32); static StateFlags stateflags ATTRIBUTE_ALIGN(32); diff --git a/wii/libogc/libogc/wiisd.c b/wii/libogc/libogc/wiisd.c index 51c629a20f..de143570de 100644 --- a/wii/libogc/libogc/wiisd.c +++ b/wii/libogc/libogc/wiisd.c @@ -239,7 +239,6 @@ static s32 __sdio_gethcr(u8 reg, u8 size, u32 *val) ret = IOS_Ioctl(__sd0_fd,IOCTL_SDIO_READHCREG,(void*)hcr_query,24,hcr_value,sizeof(u32)); *val = *hcr_value; - return ret; } @@ -256,7 +255,6 @@ static s32 __sdio_sethcr(u8 reg, u8 size, u32 data) hcr_query[5] = 0; ret = IOS_Ioctl(__sd0_fd,IOCTL_SDIO_WRITEHCREG,(void*)hcr_query,24,NULL,0); - return ret; } @@ -356,7 +354,6 @@ static s32 __sd0_getcid() return ret; } - static bool __sd0_initio() { s32 ret; @@ -513,8 +510,6 @@ bool sdio_Startup() return true; } - - bool sdio_Shutdown() { if(__sd0_initialized==0) return false; diff --git a/wii/libogc/libwiikeyboard/keyboard.c b/wii/libogc/libwiikeyboard/keyboard.c index b7a67f5588..73c65cf0d9 100644 --- a/wii/libogc/libwiikeyboard/keyboard.c +++ b/wii/libogc/libwiikeyboard/keyboard.c @@ -661,4 +661,3 @@ s32 KEYBOARD_FlushEvents(void) return res; } - diff --git a/wii/libogc/libwiikeyboard/ukbdmap.c b/wii/libogc/libwiikeyboard/ukbdmap.c index 56163df230..db11bc912a 100644 --- a/wii/libogc/libwiikeyboard/ukbdmap.c +++ b/wii/libogc/libwiikeyboard/ukbdmap.c @@ -568,7 +568,6 @@ static const keysym_t ukbd_keydesc_be[] = { KC(230), KS_Mode_switch, KS_Multi_key, }; - static const keysym_t ukbd_keydesc_us_dvorak[] = { /* pos command normal shifted */ KC(5), KS_x, diff --git a/wii/libogc/libwiikeyboard/usbkeyboard.c b/wii/libogc/libwiikeyboard/usbkeyboard.c index 1b2d45a6e3..d074351746 100644 --- a/wii/libogc/libwiikeyboard/usbkeyboard.c +++ b/wii/libogc/libwiikeyboard/usbkeyboard.c @@ -492,4 +492,3 @@ s32 USBKeyboard_ToggleLed(const USBKeyboard_led led) return 1; } - diff --git a/wii/libogc/lwbt/bt.h b/wii/libogc/lwbt/bt.h index 475bc6f894..7c08d115c7 100644 --- a/wii/libogc/lwbt/bt.h +++ b/wii/libogc/lwbt/bt.h @@ -14,7 +14,6 @@ * */ - /* * Copyright (c) 2001-2003, Adam Dunkels. * All rights reserved. @@ -98,7 +97,6 @@ # endif /* BYTE_ORDER == BIG_ENDIAN */ #endif /* HTONS */ - /** * Convert 16-bit quantity from host byte order to network byte order. * @@ -114,6 +112,4 @@ u16_t htons(u16_t val); #endif /* __UIP_H__ */ - /** @} */ - diff --git a/wii/libogc/lwbt/btarch.h b/wii/libogc/lwbt/btarch.h index 34feb08160..226d0ed118 100644 --- a/wii/libogc/lwbt/btarch.h +++ b/wii/libogc/lwbt/btarch.h @@ -63,7 +63,6 @@ #define MEM_ALIGN(mem) ((void*)(((u32_t)(mem)+MEM_ALIGNMENT-1)&~(u32_t)(MEM_ALIGNMENT-1))) #define MEM_ALIGN_SIZE(size) (((size)+MEM_ALIGNMENT-1)&~(u32_t)(MEM_ALIGNMENT-1)) - #if BYTE_ORDER == BIG_ENDIAN #ifndef htole16 #define htole16 bswap16 diff --git a/wii/libogc/lwbt/bte.c b/wii/libogc/lwbt/bte.c index 9e3ae4e11e..dcf0a49585 100644 --- a/wii/libogc/lwbt/bte.c +++ b/wii/libogc/lwbt/bte.c @@ -13,7 +13,6 @@ #include "btmemb.h" #include "physbusif.h" - #define STACKSIZE 32768 #define MQ_BOX_SIZE 256 @@ -112,7 +111,6 @@ err_t bte_inquiry_complete(void *arg,struct hci_pcb *pcb,struct hci_inq_res *ire err_t bte_read_stored_link_key_complete(void *arg,struct hci_pcb *pcb,u8_t ogf,u8_t ocf,u8_t result); err_t bte_read_bd_addr_complete(void *arg,struct hci_pcb *pcb,u8_t ogf,u8_t ocf,u8_t result); - MEMB(bte_pcbs,sizeof(struct bte_pcb),MEMP_NUM_BTE_PCB); MEMB(bte_ctrl_reqs,sizeof(struct ctrl_req_t),MEMP_NUM_BTE_CTRLS); @@ -1358,4 +1356,3 @@ err_t bte_hci_initsub_complete(void *arg,struct hci_pcb *pcb,u8_t ogf,u8_t ocf,u if(err!=ERR_OK) __bte_cmdfinish(state,err); return err; } - diff --git a/wii/libogc/lwbt/btopt.h b/wii/libogc/lwbt/btopt.h index a411fc1da7..90e6df09d8 100644 --- a/wii/libogc/lwbt/btopt.h +++ b/wii/libogc/lwbt/btopt.h @@ -161,7 +161,6 @@ typedef s8 err_t; #define PBUF_ROM_NUM 45 - /** * Determines if statistics support should be compiled in. * @@ -348,5 +347,4 @@ void bt_log(const char *filename,int line_nb,char *msg); outgoing packets. Only the first packet sent when out of credits will be queued */ #define RFCOMM_FLOW_QUEUEING 0 /* Default: 0 */ - #endif /* __BTOPT_H__ */ diff --git a/wii/libogc/lwbt/btpbuf.c b/wii/libogc/lwbt/btpbuf.c index 67be97c152..5b39ec00e8 100644 --- a/wii/libogc/lwbt/btpbuf.c +++ b/wii/libogc/lwbt/btpbuf.c @@ -174,7 +174,6 @@ u8_t btpbuf_header(struct pbuf *p,s16_t hdr_size_inc) if(hdr_size_inc==0 || p==NULL) return 0; - payload = p->payload; if(p->flags==PBUF_FLAG_POOL || p->flags==PBUF_FLAG_RAM) { p->payload = (u8_t*)p->payload-hdr_size_inc; diff --git a/wii/libogc/lwbt/hci.c b/wii/libogc/lwbt/hci.c index b0a4a07f5e..95abae37a7 100644 --- a/wii/libogc/lwbt/hci.c +++ b/wii/libogc/lwbt/hci.c @@ -368,7 +368,6 @@ err_t hci_read_stored_link_key() btmemb_free(&hci_link_key_results,tmpres); } - if((p=btpbuf_alloc(PBUF_RAW,HCI_R_STORED_LINK_KEY_PLEN,PBUF_RAM))==NULL) { ERROR("hci_read_stored_link_keys: Could not allocate memory for pbuf\n"); return ERR_MEM; @@ -905,7 +904,6 @@ err_t hci_link_key_req_reply(struct bd_addr *bdaddr, unsigned char *link_key) return ERR_OK; } - /*-----------------------------------------------------------------------------------*/ /* hci_pin_code_request_neg_reply(): * @@ -1324,7 +1322,6 @@ err_t lp_connect_req(struct bd_addr *bdaddr, u8_t allow_role_switch) bd_addr_set(&(link->bdaddr), bdaddr); HCI_REG(&(hci_active_links), link); - /* Check if module has been discovered in a recent inquiry */ for(inqres = hci_dev->ires; inqres != NULL; inqres = inqres->next) { if(bd_addr_cmp(&inqres->bdaddr, bdaddr)) { diff --git a/wii/libogc/lwbt/hci.h b/wii/libogc/lwbt/hci.h index 6f3010851d..84c370b420 100644 --- a/wii/libogc/lwbt/hci.h +++ b/wii/libogc/lwbt/hci.h @@ -419,7 +419,6 @@ err_t lp_acl_write(struct bd_addr *bdaddr,struct pbuf *p,u16_t len,u8_t pb); err_t lp_connect_req(struct bd_addr *bdaddr, u8_t allow_role_switch); err_t lp_write_flush_timeout(struct bd_addr *bdaddr, u16_t flushto); - #define HCI_EVENT_PIN_REQ(pcb,bdaddr,ret) \ if((pcb)->pin_req != NULL) { \ (ret = (pcb)->pin_req((pcb)->cbarg,(bdaddr))); \ diff --git a/wii/libogc/lwbt/l2cap.c b/wii/libogc/lwbt/l2cap.c index 5fa9c38d56..0ca056eaf6 100644 --- a/wii/libogc/lwbt/l2cap.c +++ b/wii/libogc/lwbt/l2cap.c @@ -413,7 +413,6 @@ void l2cap_process_sig(struct pbuf *q, struct l2cap_hdr *l2caphdr, struct bd_add siglen -= 4; btpbuf_header(p, -4); - LOG("l2cap_process_sig: Congfiguration request, flags = %d\n", flags); /* Find PCB with matching cid */ diff --git a/wii/libogc/lwbt/physbusif.c b/wii/libogc/lwbt/physbusif.c index 669b6a6548..dbed6244a5 100644 --- a/wii/libogc/lwbt/physbusif.c +++ b/wii/libogc/lwbt/physbusif.c @@ -277,7 +277,6 @@ void __ntd_set_pid_vid(u16 vid,u16 pid) __ntd_vid_pid_specified = 1; } - void physbusif_init() { s32 ret; diff --git a/wii/libogc/lwip/arch/gc/netif/gcif.c b/wii/libogc/lwip/arch/gc/netif/gcif.c index 31cbb90257..a2db3c8389 100644 --- a/wii/libogc/lwip/arch/gc/netif/gcif.c +++ b/wii/libogc/lwip/arch/gc/netif/gcif.c @@ -171,7 +171,6 @@ #define BBA_NAPI_WEIGHT 16 - #define X(a,b) b,a struct bba_descr { u32 X(X(next_packet_ptr:12, packet_len:12), status:8); @@ -182,7 +181,6 @@ struct bba_descr { #define _SHIFTR(v, s, w) \ ((u32)(((u32)(v) >> (s)) & ((0x01 << (w)) - 1))) - struct bba_priv { u8 flag; u8 revid; @@ -402,7 +400,6 @@ static inline void bba_ins(u32 reg,void *val,u32 len) bba_deselect(); } - static inline void bba_outs(u32 reg,void *val,u32 len) { bba_select(); diff --git a/wii/libogc/lwip/core/dhcp.c b/wii/libogc/lwip/core/dhcp.c index b79d4e2f2a..0238888edc 100644 --- a/wii/libogc/lwip/core/dhcp.c +++ b/wii/libogc/lwip/core/dhcp.c @@ -697,7 +697,6 @@ static err_t dhcp_decline(struct netif *netif) } #endif - /** * Start the DHCP process, discover a DHCP server. * @@ -751,7 +750,6 @@ static err_t dhcp_discover(struct netif *netif) return result; } - /** * Bind the interface to the offered IP address. * @@ -1146,7 +1144,6 @@ static void dhcp_free_reply(struct dhcp *dhcp) LWIP_DEBUGF(DHCP_DEBUG, ("dhcp_free_reply(): free'd\n")); } - /** * If an incoming DHCP message is in response to us, then trigger the state machine */ @@ -1250,7 +1247,6 @@ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_ dhcp->p = NULL; } - static err_t dhcp_create_request(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; diff --git a/wii/libogc/lwip/core/inet.c b/wii/libogc/lwip/core/inet.c index 16edc8e937..d22aabb904 100644 --- a/wii/libogc/lwip/core/inet.c +++ b/wii/libogc/lwip/core/inet.c @@ -30,7 +30,6 @@ * */ - /* inet.c * * Functions common to all TCP/IP modules, such as the Internet checksum and the @@ -38,7 +37,6 @@ * */ - #include "lwip/opt.h" #include "lwip/arch.h" @@ -327,4 +325,3 @@ inet_chksum_pbuf(struct pbuf *p) } return (u16_t)~(acc & 0xffffUL); } - diff --git a/wii/libogc/lwip/core/inet6.c b/wii/libogc/lwip/core/inet6.c index 0864a9dd54..bec1f40073 100644 --- a/wii/libogc/lwip/core/inet6.c +++ b/wii/libogc/lwip/core/inet6.c @@ -30,7 +30,6 @@ * */ - /* inet6.c * * Functions common to all TCP/IP modules, such as the Internet checksum and the @@ -38,14 +37,11 @@ * */ - #include "lwip/opt.h" #include "lwip/def.h" #include "lwip/inet.h" - - /* chksum: * * Sums up all 16 bit words in a memory portion. Also includes any odd byte. @@ -61,7 +57,6 @@ chksum(void *dataptr, u16_t len) u16_t *sdataptr = dataptr; u32_t acc; - for(acc = 0; len > 1; len -= 2) { acc += *sdataptr++; } @@ -165,4 +160,3 @@ inet_chksum_pbuf(struct pbuf *p) } return ~(acc & 0xffff); } - diff --git a/wii/libogc/lwip/core/ipv4/icmp.c b/wii/libogc/lwip/core/ipv4/icmp.c index 02d467e43c..d47180fced 100644 --- a/wii/libogc/lwip/core/ipv4/icmp.c +++ b/wii/libogc/lwip/core/ipv4/icmp.c @@ -56,7 +56,6 @@ icmp_input(struct pbuf *p, struct netif *inp) ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); - iphdr = p->payload; hlen = IPH_HL(iphdr) * 4; if (pbuf_header(p, -((s16_t)hlen)) || (p->tot_len < sizeof(u16_t)*2)) { @@ -194,10 +193,3 @@ icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t) } #endif /* IP_FORWARD */ - - - - - - - diff --git a/wii/libogc/lwip/core/ipv4/ip.c b/wii/libogc/lwip/core/ipv4/ip.c index 0746c40094..8d8c214844 100644 --- a/wii/libogc/lwip/core/ipv4/ip.c +++ b/wii/libogc/lwip/core/ipv4/ip.c @@ -59,7 +59,6 @@ # include "lwip/dhcp.h" #endif /* LWIP_DHCP */ - /** * Initializes the IP layer. */ @@ -500,9 +499,3 @@ ip_debug_print(struct pbuf *p) LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); } #endif /* IP_DEBUG */ - - - - - - diff --git a/wii/libogc/lwip/core/ipv4/ip_frag.c b/wii/libogc/lwip/core/ipv4/ip_frag.c index f132789229..929fa20d20 100644 --- a/wii/libogc/lwip/core/ipv4/ip_frag.c +++ b/wii/libogc/lwip/core/ipv4/ip_frag.c @@ -46,7 +46,6 @@ #include "lwip/netif.h" #include "lwip/stats.h" - /* * Copy len bytes from offset in pbuf to buffer * diff --git a/wii/libogc/lwip/core/memp.c b/wii/libogc/lwip/core/memp.c index 44fc2531c9..24f11d36e8 100644 --- a/wii/libogc/lwip/core/memp.c +++ b/wii/libogc/lwip/core/memp.c @@ -49,8 +49,6 @@ struct memp { struct memp *next; }; - - static struct memp *memp_tab[MEMP_MAX]; static const u16_t memp_sizes[MEMP_MAX] = { @@ -115,7 +113,6 @@ static u8_t memp_memory[(MEMP_NUM_PBUF * MEM_ALIGN_SIZE(sizeof(struct sys_timeout) + sizeof(struct memp)))]; - #if !SYS_LIGHTWEIGHT_PROT static sys_sem mutex; #endif @@ -180,7 +177,6 @@ memp_init(void) LWP_SemInit(&mutex,1,1); #endif - } void * @@ -270,4 +266,3 @@ memp_free(memp_t type, void *mem) LWP_SemPost(mutex); #endif /* SYS_LIGHTWEIGHT_PROT */ } - diff --git a/wii/libogc/lwip/core/netif.c b/wii/libogc/lwip/core/netif.c index d36490e5c1..aaed06add6 100644 --- a/wii/libogc/lwip/core/netif.c +++ b/wii/libogc/lwip/core/netif.c @@ -285,4 +285,3 @@ netif_init(void) { netif_list = netif_default = NULL; } - diff --git a/wii/libogc/lwip/core/pbuf.c b/wii/libogc/lwip/core/pbuf.c index bca6792059..ee43ef82e7 100644 --- a/wii/libogc/lwip/core/pbuf.c +++ b/wii/libogc/lwip/core/pbuf.c @@ -178,7 +178,6 @@ pbuf_pool_alloc(void) return p; } - /** * Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type). * @@ -342,7 +341,6 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag) return p; } - #if PBUF_STATS #define DEC_PBUF_STATS do { --lwip_stats.pbuf.used; } while (0) #else /* PBUF_STATS */ diff --git a/wii/libogc/lwip/core/raw.c b/wii/libogc/lwip/core/raw.c index b378c94c4a..4d554a4903 100644 --- a/wii/libogc/lwip/core/raw.c +++ b/wii/libogc/lwip/core/raw.c @@ -157,7 +157,6 @@ raw_connect(struct raw_pcb *pcb, struct ip_addr *ipaddr) return ERR_OK; } - /** * Set the callback function for received packets that match the * raw PCB's protocol and binding. diff --git a/wii/libogc/lwip/core/stats.c b/wii/libogc/lwip/core/stats.c index 1413b6d82e..6a371b9342 100644 --- a/wii/libogc/lwip/core/stats.c +++ b/wii/libogc/lwip/core/stats.c @@ -39,7 +39,6 @@ #include "lwip/stats.h" #include "lwip/mem.h" - #if LWIP_STATS struct stats_ lwip_stats; @@ -112,4 +111,3 @@ stats_display(void) } #endif /* LWIP_STATS_DISPLAY */ #endif /* LWIP_STATS */ - diff --git a/wii/libogc/lwip/core/sys.c b/wii/libogc/lwip/core/sys.c index a7dbf34dab..e9af1ab751 100644 --- a/wii/libogc/lwip/core/sys.c +++ b/wii/libogc/lwip/core/sys.c @@ -43,8 +43,6 @@ struct sswt_cb sys_sem_t *psem; }; - - void sys_mbox_fetch(sys_mbox_t mbox, void **msg) { @@ -54,7 +52,6 @@ sys_mbox_fetch(sys_mbox_t mbox, void **msg) sys_timeout_handler h; void *arg; - again: timeouts = sys_arch_timeouts(); @@ -136,7 +133,6 @@ sys_sem_wait(sys_sem_t sem) h(arg); } - /* We try again to fetch a message from the mbox. */ goto again; } else { @@ -235,10 +231,6 @@ sys_untimeout(sys_timeout_handler h, void *arg) return; } - - - - static void sswt_handler(void *arg) { @@ -279,7 +271,6 @@ sys_sem_wait_timeout(sys_sem_t sem, u32_t timeout) } - void sys_msleep(u32_t ms) { @@ -290,5 +281,4 @@ sys_msleep(u32_t ms) sys_sem_free(delaysem); } - #endif /* NO_SYS */ diff --git a/wii/libogc/lwip/core/tcp.c b/wii/libogc/lwip/core/tcp.c index 69d10a88e1..a81850047a 100644 --- a/wii/libogc/lwip/core/tcp.c +++ b/wii/libogc/lwip/core/tcp.c @@ -189,7 +189,6 @@ tcp_abort(struct tcp_pcb *pcb) #endif /* LWIP_CALLBACK_API */ void *errf_arg; - /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ @@ -605,7 +604,6 @@ tcp_slowtmr(void) } } - /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; @@ -618,8 +616,6 @@ tcp_slowtmr(void) ++pcb_remove; } - - /* If the PCB should be removed, do it. */ if (pcb_remove) { tcp_pcb_purge(pcb); @@ -749,7 +745,6 @@ tcp_kill_prio(u8_t prio) u32_t inactivity; u8_t mprio; - mprio = TCP_PRIO_MAX; /* We kill the oldest active connection that has lower priority than @@ -772,7 +767,6 @@ tcp_kill_prio(u8_t prio) } } - static void tcp_kill_timewait(void) { @@ -794,8 +788,6 @@ tcp_kill_timewait(void) } } - - struct tcp_pcb * tcp_alloc(u8_t prio) { @@ -928,7 +920,6 @@ tcp_accept(struct tcp_pcb *pcb, } #endif /* LWIP_CALLBACK_API */ - /** * Used to specify the function that should be called periodically * from TCP. The interval is specified in terms of the TCP coarse @@ -1159,13 +1150,3 @@ tcp_pcbs_sane(void) } #endif /* TCP_DEBUG */ #endif /* LWIP_TCP */ - - - - - - - - - - diff --git a/wii/libogc/lwip/core/tcp_in.c b/wii/libogc/lwip/core/tcp_in.c index 9acf172707..bad1fac469 100644 --- a/wii/libogc/lwip/core/tcp_in.c +++ b/wii/libogc/lwip/core/tcp_in.c @@ -80,7 +80,6 @@ static void tcp_parseopt(struct tcp_pcb *pcb); static err_t tcp_listen_input(struct tcp_pcb_listen *pcb); static err_t tcp_timewait_input(struct tcp_pcb *pcb); - /* tcp_input: * * The initial input processing of TCP. It verifies the TCP header, demultiplexes @@ -163,7 +162,6 @@ tcp_input(struct pbuf *p, struct netif *inp) for an active connection. */ prev = NULL; - for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); @@ -241,7 +239,6 @@ tcp_input(struct pbuf *p, struct netif *inp) LWIP_DEBUGF(TCP_INPUT_DEBUG, ("-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n")); #endif /* TCP_INPUT_DEBUG */ - if (pcb != NULL) { /* The incoming segment belongs to a connection. */ #if TCP_INPUT_DEBUG @@ -305,7 +302,6 @@ tcp_input(struct pbuf *p, struct netif *inp) } } - /* We deallocate the incoming pbuf. If it was buffered by the application, the application should have called pbuf_ref() to increase the reference counter in the pbuf. If so, the buffer @@ -437,7 +433,6 @@ tcp_process(struct tcp_pcb *pcb) u8_t acceptable = 0; err_t err; - err = ERR_OK; /* Process incoming RST segments. */ @@ -631,7 +626,6 @@ tcp_receive(struct tcp_pcb *pcb) u32_t right_wnd_edge; u16_t new_tot_len; - if (flags & TCP_ACK) { right_wnd_edge = pcb->snd_wnd + pcb->snd_wl1; @@ -652,7 +646,6 @@ tcp_receive(struct tcp_pcb *pcb) #endif /* TCP_WND_DEBUG */ } - if (pcb->lastack == ackno) { pcb->acked = 0; @@ -1002,13 +995,11 @@ tcp_receive(struct tcp_pcb *pcb) recv_flags = TF_GOT_FIN; } - pcb->ooseq = cseg->next; tcp_seg_free(cseg); } #endif /* TCP_QUEUE_OOSEQ */ - /* Acknowledge the segment(s). */ tcp_ack(pcb); @@ -1195,5 +1186,3 @@ tcp_parseopt(struct tcp_pcb *pcb) } } #endif /* LWIP_TCP */ - - diff --git a/wii/libogc/lwip/core/tcp_out.c b/wii/libogc/lwip/core/tcp_out.c index 3437c008f9..e45af177f3 100644 --- a/wii/libogc/lwip/core/tcp_out.c +++ b/wii/libogc/lwip/core/tcp_out.c @@ -666,7 +666,6 @@ tcp_rexmit(struct tcp_pcb *pcb) } - void tcp_keepalive(struct tcp_pcb *pcb) { @@ -710,12 +709,3 @@ tcp_keepalive(struct tcp_pcb *pcb) } #endif /* LWIP_TCP */ - - - - - - - - - diff --git a/wii/libogc/lwip/core/udp.c b/wii/libogc/lwip/core/udp.c index 7fbc6ec454..8a6bd9dc37 100644 --- a/wii/libogc/lwip/core/udp.c +++ b/wii/libogc/lwip/core/udp.c @@ -35,7 +35,6 @@ * */ - /* udp.c * * The code for the User Datagram Protocol UDP. @@ -624,7 +623,6 @@ udp_new(void) { pcb->ttl = UDP_TTL; } - return pcb; } @@ -644,12 +642,3 @@ udp_debug_print(struct udp_hdr *udphdr) #endif /* UDP_DEBUG */ #endif /* LWIP_UDP */ - - - - - - - - - diff --git a/wii/libogc/lwip/netif/etharp.c b/wii/libogc/lwip/netif/etharp.c index 959f7ba6d0..0295cacf94 100644 --- a/wii/libogc/lwip/netif/etharp.c +++ b/wii/libogc/lwip/netif/etharp.c @@ -448,7 +448,6 @@ etharp_ip_input(struct netif *netif, struct pbuf *p) update_arp_entry(netif, &(hdr->ip.src), &(hdr->eth.src), 0); } - /** * Responds to ARP requests to us. Upon ARP replies to us, add entry to cache * send out queued IP packets. Updates cache with snooped address pairs. diff --git a/wii/libogc/lwip/netif/loopif.c b/wii/libogc/lwip/netif/loopif.c index c83e9f8ed3..ce0361c696 100644 --- a/wii/libogc/lwip/netif/loopif.c +++ b/wii/libogc/lwip/netif/loopif.c @@ -130,10 +130,3 @@ loopif_init(struct netif *netif) } #endif /* LWIP_HAVE_LOOPIF */ - - - - - - - diff --git a/wii/libogc/lwip/netif/skeleton/ethernetif.c b/wii/libogc/lwip/netif/skeleton/ethernetif.c index b02d595dac..5268d9e0a1 100644 --- a/wii/libogc/lwip/netif/skeleton/ethernetif.c +++ b/wii/libogc/lwip/netif/skeleton/ethernetif.c @@ -61,7 +61,6 @@ static void ethernetif_input(struct netif *netif); static err_t ethernetif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr); - static void low_level_init(struct netif *netif) { @@ -95,7 +94,6 @@ low_level_init(struct netif *netif) * */ - static err_t low_level_output(struct ethernetif *ethernetif, struct pbuf *p) { @@ -299,4 +297,3 @@ ethernetif_init(struct netif *netif) sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); } - diff --git a/wii/libogc/lwip/network.c b/wii/libogc/lwip/network.c index 0bf282ac0e..74be92da9e 100644 --- a/wii/libogc/lwip/network.c +++ b/wii/libogc/lwip/network.c @@ -559,7 +559,6 @@ static err_t netconn_write(struct netconn *conn,const void *dataptr,u32 size,u8 struct api_msg *msg; u16 len,snd_buf; - LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_write(%d)\n",conn->err)); if(conn==NULL) return ERR_VAL; @@ -1310,7 +1309,6 @@ static void* net_thread(void *arg) udp_init(); tcp_init(); - tb.tv_sec = ARP_TMR_INTERVAL/TB_MSPERSEC; tb.tv_nsec = 0; net_arp_ticks = __lwp_wd_calc_ticks(&tb); @@ -1481,7 +1479,6 @@ s32 if_configex(struct in_addr *local_ip,struct in_addr *netmask,struct in_addr mask.addr = 0; gw.addr = 0; - if(use_dhcp==FALSE) { if( !gateway || gateway->s_addr==0 || !local_ip || local_ip->s_addr==0 @@ -1575,7 +1572,6 @@ s32 if_config(char *local_ip, char *netmask, char *gateway,bool use_dhcp, int ma return ret; } - s32 net_init() { sys_sem sem; diff --git a/wii/libogc/wiiuse/classic.c b/wii/libogc/wiiuse/classic.c index 671522c21c..957c23bad9 100644 --- a/wii/libogc/wiiuse/classic.c +++ b/wii/libogc/wiiuse/classic.c @@ -133,7 +133,6 @@ int classic_ctrl_handshake(struct wiimote_t* wm, struct classic_ctrl_t* cc, ubyt return 1; } - /** * @brief The classic controller disconnected. * @@ -144,8 +143,6 @@ void classic_ctrl_disconnected(struct classic_ctrl_t* cc) memset(cc, 0, sizeof(struct classic_ctrl_t)); } - - /** * @brief Handle classic controller event. * @@ -200,7 +197,6 @@ void classic_ctrl_event(struct classic_ctrl_t* cc, ubyte* msg) { #endif } - /** * @brief Find what buttons are pressed. * diff --git a/wii/libogc/wiiuse/definitions.h b/wii/libogc/wiiuse/definitions.h index 04dc5be6d8..e34e8e7cbc 100644 --- a/wii/libogc/wiiuse/definitions.h +++ b/wii/libogc/wiiuse/definitions.h @@ -40,7 +40,6 @@ #define WII_DEBUG(fmt, ...) #endif - /* Convert between radians and degrees */ #define RAD_TO_DEGREE(r) ((r * 180.0f) / WIIMOTE_PI) #define DEGREE_TO_RAD(d) (d * (WIIMOTE_PI / 180.0f)) diff --git a/wii/libogc/wiiuse/dynamics.c b/wii/libogc/wiiuse/dynamics.c index 3ead4055c2..0a8b08dfa2 100644 --- a/wii/libogc/wiiuse/dynamics.c +++ b/wii/libogc/wiiuse/dynamics.c @@ -117,7 +117,6 @@ void calculate_orientation(struct accel_t* ac, struct vec3w_t* accel, struct ori } } - /** * @brief Calculate the gravity forces on each axis. * @@ -199,7 +198,6 @@ void calc_joystick_state(struct joystick_t* js, float x, float y) { js->mag = hypotf(rx, ry); } - void apply_smoothing(struct accel_t* ac, struct orient_t* orient, int type) { switch (type) { case SMOOTH_ROLL: diff --git a/wii/libogc/wiiuse/events.c b/wii/libogc/wiiuse/events.c index 6f7a547f52..1fd2276a45 100644 --- a/wii/libogc/wiiuse/events.c +++ b/wii/libogc/wiiuse/events.c @@ -26,7 +26,6 @@ #include "ir.h" #include "io.h" - static void event_data_read(struct wiimote_t *wm,ubyte *msg) { ubyte err; diff --git a/wii/libogc/wiiuse/io.h b/wii/libogc/wiiuse/io.h index c035eb4a57..8fc439a649 100644 --- a/wii/libogc/wiiuse/io.h +++ b/wii/libogc/wiiuse/io.h @@ -23,4 +23,3 @@ int wiiuse_io_write(struct wiimote_t* wm, ubyte* buf, int len); #endif #endif - diff --git a/wii/libogc/wiiuse/io_wii.c b/wii/libogc/wiiuse/io_wii.c index 34fafc108c..2c579a0aa9 100644 --- a/wii/libogc/wiiuse/io_wii.c +++ b/wii/libogc/wiiuse/io_wii.c @@ -155,7 +155,6 @@ void wiiuse_sensorbar_enable(int enable) __wiiuse_sensorbar_enable(enable); } - void wiiuse_init_cmd_queue(struct wiimote_t *wm) { u32 size; diff --git a/wii/libogc/wiiuse/ir.c b/wii/libogc/wiiuse/ir.c index 33171f48c8..8b532785e0 100644 --- a/wii/libogc/wiiuse/ir.c +++ b/wii/libogc/wiiuse/ir.c @@ -124,7 +124,6 @@ static int ir_correct_for_bounds(float* x, float* y, enum aspect_t aspect, int o return 0; } - /** * @brief Interpolate the point to the user defined virtual screen resolution. */ @@ -303,7 +302,6 @@ void wiiuse_set_aspect_ratio(struct wiimote_t* wm, enum aspect_t aspect) { wiiuse_set_ir_position(wm, wm->ir.pos); } - /** * @brief Set the IR sensitivity. * @@ -359,7 +357,6 @@ void wiiuse_set_ir_sensitivity(struct wiimote_t* wm, int level) { WIIUSE_DEBUG("Set IR sensitivity to level %i (unid %i)", level, wm->unid); } - /** * @brief Calculate the data from the IR spots. Basic IR mode. * @@ -834,4 +831,3 @@ float calc_yaw(struct ir_t* ir) { return RAD_TO_DEGREE( atanf(x) ); } - diff --git a/wii/libogc/wiiuse/license_libogc.txt b/wii/libogc/wiiuse/license_libogc.txt index a149fce1ce..e14fb4653f 100644 --- a/wii/libogc/wiiuse/license_libogc.txt +++ b/wii/libogc/wiiuse/license_libogc.txt @@ -638,4 +638,3 @@ based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. - diff --git a/wii/libogc/wiiuse/motion_plus.c b/wii/libogc/wiiuse/motion_plus.c index 77022314ac..7700b41da4 100644 --- a/wii/libogc/wiiuse/motion_plus.c +++ b/wii/libogc/wiiuse/motion_plus.c @@ -56,7 +56,6 @@ static void wiiuse_set_motion_plus_clear1(struct wiimote_t *wm,ubyte *data,uword wiiuse_write_data(wm,WM_EXP_MEM_ENABLE1,&val,1,wiiuse_set_motion_plus_clear2); } - void wiiuse_set_motion_plus(struct wiimote_t *wm, int status) { ubyte val; diff --git a/wii/libogc/wiiuse/nunchuk.c b/wii/libogc/wiiuse/nunchuk.c index 2f64fa42f7..148be50a03 100644 --- a/wii/libogc/wiiuse/nunchuk.c +++ b/wii/libogc/wiiuse/nunchuk.c @@ -154,4 +154,3 @@ void nunchuk_event(struct nunchuk_t* nc, ubyte* msg) { calculate_gforce(&nc->accel_calib, &nc->accel, &nc->gforce); #endif } - diff --git a/wii/libogc/wiiuse/speaker.c b/wii/libogc/wiiuse/speaker.c index 167252391d..1d30453ccb 100644 --- a/wii/libogc/wiiuse/speaker.c +++ b/wii/libogc/wiiuse/speaker.c @@ -93,7 +93,6 @@ void wiiuse_set_speaker(struct wiimote_t *wm,int status) } } - buf = 0x04; wiiuse_sendcmd(wm,WM_CMD_SPEAKER_MUTE,&buf,1,NULL); diff --git a/wii/libogc/wiiuse/wiiuse_internal.h b/wii/libogc/wiiuse/wiiuse_internal.h index cfe343e493..72f27dc786 100644 --- a/wii/libogc/wiiuse/wiiuse_internal.h +++ b/wii/libogc/wiiuse/wiiuse_internal.h @@ -160,7 +160,6 @@ #define WM_ASPECT_4_3_X 560 #define WM_ASPECT_4_3_Y 420 - /** * Expansion stuff */ diff --git a/wiiu/fs/sd_fat_devoptab.c b/wiiu/fs/sd_fat_devoptab.c index 9bc16f8e20..3d0c0587ff 100644 --- a/wiiu/fs/sd_fat_devoptab.c +++ b/wiiu/fs/sd_fat_devoptab.c @@ -203,7 +203,6 @@ static int sd_fat_open_r (struct _reent *r, void *fileStruct, const char *path, return -1; } - static int sd_fat_close_r (struct _reent *r, void* fd) { sd_fat_file_state_t *file = (sd_fat_file_state_t *)fd; @@ -383,7 +382,6 @@ static ssize_t sd_fat_read_r (struct _reent *r, void* fd, char *ptr, size_t len) return done; } - static int sd_fat_fstat_r (struct _reent *r, void* fd, struct stat *st) { sd_fat_file_state_t *file = (sd_fat_file_state_t *)fd; @@ -540,7 +538,6 @@ static int sd_fat_unlink_r (struct _reent *r, const char *name) return -1; } - int result = FSRemove(dev->pClient, dev->pCmd, real_path, -1); free(real_path); diff --git a/wiiu/gx2_shader_inl.h b/wiiu/gx2_shader_inl.h index d788777068..80f5889f4e 100644 --- a/wiiu/gx2_shader_inl.h +++ b/wiiu/gx2_shader_inl.h @@ -47,7 +47,6 @@ #define CF_ALLOC_EXPORT_WORD1_BUF(arraySize, writeMask, inst) \ to_LE(arraySize | (writeMask << 12) | (inst << 23) | (1 << 31)) - #define ALU_SRC_KCACHE0_BASE 0x80 #define ALU_SRC_KCACHE1_BASE 0xA0 #define CF_KCACHE_BANK_LOCK_1 0x1 @@ -69,7 +68,6 @@ #define KCACHE0(bank, mode) | to_QWORD(CF_ALU_WORD0(0, bank, 0, mode), 0) #define KCACHE1(bank, mode) | to_QWORD(CF_ALU_WORD0(0, 0, bank, 0), CF_ALU_WORD1(mode,0, 0, 0, 0, 0)) - #define DEACTIVATE 1 #define UPDATE_EXEC_MASK(mode) | to_QWORD(0, to_LE(mode << 2)) #define UPDATE_PRED | to_QWORD(0, to_LE(1ull << 3)) @@ -176,7 +174,6 @@ #define SCL_212 | to_QWORD(0, to_LE(ALU_SCL_212 << 18)) #define SCL_221 | to_QWORD(0, to_LE(ALU_SCL_221 << 18)) - #define FETCH_TYPE(x) x #define MINI(x) ((x) - 1) #define MEGA(x) (MINI(x) | 0x80000000) @@ -186,7 +183,6 @@ #define INSTANCE_DATA 1 #define NO_INDEX_OFFSET 2 - /* CF defines */ #define CF_COND_ACTIVE 0x0 #define CF_COND_FALSE 0x1 @@ -295,7 +291,6 @@ #define _R126 _R(0x7E) #define _R127 _R(0x7F) - /* texture */ #define _t(x) x #define _t0 _t(0x0) @@ -306,7 +301,6 @@ #define _b(x) x - #define CALL_FS to_QWORD(CF_DWORD0(0), CF_DWORD1(0,0,0,0,0,CF_INST_CALL_FS)) #define TEX(addr, cnt) to_QWORD(CF_DWORD0(addr), CF_DWORD1(0x0, 0x0, CF_COND_ACTIVE, (cnt - 1), 0x0, CF_INST_TEX)) @@ -458,7 +452,6 @@ TEX_WORD1(dstReg, 0x0, dstSelX, dstSelY, dstSelZ, dstSelW, 0x0, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED)), \ to_QWORD(TEX_WORD2(0x0, 0x0, 0x0, samplerID, _x, _y, _z, _x), 0x00000000) - #define VTX_FETCH(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW, srcReg, srcSelX, buffer_id, type, mega, offset) \ to_QWORD(VTX_WORD0(VTX_INST_FETCH, type, buffer_id, srcReg, srcSelX, mega), VTX_WORD1(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW)) , \ to_QWORD(VTX_WORD2(offset, (mega >> 31)), 0x00000000) diff --git a/wiiu/hbl.h b/wiiu/hbl.h index 939bbba9e3..bb35d8d8e6 100644 --- a/wiiu/hbl.h +++ b/wiiu/hbl.h @@ -13,7 +13,6 @@ extern "C" { #define ARGV_PTR (*(void* volatile *)(MEM_BASE + 0x1300 + 0x80)) - #define MAKE_MAGIC(c0, c1, c2, c3) (((c0) << 24) |((c1) << 16) |((c2) << 8) | c3) #define ARGV_MAGIC MAKE_MAGIC('_', 'a', 'r', 'g') diff --git a/wiiu/include/netdb.h b/wiiu/include/netdb.h index 3fb5898849..c6ee9e25a7 100644 --- a/wiiu/include/netdb.h +++ b/wiiu/include/netdb.h @@ -17,7 +17,6 @@ typedef uint32_t socklen_t; #define NI_MAXHOST 1025 #define NI_MAXSERV 32 - struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST, .. */ @@ -34,7 +33,6 @@ int getaddrinfo(const char *node, const char *service, struct addrinfo *hints, s void freeaddrinfo(struct addrinfo *__ai); int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags); - #ifdef __cplusplus } #endif diff --git a/wiiu/include/sys/socket.h b/wiiu/include/sys/socket.h index 322d6bb905..24eabff7f1 100644 --- a/wiiu/include/sys/socket.h +++ b/wiiu/include/sys/socket.h @@ -24,7 +24,6 @@ extern "C" { #define SO_NBIO 0x1014 #define SO_NONBLOCK 0x1016 - /* return codes */ #define SO_SUCCESS 0 #define SO_EWOULDBLOCK 6 diff --git a/wiiu/include/wiiu/ac.h b/wiiu/include/wiiu/ac.h index 962b3ad8f0..c58fab8470 100644 --- a/wiiu/include/wiiu/ac.h +++ b/wiiu/include/wiiu/ac.h @@ -6,7 +6,6 @@ * System Preferences. */ - typedef int ACResult; enum { AC_FAILED = -1, diff --git a/wiiu/include/wiiu/gx2.h b/wiiu/include/wiiu/gx2.h index 8157d6f0ab..fdf430be79 100644 --- a/wiiu/include/wiiu/gx2.h +++ b/wiiu/include/wiiu/gx2.h @@ -16,4 +16,3 @@ #include #include #include - diff --git a/wiiu/include/wiiu/gx2/common.h b/wiiu/include/wiiu/gx2/common.h index 74aae866f5..9d8cd21bba 100644 --- a/wiiu/include/wiiu/gx2/common.h +++ b/wiiu/include/wiiu/gx2/common.h @@ -13,4 +13,3 @@ #define GX2_TRUE TRUE #define GX2_FALSE FALSE - diff --git a/wiiu/include/wiiu/gx2/draw.h b/wiiu/include/wiiu/gx2/draw.h index 85f2ff4c59..7235e73044 100644 --- a/wiiu/include/wiiu/gx2/draw.h +++ b/wiiu/include/wiiu/gx2/draw.h @@ -2,7 +2,6 @@ #include #include "enum.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/wiiu/include/wiiu/gx2/sampler.h b/wiiu/include/wiiu/gx2/sampler.h index 8b7f23db13..622bd637b5 100644 --- a/wiiu/include/wiiu/gx2/sampler.h +++ b/wiiu/include/wiiu/gx2/sampler.h @@ -6,7 +6,6 @@ extern "C" { #endif - typedef struct GX2Sampler { uint32_t regs[3]; diff --git a/wiiu/include/wiiu/gx2/shaders.h b/wiiu/include/wiiu/gx2/shaders.h index ceb883e7af..d0e5ccee3b 100644 --- a/wiiu/include/wiiu/gx2/shaders.h +++ b/wiiu/include/wiiu/gx2/shaders.h @@ -94,7 +94,6 @@ typedef struct GX2VertexShader unsigned enable: 1; } vgt_primitiveid_en; - struct { unsigned : 18; diff --git a/wiiu/include/wiiu/gx2r/resource.h b/wiiu/include/wiiu/gx2r/resource.h index 89be225214..dd945372f6 100644 --- a/wiiu/include/wiiu/gx2r/resource.h +++ b/wiiu/include/wiiu/gx2r/resource.h @@ -36,7 +36,6 @@ typedef enum GX2R_RESOURCE_LOCKED = 1 << 30, } GX2RResourceFlags; - #ifdef __cplusplus } #endif diff --git a/wiiu/include/wiiu/kpad.h b/wiiu/include/wiiu/kpad.h index 27988fba26..799ad8b64f 100644 --- a/wiiu/include/wiiu/kpad.h +++ b/wiiu/include/wiiu/kpad.h @@ -63,7 +63,6 @@ typedef struct _KPADData u32 unused_7[16]; } KPADData; - void KPADInit (void); void KPADShutdown(void); s32 KPADRead(s32 chan, void * data, u32 size); @@ -93,7 +92,6 @@ enum { typedef void (*WPADConnectCallback) (WPADChannel channel, WPADError reason); - #ifdef __cplusplus } #endif diff --git a/wiiu/include/wiiu/mp/taskqueue.h b/wiiu/include/wiiu/mp/taskqueue.h index 700393d29f..c38bbed947 100644 --- a/wiiu/include/wiiu/mp/taskqueue.h +++ b/wiiu/include/wiiu/mp/taskqueue.h @@ -24,7 +24,6 @@ typedef enum MP_TASK_QUEUE_STATE_FINISHED = 1 << 4, } MPTaskQueueState; - typedef uint32_t (*MPTaskFunc)(uint32_t, uint32_t); #pragma pack(push, 1) diff --git a/wiiu/include/wiiu/os/thread.h b/wiiu/include/wiiu/os/thread.h index a21eef07aa..b962b1acc5 100644 --- a/wiiu/include/wiiu/os/thread.h +++ b/wiiu/include/wiiu/os/thread.h @@ -111,7 +111,6 @@ typedef struct OSFastMutexQueue OSFastMutex *tail; } OSFastMutexQueue; - typedef struct { OSThread *prev; diff --git a/wiiu/include/wiiu/os/time.h b/wiiu/include/wiiu/os/time.h index 79349b0d7b..e8ff34254a 100644 --- a/wiiu/include/wiiu/os/time.h +++ b/wiiu/include/wiiu/os/time.h @@ -37,7 +37,6 @@ typedef struct int32_t tm_year; }OSCalendarTime; - OSTime OSGetTime(); OSTime OSGetSystemTime(); OSTick OSGetTick(); diff --git a/wiiu/include/wiiu/syshid.h b/wiiu/include/wiiu/syshid.h index 664e52eef6..354df86f0e 100644 --- a/wiiu/include/wiiu/syshid.h +++ b/wiiu/include/wiiu/syshid.h @@ -35,7 +35,6 @@ typedef void (*HIDCallback)(uint32_t handle,int32_t error,uint8_t *p_buffer,uint extern "C" { #endif - int32_t HIDSetup(void); diff --git a/wiiu/include/wiiu/vpad.h b/wiiu/include/wiiu/vpad.h index 2c6765cbc3..60d27deaa1 100644 --- a/wiiu/include/wiiu/vpad.h +++ b/wiiu/include/wiiu/vpad.h @@ -96,7 +96,6 @@ typedef enum VPADTouchPadValidity VPAD_INVALID_Y = 0x2, } VPADTouchPadValidity; - typedef enum VPADReadError { VPAD_READ_SUCCESS = 0, diff --git a/wiiu/shader_utils.c b/wiiu/shader_utils.c index f4c7b98058..402a414e3b 100644 --- a/wiiu/shader_utils.c +++ b/wiiu/shader_utils.c @@ -98,7 +98,6 @@ void GX2SetShader(GX2Shader *shader) GX2SetGeometryShader(&shader->gs); } - void dump_vs_data(GX2VertexShader* vs) { @@ -233,7 +232,6 @@ void check_shader(const void *shader_, u32 shader_size, const void *org_, u32 or printf("\nsize mismatch : 0x%08X should be 0x%08X", shader_size, org_size); } - for (int i = 0; i < shader_size / 4; i++) { if (shader[i] != org[i]) diff --git a/wiiu/shader_utils.h b/wiiu/shader_utils.h index e03b3af704..847030c051 100644 --- a/wiiu/shader_utils.h +++ b/wiiu/shader_utils.h @@ -45,7 +45,6 @@ __attribute__((scalar_storage_order ("little-endian"))) }; }GX2_vec4; - typedef union { struct @@ -77,7 +76,6 @@ void GX2SetShader(GX2Shader* shader); void check_shader(const void* shader_, u32 shader_size, const void* org_, u32 org_size, const char* name); void check_shader_verbose(u32* shader, u32 shader_size, u32* org, u32 org_size, const char* name); - typedef struct { GX2VertexShader* vs; @@ -91,4 +89,3 @@ void gfd_free(GFDFile* gfd); #ifdef __cplusplus } #endif - diff --git a/wiiu/slang/Makefile b/wiiu/slang/Makefile index 64ad2fe4ff..2a0c6ba139 100644 --- a/wiiu/slang/Makefile +++ b/wiiu/slang/Makefile @@ -44,9 +44,6 @@ SLANG_SHADERS := $(call rwildcard,$(SLANG_DIR)/,*.slang) SLANG_SHADERS := $(filter-out $(BLACKLIST),$(SLANG_SHADERS)) SLANG_SHADERS := $(SLANG_SHADERS:.slang=.gsh) - - - all: $(SLANG_SHADERS) parser: $(SLANG_PARSER) diff --git a/wiiu/slang/grammar.txt b/wiiu/slang/grammar.txt index aab7c03a55..6352468df5 100644 --- a/wiiu/slang/grammar.txt +++ b/wiiu/slang/grammar.txt @@ -52,4 +52,3 @@ End <- EndOfLine / EndOfFile ~_ <- [ \t\r\n]* Indent <- [ \t] ~Space <- [ \t] - diff --git a/wiiu/slang/main.c b/wiiu/slang/main.c index 025495feaa..f8e6f9808e 100644 --- a/wiiu/slang/main.c +++ b/wiiu/slang/main.c @@ -29,7 +29,6 @@ int main(int argc, const char** argv) ps_out = argv[i + 1]; } - if(!slang || !vs_out || !ps_out || (!vs_asm && ps_asm) || (vs_asm && !ps_asm)) { printf("Usage :\n"); @@ -97,7 +96,6 @@ int main(int argc, const char** argv) continue; } - char* layout = strstr(line, "layout("); if(layout) { @@ -113,10 +111,6 @@ int main(int argc, const char** argv) line = layout; } - - - - if(vson) { fwrite(line, 1, strlen(line),vs_out_fp); @@ -138,5 +132,3 @@ int main(int argc, const char** argv) return 0; } - - diff --git a/wiiu/slang/slang-parse.cpp b/wiiu/slang/slang-parse.cpp index 582f0e8375..f5bdfef3c6 100644 --- a/wiiu/slang/slang-parse.cpp +++ b/wiiu/slang/slang-parse.cpp @@ -1,11 +1,9 @@ - #include #include #include #include - int main(int argc, const char** argv) { const char* slang_fn = NULL; @@ -31,7 +29,6 @@ int main(int argc, const char** argv) verbose = true; } - if(!slang_fn || !vs_out_fn || !ps_out_fn || (!vs_asm_fn && ps_asm_fn) || (vs_asm_fn && !ps_asm_fn)) { printf("Usage :\n"); @@ -265,7 +262,5 @@ int main(int argc, const char** argv) fs << ps.str(); } - - return 0; } diff --git a/wiiu/system/atomic.c b/wiiu/system/atomic.c index ec16f75876..9567b8f83f 100644 --- a/wiiu/system/atomic.c +++ b/wiiu/system/atomic.c @@ -33,4 +33,3 @@ uint32_t SwapAtomic32(uint32_t *ptr, uint32_t value) { return __sync_lock_test_and_set(ptr, value); } - diff --git a/wiiu/system/memory.c b/wiiu/system/memory.c index d0269411d1..aa19aeedb5 100644 --- a/wiiu/system/memory.c +++ b/wiiu/system/memory.c @@ -111,7 +111,6 @@ void * _valloc_r(struct _reent *r, size_t size) return _memalign_r(r, 64, size); } - /* some wrappers */ void * MEM2_alloc(unsigned int size, unsigned int align)