Merge branch '5_1-new' into win64

This commit is contained in:
Prcuvu
2019-10-06 00:55:50 +08:00
committed by GitHub
23 changed files with 1164 additions and 809 deletions
+1
View File
@@ -4,6 +4,7 @@ If you have any corrections to this list, let us know (via forums or IRC).
==StepMania Team==
Chris Danford, Glenn Maynard, Steve Checkoway, et al
( see credits_old_Stepmania_Team for full list )
* Keeping StepMania 5 alive with changes, and providing a nice codebase for
us to work with.
+112
View File
@@ -0,0 +1,112 @@
These were the Stepmania Team credits as of April 15, 2009, when they were
wiped with a todo message of "remake this list". That never happened and
anybody that was not in that initial list got lost in the shuffle over the
years.
git commit fb1165e6be1cd1e40193b7d6a100c2525a670e04 contains this list in
lua format.
=== GRAPHICS ===
Lucas “v1ral” Tang
SPiGuMuS
Visage
Ryan “Plaguefox” McKanna
Lamden “Cloud34” Travis
Michael “Redcrusher” Curry
Steve “healing_vision” Klise
Mauro Panichella
Popnko
Griever (Julian)
Miguel Moore
Dj “AeON ExOdus” Washington
Xelf
James “SPDS” Sanders
k0ldx
Daisuke Master
=== THEME ===
AJ Kelly
Dan “dieKatze88” Colardeau
Mike “mDaWg” Calfin
=== WEB ===
Brian “Bork” Bugh
=== SOUND ===
Kyle “KeeL” Ward
Jim “Izlude” Cabeen
Sanxion7
=== PROGRAMMING ===
Chris Danford
Frieza
Glenn Maynard
Bruno Figueiredo
Peter “Dro Kulix” May
Jared “nmspaz” Roberts
Brendan “binarys” Walker
Lance “Neovanglist” Gilbert
Michel Donais
Ben “Mantis” Nordstrom
Chris “Parasyte” Gomez
Michael “dirkthedaring” Patterson
Sauleil “angedelamort” Lamarre
Edwin Evans
Brian “Bork” Bugh
Joel “Elvis314” Maher
Garth “Kefabi” Smith
Pkillah
Robert Kemmetmueller
Ben “Shabach” Andersen
Will “SlinkyWizard” Valladao
TheChip
David “WarriorBob” H
Mike Waltson
Kevin “Miryokuteki” Slaughter
Tracy “Coderjo” Ward
Steve Checkoway
Sean Burke
XPort
Charles Lohr
Josh “Axlecrusher” Allen
Jason “Wolfman2000” Felds
Eric “Subwire” Gustafson
Mike “Archer” Hawkins
Colby “shakesoda“ Klein
=== THANKS ===
SimWolf
DJ DraftHorse
Dance With Intensity
BeMaNiRuler
DDRLlama
DDRManiaX
NMR
DJ Paranoia
DJ Yuz
Reo
Random Hajile
Chocobo Ghost
Tyma
Deluxe
Lagged
The Melting Pot
DDRJamz Global BBS
Eric “WaffleKing” Webster
Gotetsu
Mark “Foobly” Verrey
Mandarin Blue
Kenny “AngelTK” Lai
curewater
Bill “DMAshura” Shillito
Illusionz - Issaquah, WA
Quarters - Kirkland, WA
Pier Amusements - Bournemouth, UK
Westcliff Amusements - Bournemouth, UK
+1 -1
View File
@@ -6,7 +6,7 @@ StepMania is an advanced cross-platform rhythm game for home and arcade use.
Advanced cross-platform rhythm game for home and arcade use.
[![Build Status](https://travis-ci.org/stepmania/stepmania.svg?branch=master)](https://travis-ci.org/stepmania/stepmania)
[![Build status](https://ci.appveyor.com/api/projects/status/e932dk2o3anki27p?svg=true)](https://ci.appveyor.com/project/wolfman2000/stepmania-wm87c)
[![Build status](https://ci.appveyor.com/api/projects/status/uvoplsnyoats81r2?svg=true)](https://ci.appveyor.com/project/Nickito12/stepmania)
## Installation
### From Packages
+3 -2
View File
@@ -49,6 +49,9 @@ include("${SM_CMAKE_DIR}/DefineOptions.cmake")
include("${SM_CMAKE_DIR}/SMDefs.cmake")
# Put the predefined targets in separate groups.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Set up the linker flags for MSVC builds.
configure_msvc_runtime()
@@ -281,8 +284,6 @@ else()
endif()
if(WIN32)
find_package(DirectX REQUIRED)
if(MINGW AND WITH_FFMPEG AND NOT WITH_SYSTEM_FFMPEG)
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
set(HAS_FFMPEG TRUE)
+1 -1
View File
@@ -388,7 +388,7 @@ void BeginnerHelper::Update( float fDeltaTime )
}
/*
* (c) 2003 Kevin Slaughter, Thad Ward
* (c) 2003 Kevin Slaughter, Tracy Ward
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
+1 -1
View File
@@ -50,7 +50,7 @@ protected:
/**
* @file
* @author Kevin Slaughter, Thad Ward (c) 2003
* @author Kevin Slaughter, Tracy Ward (c) 2003
* @section LICENSE
* All rights reserved.
*
+1
View File
@@ -42,6 +42,7 @@ else()
"archutils/Win32/CrashHandlerNetworking.cpp"
"archutils/Win32/DebugInfoHunt.cpp"
"archutils/Win32/DialogUtil.cpp"
"archutils/Win32/DirectXGuids.cpp"
"archutils/Win32/DirectXHelpers.cpp"
"archutils/Win32/ErrorStrings.cpp"
"archutils/Win32/GetFileInformation.cpp"
+744 -746
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -736,11 +736,11 @@ static const Style g_Style_Pump_Couple =
{ TRACK_5, +PUMP_COL_SPACING*2.0f, nullptr },
},
{ // PLAYER_2
{ TRACK_1, -PUMP_COL_SPACING*2.0f, nullptr },
{ TRACK_2, -PUMP_COL_SPACING*1.0f, nullptr },
{ TRACK_3, +PUMP_COL_SPACING*0.0f, nullptr },
{ TRACK_4, +PUMP_COL_SPACING*1.0f, nullptr },
{ TRACK_5, +PUMP_COL_SPACING*2.0f, nullptr },
{ TRACK_6, -PUMP_COL_SPACING*2.0f, nullptr },
{ TRACK_7, -PUMP_COL_SPACING*1.0f, nullptr },
{ TRACK_8, +PUMP_COL_SPACING*0.0f, nullptr },
{ TRACK_9, +PUMP_COL_SPACING*1.0f, nullptr },
{ TRACK_10, +PUMP_COL_SPACING*2.0f, nullptr },
},
},
{ // m_iInputColumn[NUM_GameController][NUM_GameButton]
+7
View File
@@ -766,6 +766,13 @@ bool RageDisplay::SaveScreenshot( RString sPath, GraphicsFileFormat format )
RageTimer timer;
RageSurface *surface = this->CreateScreenshot();
// LOG->Trace( "CreateScreenshot took %f seconds", timer.GetDeltaTime() );
if (nullptr == surface)
{
LOG->Trace("CreateScreenshot failed to return a surface");
return false;
}
/* Unless we're in lossless, resize the image to 640x480. If we're saving lossy,
* there's no sense in saving 1280x960 screenshots, and we don't want to output
* screenshots in a strange (non-1) sample aspect ratio. */
+31 -24
View File
@@ -13,28 +13,20 @@
#include "DisplaySpec.h"
#include "LocalizedString.h"
#include <D3dx9tex.h>
#include <d3d9.h>
#include <dxerr.h>
#include "archutils/Win32/GraphicsWindow.h"
#include "archutils/Win32/DirectXHelpers.h"
// Static libraries
// load Windows D3D9 dynamically
#if defined(_MSC_VER)
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#pragma comment(lib, "DxErr.lib")
#endif
#include <math.h>
#include <list>
RString GetErrorString( HRESULT hr )
{
return DXGetErrorString(hr);
}
// Globals
HMODULE g_D3D9_Module = nullptr;
LPDIRECT3D9 g_pd3d = nullptr;
@@ -644,22 +636,23 @@ RageSurface* RageDisplay_D3D::CreateScreenshot()
{
RageSurface * result = nullptr;
// Get the back buffer.
// get the render target
IDirect3DSurface9* pSurface;
if( SUCCEEDED( g_pd3dDevice->GetBackBuffer( 0, 0, D3DBACKBUFFER_TYPE_MONO, &pSurface ) ) )
if (SUCCEEDED(g_pd3dDevice->GetRenderTarget(0, &pSurface)))
{
// Get the back buffer description.
// get the render target surface description
D3DSURFACE_DESC desc;
pSurface->GetDesc( &desc );
pSurface->GetDesc(&desc);
// Copy the back buffer into a surface of a type we support.
// create an offscreen plain surface of the same format in the SYSTEMMEM pool
IDirect3DSurface9* pCopy;
if( SUCCEEDED( g_pd3dDevice->CreateOffscreenPlainSurface( desc.Width, desc.Height, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &pCopy, nullptr ) ) )
if (SUCCEEDED(g_pd3dDevice->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &pCopy, nullptr)))
{
if( SUCCEEDED( D3DXLoadSurfaceFromSurface( pCopy, nullptr, nullptr, pSurface, nullptr, nullptr, D3DX_FILTER_NONE, 0) ) )
// copy the data from the render target into the offscreen plain surface
if (SUCCEEDED(g_pd3dDevice->GetRenderTargetData(pSurface, pCopy)))
{
// Update desc from the copy.
pCopy->GetDesc( &desc );
pCopy->GetDesc(&desc);
D3DLOCKED_RECT lr;
@@ -670,19 +663,33 @@ RageSurface* RageDisplay_D3D::CreateScreenshot()
rect.right = desc.Width;
rect.bottom = desc.Height;
pCopy->LockRect( &lr, &rect, D3DLOCK_READONLY );
pCopy->LockRect(&lr, &rect, D3DLOCK_READONLY);
}
RageSurface *surface = CreateSurfaceFromPixfmt( RagePixelFormat_RGBA8, lr.pBits, desc.Width, desc.Height, lr.Pitch);
ASSERT( surface != nullptr );
// since we no longer have an easy function to force a conversion to A8R8G8B8, we need to figure out our pixel format.
// (yes, we could create a couple of surfaces in the default pool, copy the bits into the one matching our source,
// then use IDirect3DDevice::StretchRect to convert it without stretching into our desired format. This would mean
// a copy to device memory and a copy back again, though.)
// possible formats are found in FindBackBufferType
RagePixelFormat pf;
switch (desc.Format)
{
default: pf = RagePixelFormat_Invalid; FAIL_M("Unknown pixel format"); break;
case D3DFMT_X8R8G8B8: pf = RagePixelFormat_RGBA8; break;
case D3DFMT_A8R8G8B8: pf = RagePixelFormat_RGBA8; break;
// 16-bit formats are not here. Does anybody actually use them?
}
RageSurface *surface = CreateSurfaceFromPixfmt(pf, lr.pBits, desc.Width, desc.Height, lr.Pitch);
ASSERT(nullptr != surface);
// We need to make a copy, since lr.pBits will go away when we call UnlockRect().
result =
CreateSurface( surface->w, surface->h,
result =
CreateSurface(surface->w, surface->h,
surface->format->BitsPerPixel,
surface->format->Rmask, surface->format->Gmask,
surface->format->Bmask, surface->format->Amask );
RageSurfaceUtils::CopySurface( surface, result );
surface->format->Bmask, surface->format->Amask);
RageSurfaceUtils::CopySurface(surface, result);
delete surface;
pCopy->UnlockRect();
+1 -1
View File
@@ -328,7 +328,7 @@ LUA_REGISTER_DERIVED_CLASS( ScreenHowToPlay, ScreenAttract )
// lua end
/*
* (c) 2001-2004 Chris Danford, Thad Ward
* (c) 2001-2004 Chris Danford, Tracy Ward
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
+1 -1
View File
@@ -37,7 +37,7 @@ protected:
#endif
/*
* (c) 2001-2004 Chris Danford, Thad Ward
* (c) 2001-2004 Chris Danford, Tracy Ward
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -20,6 +20,12 @@
#include <WbemIdl.h>
#include <OleAuto.h>
// this may not be defined if we are using an older Windows SDK. (for instance, toolsetversion v140_xp does not define it)
// the number was taken from the documentation
#ifndef XUSER_MAX_COUNT
#define XUSER_MAX_COUNT 4
#endif
REGISTER_INPUT_HANDLER_CLASS2( DirectInput, DInput );
static vector<DIDevice> Devices;
@@ -8,9 +8,6 @@
#if defined(_MSC_VER)
#pragma comment(lib, "dinput8.lib")
#if defined(_WINDOWS)
#pragma comment(lib, "dxguid.lib")
#endif
#endif
LPDIRECTINPUT8 g_dinput = nullptr;
@@ -23,8 +23,8 @@ extern "C" const char *Init( int *argc, char ***argv )
return "Couldn't initialize gtk (cannot open display)";
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_position( GTK_WINDOW(window), GTK_WIN_POS_CENTER );
gtk_widget_set_size_request(window,468,-1);
gtk_window_set_position( GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS );
gtk_widget_set_size_request(window,-1,-1);
gtk_window_set_deletable( GTK_WINDOW(window), FALSE );
gtk_window_set_resizable(GTK_WINDOW(window),FALSE);
gtk_window_set_role( GTK_WINDOW(window), "sm-startup" );
@@ -214,10 +214,11 @@ RString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNew
/* Set the pixel format. */
if( !SetPixelFormat(GraphicsWindow::GetHDC(), iPixelFormat, &pixfmt) )
{
DWORD err = GetLastError();
/* Destroy the window. */
DestroyGraphicsWindowAndOpenGLContext();
return werr_ssprintf( GetLastError(), "Pixel format failed" );
return werr_ssprintf( err, "Pixel format failed" );
}
DescribePixelFormat( GraphicsWindow::GetHDC(), iPixelFormat, sizeof(g_CurrentPixelFormat), &g_CurrentPixelFormat );
@@ -232,15 +233,17 @@ RString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNew
g_HGLRC = wglCreateContext( GraphicsWindow::GetHDC() );
if ( g_HGLRC == nullptr )
{
DWORD err = GetLastError();
DestroyGraphicsWindowAndOpenGLContext();
return hr_ssprintf( GetLastError(), "wglCreateContext" );
return hr_ssprintf( err, "wglCreateContext" );
}
g_HGLRC_Background = wglCreateContext( GraphicsWindow::GetHDC() );
if( g_HGLRC_Background == nullptr )
{
DWORD err = GetLastError();
DestroyGraphicsWindowAndOpenGLContext();
return hr_ssprintf( GetLastError(), "wglCreateContext" );
return hr_ssprintf( err, "wglCreateContext" );
}
if( !wglShareLists(g_HGLRC, g_HGLRC_Background) )
@@ -252,8 +255,9 @@ RString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNew
if( !wglMakeCurrent( GraphicsWindow::GetHDC(), g_HGLRC ) )
{
DWORD err = GetLastError();
DestroyGraphicsWindowAndOpenGLContext();
return hr_ssprintf( GetLastError(), "wglCreateContext" );
return hr_ssprintf( err, "wglCreateContext" );
}
}
return RString(); // we set the video mode successfully
@@ -268,8 +272,9 @@ void LowLevelWindow_Win32::BeginConcurrentRendering()
{
if( !wglMakeCurrent( GraphicsWindow::GetHDC(), g_HGLRC_Background ) )
{
LOG->Warn( hr_ssprintf(GetLastError(), "wglMakeCurrent") );
FAIL_M( hr_ssprintf(GetLastError(), "wglMakeCurrent") );
DWORD err = GetLastError();
LOG->Warn( hr_ssprintf(err, "wglMakeCurrent") );
FAIL_M( hr_ssprintf(err, "wglMakeCurrent") );
}
}
+199
View File
@@ -0,0 +1,199 @@
// This file is intended to be included in the middle of a function after
// defining the macro to do what you want.
// NOTE: once we stop targeting anything older than Windows 8, we can drop this file
// and just call FormatMessage.
#if defined(__DINPUT_INCLUDED__)
// -------------------------------------------------------------
// dinput.h error codes
// -------------------------------------------------------------
DXERRMSG(DI_OK, "DI_OK")
DXERRMSG(DI_NOTATTACHED, "DI_NOTATTACHED")
//DXERRMSG(DI_BUFFEROVERFLOW, "DI_BUFFEROVERFLOW")
//DXERRMSG(DI_PROPNOEFFECT, "DI_PROPNOEFFECT")
//DXERRMSG(DI_NOEFFECT, "DI_NOEFFECT")
DXERRMSG(DI_POLLEDDEVICE, "DI_POLLEDDEVICE")
DXERRMSG(DI_DOWNLOADSKIPPED, "DI_DOWNLOADSKIPPED")
DXERRMSG(DI_EFFECTRESTARTED, "DI_EFFECTRESTARTED")
//DXERRMSG(DI_SETTINGSNOTSAVED_ACCESSDENIED, "DI_SETTINGSNOTSAVED_ACCESSDENIED")
//DXERRMSG(DI_SETTINGSNOTSAVED_DISKFULL, "DI_SETTINGSNOTSAVED_DISKFULL")
DXERRMSG(DI_TRUNCATED, "DI_TRUNCATED")
DXERRMSG(DI_TRUNCATEDANDRESTARTED, "DI_TRUNCATEDANDRESTARTED")
DXERRMSG(DI_WRITEPROTECT, "DI_WRITEPROTECT")
DXERRMSG(DIERR_OLDDIRECTINPUTVERSION, "The application requires a newer version of DirectInput.")
DXERRMSG(DIERR_GENERIC, "DIERR_GENERIC")
//DXERRMSG(DIERR_OLDDIRECTINPUTVERSION, "DIERR_OLDDIRECTINPUTVERSION")
DXERRMSG(DIERR_BETADIRECTINPUTVERSION, "The application was written for an unsupported prerelease version of DirectInput.")
DXERRMSG(DIERR_BADDRIVERVER, "The object could not be created due to an incompatible driver version or mismatched or incomplete driver components.")
DXERRMSG(DIERR_DEVICENOTREG, "DIERR_DEVICENOTREG")
DXERRMSG(DIERR_NOTFOUND, "The requested object does not exist.")
//DXERRMSG(DIERR_OBJECTNOTFOUND, "DIERR_OBJECTNOTFOUND")
DXERRMSG(DIERR_INVALIDPARAM, "DIERR_INVALIDPARAM")
DXERRMSG(DIERR_NOINTERFACE, "DIERR_NOINTERFACE")
//DXERRMSG(DIERR_GENERIC, "DIERR_GENERIC")
DXERRMSG(DIERR_OUTOFMEMORY, "DIERR_OUTOFMEMORY")
DXERRMSG(DIERR_UNSUPPORTED, "DIERR_UNSUPPORTED")
DXERRMSG(DIERR_NOTINITIALIZED, "This object has not been initialized")
DXERRMSG(DIERR_ALREADYINITIALIZED, "This object is already initialized")
DXERRMSG(DIERR_NOAGGREGATION, "DIERR_NOAGGREGATION")
DXERRMSG(DIERR_OTHERAPPHASPRIO, "DIERR_OTHERAPPHASPRIO")
DXERRMSG(DIERR_INPUTLOST, "Access to the device has been lost. It must be re-acquired.")
DXERRMSG(DIERR_ACQUIRED, "The operation cannot be performed while the device is acquired.")
DXERRMSG(DIERR_NOTACQUIRED, "The operation cannot be performed unless the device is acquired.")
//DXERRMSG(DIERR_READONLY, "DIERR_READONLY")
//DXERRMSG(DIERR_HANDLEEXISTS, "DIERR_HANDLEEXISTS")
DXERRMSG(DIERR_INSUFFICIENTPRIVS, "Unable to IDirectInputJoyConfig_Acquire because the user does not have sufficient privileges to change the joystick configuration. & An invalid media type was specified")
DXERRMSG(DIERR_DEVICEFULL, "The device is full. & An invalid media subtype was specified.")
DXERRMSG(DIERR_MOREDATA, "Not all the requested information fit into the buffer. & This object can only be created as an aggregated object.")
DXERRMSG(DIERR_NOTDOWNLOADED, "The effect is not downloaded. & The enumerator has become invalid.")
DXERRMSG(DIERR_HASEFFECTS, "The device cannot be reinitialized because there are still effects attached to it. & At least one of the pins involved in the operation is already connected.")
DXERRMSG(DIERR_NOTEXCLUSIVEACQUIRED, "The operation cannot be performed unless the device is acquired in DISCL_EXCLUSIVE mode. & This operation cannot be performed because the filter is active.")
DXERRMSG(DIERR_INCOMPLETEEFFECT, "The effect could not be downloaded because essential information is missing. For example, no axes have been associated with the effect, or no type-specific information has been created. & One of the specified pins supports no media types.")
DXERRMSG(DIERR_NOTBUFFERED, "Attempted to read buffered device data from a device that is not buffered. & There is no common media type between these pins.")
DXERRMSG(DIERR_EFFECTPLAYING, "An attempt was made to modify parameters of an effect while it is playing. Not all hardware devices support altering the parameters of an effect while it is playing. & Two pins of the same direction cannot be connected together.")
DXERRMSG(DIERR_UNPLUGGED, "The operation could not be completed because the device is not plugged in. & The operation cannot be performed because the pins are not connected.")
DXERRMSG(DIERR_REPORTFULL, "SendDeviceData failed because more information was requested to be sent than can be sent to the device. Some devices have restrictions on how much data can be sent to them. (For example, there might be a limit on the number of buttons that can be pressed at once.) & No sample buffer allocator is available.")
DXERRMSG(DIERR_MAPFILEFAIL, "A mapper file function failed because reading or writing the user or IHV settings file failed. & A run-time error occurred.")
#endif
#if defined(__DINPUTD_INCLUDED__)
// -------------------------------------------------------------
// dinputd.h error codes
// -------------------------------------------------------------
DXERRMSG(DIERR_NOMOREITEMS, "No more items.")
DXERRMSG(DIERR_DRIVERFIRST, "Device driver-specific codes. Unless the specific driver has been precisely identified, no meaning should be attributed to these values other than that the driver originated the error.")
DXERRMSG(DIERR_DRIVERFIRST + 1, "DIERR_DRIVERFIRST+1")
DXERRMSG(DIERR_DRIVERFIRST + 2, "DIERR_DRIVERFIRST+2")
DXERRMSG(DIERR_DRIVERFIRST + 3, "DIERR_DRIVERFIRST+3")
DXERRMSG(DIERR_DRIVERFIRST + 4, "DIERR_DRIVERFIRST+4")
DXERRMSG(DIERR_DRIVERFIRST + 5, "DIERR_DRIVERFIRST+5")
DXERRMSG(DIERR_DRIVERLAST, "Device installer errors.")
DXERRMSG(DIERR_INVALIDCLASSINSTALLER, "Registry entry or DLL for class installer invalid or class installer not found.")
DXERRMSG(DIERR_CANCELLED, "The user cancelled the install operation. & The stream already has allocated samples and the surface doesn't match the sample format.")
DXERRMSG(DIERR_BADINF, "The INF file for the selected device could not be found or is invalid or is damaged. & The specified purpose ID can't be used for the call.")
#endif
#if defined(_D3D9_H_)
// -------------------------------------------------------------
// d3d9.h error codes
// -------------------------------------------------------------
//DXERRMSG(D3D_OK, "Ok")
DXERRMSG(D3DERR_WRONGTEXTUREFORMAT, "Wrong texture format")
DXERRMSG(D3DERR_UNSUPPORTEDCOLOROPERATION, "Unsupported color operation")
DXERRMSG(D3DERR_UNSUPPORTEDCOLORARG, "Unsupported color arg")
DXERRMSG(D3DERR_UNSUPPORTEDALPHAOPERATION, "Unsupported alpha operation")
DXERRMSG(D3DERR_UNSUPPORTEDALPHAARG, "Unsupported alpha arg")
DXERRMSG(D3DERR_TOOMANYOPERATIONS, "Too many operations")
DXERRMSG(D3DERR_CONFLICTINGTEXTUREFILTER, "Conflicting texture filter")
DXERRMSG(D3DERR_UNSUPPORTEDFACTORVALUE, "Unsupported factor value")
DXERRMSG(D3DERR_CONFLICTINGRENDERSTATE, "Conflicting render state")
DXERRMSG(D3DERR_UNSUPPORTEDTEXTUREFILTER, "Unsupported texture filter")
DXERRMSG(D3DERR_CONFLICTINGTEXTUREPALETTE, "Conflicting texture palette")
DXERRMSG(D3DERR_DRIVERINTERNALERROR, "Driver internal error")
DXERRMSG(D3DERR_NOTFOUND, "Not found")
DXERRMSG(D3DERR_MOREDATA, "More data")
DXERRMSG(D3DERR_DEVICELOST, "Device lost")
DXERRMSG(D3DERR_DEVICENOTRESET, "Device not reset")
DXERRMSG(D3DERR_NOTAVAILABLE, "Not available")
DXERRMSG(D3DERR_OUTOFVIDEOMEMORY, "Out of video memory")
DXERRMSG(D3DERR_INVALIDDEVICE, "Invalid device")
DXERRMSG(D3DERR_INVALIDCALL, "Invalid call")
DXERRMSG(D3DERR_DRIVERINVALIDCALL, "Driver invalid call")
DXERRMSG(D3DERR_WASSTILLDRAWING, "Was Still Drawing")
DXERRMSG(D3DOK_NOAUTOGEN, "The call succeeded but there won't be any mipmaps generated")
// Extended for Windows Vista
DXERRMSG(D3DERR_DEVICEREMOVED, "Hardware device was removed")
DXERRMSG(S_NOT_RESIDENT, "Resource not resident in memory")
DXERRMSG(S_RESIDENT_IN_SHARED_MEMORY, "Resource resident in shared memory")
DXERRMSG(S_PRESENT_MODE_CHANGED, "Desktop display mode has changed")
DXERRMSG(S_PRESENT_OCCLUDED, "Client window is occluded (minimized or other fullscreen)")
DXERRMSG(D3DERR_DEVICEHUNG, "Hardware adapter reset by OS")
// Extended for Windows 7
DXERRMSG(D3DERR_UNSUPPORTEDOVERLAY, "Overlay is not supported")
DXERRMSG(D3DERR_UNSUPPORTEDOVERLAYFORMAT, "Overlay format is not supported")
DXERRMSG(D3DERR_CANNOTPROTECTCONTENT, "Contect protection not available")
DXERRMSG(D3DERR_UNSUPPORTEDCRYPTO, "Unsupported cryptographic system")
DXERRMSG(D3DERR_PRESENT_STATISTICS_DISJOINT, "Presentation statistics are disjoint")
#endif
#if defined(__DSOUND_INCLUDED__)
// -------------------------------------------------------------
// dsound.h error codes
// -------------------------------------------------------------
//DXERRMSG(DS_OK, "")
DXERRMSG(DS_NO_VIRTUALIZATION, "The call succeeded, but we had to substitute the 3D algorithm")
DXERRMSG(DSERR_ALLOCATED, "The call failed because resources (such as a priority level) were already being used by another caller")
DXERRMSG(DSERR_CONTROLUNAVAIL, "The control (vol, pan, etc.) requested by the caller is not available")
//DXERRMSG(DSERR_INVALIDPARAM, "DSERR_INVALIDPARAM")
DXERRMSG(DSERR_INVALIDCALL, "This call is not valid for the current state of this object")
//DXERRMSG(DSERR_GENERIC, "DSERR_GENERIC")
DXERRMSG(DSERR_PRIOLEVELNEEDED, "The caller does not have the priority level required for the function to succeed")
//DXERRMSG(DSERR_OUTOFMEMORY, "Not enough free memory is available to complete the operation")
DXERRMSG(DSERR_BADFORMAT, "The specified WAVE format is not supported")
//DXERRMSG(DSERR_UNSUPPORTED, "DSERR_UNSUPPORTED")
DXERRMSG(DSERR_NODRIVER, "No sound driver is available for use")
DXERRMSG(DSERR_ALREADYINITIALIZED, "This object is already initialized")
//DXERRMSG(DSERR_NOAGGREGATION, "DSERR_NOAGGREGATION")
DXERRMSG(DSERR_BUFFERLOST, "The buffer memory has been lost, and must be restored")
DXERRMSG(DSERR_OTHERAPPHASPRIO, "Another app has a higher priority level, preventing this call from succeeding")
DXERRMSG(DSERR_UNINITIALIZED, "This object has not been initialized")
//DXERRMSG(DSERR_NOINTERFACE, "DSERR_NOINTERFACE")
//DXERRMSG(DSERR_ACCESSDENIED, "DSERR_ACCESSDENIED")
DXERRMSG(DSERR_BUFFERTOOSMALL, "Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds")
DXERRMSG(DSERR_DS8_REQUIRED, "Attempt to use DirectSound 8 functionality on an older DirectSound object")
DXERRMSG(DSERR_SENDLOOP, "A circular loop of send effects was detected")
DXERRMSG(DSERR_BADSENDBUFFERGUID, "The GUID specified in an audiopath file does not match a valid MIXIN buffer")
DXERRMSG(DSERR_OBJECTNOTFOUND, "The object requested was not found (numerically equal to DMUS_E_NOT_FOUND)")
DXERRMSG(DSERR_FXUNAVAILABLE, "Requested effects are not available")
#endif
#if defined(__d3d10_h__)
// -------------------------------------------------------------
// d3d10.h error codes
// -------------------------------------------------------------
DXERRMSG(D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS, "There are too many unique state objects.")
DXERRMSG(D3D10_ERROR_FILE_NOT_FOUND, "File not found")
#endif
#if defined(__dxgitype_h__)
// -------------------------------------------------------------
// dxgi.h error codes
// -------------------------------------------------------------
DXERRMSG(DXGI_STATUS_OCCLUDED, "The target window or output has been occluded. The application should suspend rendering operations if possible.")
DXERRMSG(DXGI_STATUS_CLIPPED, "Target window is clipped.")
DXERRMSG(DXGI_STATUS_NO_REDIRECTION, "")
DXERRMSG(DXGI_STATUS_NO_DESKTOP_ACCESS, "No access to desktop.")
DXERRMSG(DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE, "")
DXERRMSG(DXGI_STATUS_MODE_CHANGED, "Display mode has changed")
DXERRMSG(DXGI_STATUS_MODE_CHANGE_IN_PROGRESS, "Display mode is changing")
DXERRMSG(DXGI_ERROR_INVALID_CALL, "The application has made an erroneous API call that it had enough information to avoid. This error is intended to denote that the application should be altered to avoid the error. Use of the debug version of the DXGI.DLL will provide run-time debug output with further information.")
DXERRMSG(DXGI_ERROR_NOT_FOUND, "The item requested was not found. For GetPrivateData calls, this means that the specified GUID had not been previously associated with the object.")
DXERRMSG(DXGI_ERROR_MORE_DATA, "The specified size of the destination buffer is too small to hold the requested data.")
DXERRMSG(DXGI_ERROR_UNSUPPORTED, "Unsupported.")
DXERRMSG(DXGI_ERROR_DEVICE_REMOVED, "Hardware device removed.")
DXERRMSG(DXGI_ERROR_DEVICE_HUNG, "Device hung due to badly formed commands.")
DXERRMSG(DXGI_ERROR_DEVICE_RESET, "Device reset due to a badly formed commant.")
DXERRMSG(DXGI_ERROR_WAS_STILL_DRAWING, "Was still drawing.")
DXERRMSG(DXGI_ERROR_FRAME_STATISTICS_DISJOINT, "The requested functionality is not supported by the device or the driver.")
DXERRMSG(DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE, "The requested functionality is not supported by the device or the driver.")
DXERRMSG(DXGI_ERROR_DRIVER_INTERNAL_ERROR, "An internal driver error occurred.")
DXERRMSG(DXGI_ERROR_NONEXCLUSIVE, "The application attempted to perform an operation on an DXGI output that is only legal after the output has been claimed for exclusive owenership.")
DXERRMSG(DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "The requested functionality is not supported by the device or the driver.")
DXERRMSG(DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED, "Remote desktop client disconnected.")
DXERRMSG(DXGI_ERROR_REMOTE_OUTOFMEMORY, "Remote desktop client is out of memory.")
#endif
#if defined(__d3d11_h__)
// -------------------------------------------------------------
// d3d11.h error codes
// -------------------------------------------------------------
DXERRMSG(D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS, "There are too many unique state objects.")
DXERRMSG(D3D11_ERROR_FILE_NOT_FOUND, "File not found")
DXERRMSG(D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS, "Therea are too many unique view objects.")
DXERRMSG(D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD, "Deferred context requires Map-Discard usage pattern")
#endif
+13
View File
@@ -0,0 +1,13 @@
#include "global.h"
// The purpose of this file is to define the various GUIDs we need, which
// we used to get via dxguid.lib in the DirectX SDK. The DirectX SDK has
// been discontinued and (mostly) rolled into the Windows SDK, but it is
// missing a few features. One of which is dxguid.lib.
// if you wind up running into other GUIDs you need, add them here
#define INITGUID
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
+20 -15
View File
@@ -2,16 +2,6 @@
#include "DirectXHelpers.h"
#include "RageUtil.h"
#include <windows.h>
#if defined(USE_DXERR9)
#include <dxerr9.h>
#else
#include <dxerr.h>
#endif
#if defined(_MSC_VER)
# pragma comment(lib, "dxerr.lib")
#endif
RString hr_ssprintf( int hr, const char *fmt, ... )
{
va_list va;
@@ -19,14 +9,29 @@ RString hr_ssprintf( int hr, const char *fmt, ... )
RString s = vssprintf( fmt, va );
va_end(va);
#if defined(USE_DXERR9)
const char *szError = DXGetErrorString9( hr );
#else
const char *szError = DXGetErrorString( hr );
#endif
const char *szError = GetErrorString( hr );
return s + ssprintf( " (%s)", szError );
}
// needed for defines
#define DIRECTINPUT_VERSION 0x0800
#define DIRECTSOUND_VERSION 0x0700
#include <dinput.h>
#include <d3d9.h>
#include <mmsystem.h> // dsound.h needs this
#include <dsound.h>
#define DXERRMSG(hrcode, dummy) case hrcode: return #hrcode;
RString GetErrorString(HRESULT hr)
{
switch (hr)
{
#include "DirectXErrorList.h"
default: return ssprintf("unknown HRESULT 0x%8.8X", hr);
}
}
/*
* Copyright (c) 2001-2005 Chris Danford, Glenn Maynard
* All rights reserved.
+2
View File
@@ -22,6 +22,8 @@ osvi.wServicePackMajor = 0;
return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != false;
}
RString GetErrorString(HRESULT hr);
#endif
/*
+1 -1
View File
@@ -7,7 +7,7 @@
RString werr_ssprintf( int err, const char *fmt, ... )
{
char buf[1024] = "";
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
0, err, 0, buf, sizeof(buf), nullptr);
// Why is FormatMessage returning text ending with \r\n? (who? -aj)
+1
View File
@@ -469,6 +469,7 @@ Section "Main Section" SecMain
SetOutPath "$INSTDIR\Docs"
File "Docs\Licenses.txt"
File "Docs\credits.txt"
File "Docs\credits_old_Stepmania_Team.txt"
File "Docs\Changelog_sm-ssc.txt"
File "Docs\Changelog_sm5.txt"
File "Docs\Changelog_SSCformat.txt"