From 0a9718374bd983f968140b0017c3d94ade1c8aa7 Mon Sep 17 00:00:00 2001 From: RhythmLunatic Date: Tue, 13 Aug 2019 23:43:35 -0500 Subject: [PATCH 01/17] support any size splash on linux --- .../LoadingWindow/LoadingWindow_GtkModule.cpp | 302 +++++++++--------- 1 file changed, 151 insertions(+), 151 deletions(-) diff --git a/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp b/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp index a46091ce8c..688d8222f2 100644 --- a/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp +++ b/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp @@ -1,151 +1,151 @@ -#include "global.h" -#include "LoadingWindow_GtkModule.h" -#include "RageUtil.h" -#include "RageSurface.h" -#include "RageSurfaceUtils.h" -#include "RageSurface_Load.h" - -#include - -static GtkWidget *label; -static GtkWidget *window; -static GtkWidget *splash; -static GtkWidget *progressBar; - -extern "C" const char *Init( int *argc, char ***argv ) -{ - // Need to use external library to load this image. Native loader seems broken :/ - const gchar *splash_image_path = "Data/splash.png"; - GtkWidget *vbox; - - gtk_disable_setlocale(); - if( !gtk_init_check(argc,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_deletable( GTK_WINDOW(window), FALSE ); - gtk_window_set_resizable(GTK_WINDOW(window),FALSE); - gtk_window_set_role( GTK_WINDOW(window), "sm-startup" ); - //gtk_window_set_icon( GTK_WINDOW(window), ); - gtk_widget_realize(window); - - splash = gtk_image_new_from_file(splash_image_path); - - label = gtk_label_new(nullptr); - gtk_label_set_justify(GTK_LABEL(label),GTK_JUSTIFY_CENTER); - gtk_label_set_ellipsize(GTK_LABEL(label),PANGO_ELLIPSIZE_END); - gtk_label_set_line_wrap(GTK_LABEL(label),FALSE); - - progressBar = gtk_progress_bar_new(); - gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), 0.0 ); - - vbox = gtk_vbox_new(FALSE,0); - gtk_container_add(GTK_CONTAINER(window),vbox); - gtk_box_pack_start(GTK_BOX(vbox),splash,FALSE,FALSE,0); - gtk_box_pack_end(GTK_BOX(vbox),progressBar,FALSE,FALSE,0); - gtk_box_pack_end(GTK_BOX(vbox),label,TRUE,TRUE,0); - - gtk_widget_show_all(window); - gtk_main_iteration_do(FALSE); - return nullptr; -} - -extern "C" void Shutdown() -{ - gtk_widget_hide(window); - g_signal_emit_by_name (G_OBJECT (window), "destroy"); - while( gtk_events_pending() ) - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetText( const char *s ) -{ - gtk_label_set_text(GTK_LABEL(label), s); - gtk_widget_show(label); - gtk_main_iteration_do(FALSE); -} - -void DeletePixels( guchar *pixels, gpointer data ) -{ - delete[] (uint8_t *)pixels; -} - -GdkPixbuf *MakePixbuf( const RageSurface *pSrc ) -{ - RageSurface *pSurface = CreateSurface( pSrc->w, pSrc->h, 32, - 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 ); - RageSurfaceUtils::Blit( pSrc, pSurface , -1, -1 ); - - GdkPixbuf *pBuf = gdk_pixbuf_new_from_data( pSurface->pixels, GDK_COLORSPACE_RGB, - true, 8, pSurface->w, pSurface->h , pSurface->pitch, DeletePixels, nullptr); - - if( pBuf != nullptr ) - pSurface->pixels_owned = false; - - delete pSurface; - return pBuf; -} - -extern "C" void SetIcon( const RageSurface *pSrcImg ) -{ - GdkPixbuf *pBuf = MakePixbuf( pSrcImg ); - if( pBuf != nullptr ) - { - gtk_window_set_icon( GTK_WINDOW(window), pBuf ); - g_object_unref(pBuf); - } - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetSplash( const RageSurface *pSplash ) -{ - GdkPixbuf *pBuf = MakePixbuf( pSplash ); - if( pBuf != nullptr ) - { - gtk_image_set_from_pixbuf(GTK_IMAGE(splash), pBuf); - g_object_unref(pBuf); - } - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetProgress( int progress, int totalWork ) -{ - gdouble fraction = ( totalWork > 0 ? progress / (gdouble)totalWork : 0 ); - if( fraction > 1.0 ) fraction = 1.0; - if( fraction < 0.0 ) fraction = 0.0; - gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), fraction ); - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetIndeterminate( bool indeterminate ) -{ - gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressBar)); - gtk_main_iteration_do(FALSE); -} - -/* - * (c) 2003-2004 Glenn Maynard, Sean Burke - * All rights reserved. - * - * 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, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * 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 OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ +#include "global.h" +#include "LoadingWindow_GtkModule.h" +#include "RageUtil.h" +#include "RageSurface.h" +#include "RageSurfaceUtils.h" +#include "RageSurface_Load.h" + +#include + +static GtkWidget *label; +static GtkWidget *window; +static GtkWidget *splash; +static GtkWidget *progressBar; + +extern "C" const char *Init( int *argc, char ***argv ) +{ + // Need to use external library to load this image. Native loader seems broken :/ + const gchar *splash_image_path = "Data/splash.png"; + GtkWidget *vbox; + + gtk_disable_setlocale(); + if( !gtk_init_check(argc,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_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" ); + //gtk_window_set_icon( GTK_WINDOW(window), ); + gtk_widget_realize(window); + + splash = gtk_image_new_from_file(splash_image_path); + + label = gtk_label_new(NULL); + gtk_label_set_justify(GTK_LABEL(label),GTK_JUSTIFY_CENTER); + gtk_label_set_ellipsize(GTK_LABEL(label),PANGO_ELLIPSIZE_END); + gtk_label_set_line_wrap(GTK_LABEL(label),FALSE); + + progressBar = gtk_progress_bar_new(); + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), 0.0 ); + + vbox = gtk_vbox_new(FALSE,0); + gtk_container_add(GTK_CONTAINER(window),vbox); + gtk_box_pack_start(GTK_BOX(vbox),splash,FALSE,FALSE,0); + gtk_box_pack_end(GTK_BOX(vbox),progressBar,FALSE,FALSE,0); + gtk_box_pack_end(GTK_BOX(vbox),label,TRUE,TRUE,0); + + gtk_widget_show_all(window); + gtk_main_iteration_do(FALSE); + return NULL; +} + +extern "C" void Shutdown() +{ + gtk_widget_hide(window); + g_signal_emit_by_name (G_OBJECT (window), "destroy"); + while( gtk_events_pending() ) + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetText( const char *s ) +{ + gtk_label_set_text(GTK_LABEL(label), s); + gtk_widget_show(label); + gtk_main_iteration_do(FALSE); +} + +void DeletePixels( guchar *pixels, gpointer data ) +{ + delete[] (uint8_t *)pixels; +} + +GdkPixbuf *MakePixbuf( const RageSurface *pSrc ) +{ + RageSurface *pSurface = CreateSurface( pSrc->w, pSrc->h, 32, + 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 ); + RageSurfaceUtils::Blit( pSrc, pSurface , -1, -1 ); + + GdkPixbuf *pBuf = gdk_pixbuf_new_from_data( pSurface->pixels, GDK_COLORSPACE_RGB, + true, 8, pSurface->w, pSurface->h , pSurface->pitch, DeletePixels, NULL); + + if( pBuf != NULL ) + pSurface->pixels_owned = false; + + delete pSurface; + return pBuf; +} + +extern "C" void SetIcon( const RageSurface *pSrcImg ) +{ + GdkPixbuf *pBuf = MakePixbuf( pSrcImg ); + if( pBuf != NULL ) + { + gtk_window_set_icon( GTK_WINDOW(window), pBuf ); + g_object_unref(pBuf); + } + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetSplash( const RageSurface *pSplash ) +{ + GdkPixbuf *pBuf = MakePixbuf( pSplash ); + if( pBuf != NULL ) + { + gtk_image_set_from_pixbuf(GTK_IMAGE(splash), pBuf); + g_object_unref(pBuf); + } + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetProgress( int progress, int totalWork ) +{ + gdouble fraction = ( totalWork > 0 ? progress / (gdouble)totalWork : 0 ); + if( fraction > 1.0 ) fraction = 1.0; + if( fraction < 0.0 ) fraction = 0.0; + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), fraction ); + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetIndeterminate( bool indeterminate ) +{ + gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressBar)); + gtk_main_iteration_do(FALSE); +} + +/* + * (c) 2003-2004 Glenn Maynard, Sean Burke + * All rights reserved. + * + * 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, and/or sell copies of the Software, and to permit persons to + * whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT + * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ From deab68b012ccd7288aebdf143d016ab47d4acee9 Mon Sep 17 00:00:00 2001 From: RhythmLunatic Date: Tue, 13 Aug 2019 23:47:59 -0500 Subject: [PATCH 02/17] Back to C++ 11 --- src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp b/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp index 688d8222f2..5d03191e1f 100644 --- a/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp +++ b/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp @@ -33,7 +33,7 @@ extern "C" const char *Init( int *argc, char ***argv ) splash = gtk_image_new_from_file(splash_image_path); - label = gtk_label_new(NULL); + label = gtk_label_new(nullptr); gtk_label_set_justify(GTK_LABEL(label),GTK_JUSTIFY_CENTER); gtk_label_set_ellipsize(GTK_LABEL(label),PANGO_ELLIPSIZE_END); gtk_label_set_line_wrap(GTK_LABEL(label),FALSE); @@ -49,7 +49,7 @@ extern "C" const char *Init( int *argc, char ***argv ) gtk_widget_show_all(window); gtk_main_iteration_do(FALSE); - return NULL; + return nullptr; } extern "C" void Shutdown() @@ -79,9 +79,9 @@ GdkPixbuf *MakePixbuf( const RageSurface *pSrc ) RageSurfaceUtils::Blit( pSrc, pSurface , -1, -1 ); GdkPixbuf *pBuf = gdk_pixbuf_new_from_data( pSurface->pixels, GDK_COLORSPACE_RGB, - true, 8, pSurface->w, pSurface->h , pSurface->pitch, DeletePixels, NULL); + true, 8, pSurface->w, pSurface->h , pSurface->pitch, DeletePixels, nullptr); - if( pBuf != NULL ) + if( pBuf != nullptr ) pSurface->pixels_owned = false; delete pSurface; @@ -91,7 +91,7 @@ GdkPixbuf *MakePixbuf( const RageSurface *pSrc ) extern "C" void SetIcon( const RageSurface *pSrcImg ) { GdkPixbuf *pBuf = MakePixbuf( pSrcImg ); - if( pBuf != NULL ) + if( pBuf != nullptr ) { gtk_window_set_icon( GTK_WINDOW(window), pBuf ); g_object_unref(pBuf); @@ -102,7 +102,7 @@ extern "C" void SetIcon( const RageSurface *pSrcImg ) extern "C" void SetSplash( const RageSurface *pSplash ) { GdkPixbuf *pBuf = MakePixbuf( pSplash ); - if( pBuf != NULL ) + if( pBuf != nullptr ) { gtk_image_set_from_pixbuf(GTK_IMAGE(splash), pBuf); g_object_unref(pBuf); From 91c31431e834c30a1ed215aa9374c944bc170bf0 Mon Sep 17 00:00:00 2001 From: RhythmLunatic Date: Sat, 21 Sep 2019 13:48:13 -0500 Subject: [PATCH 03/17] back to DOS line endings --- .../LoadingWindow/LoadingWindow_GtkModule.cpp | 302 +++++++++--------- 1 file changed, 151 insertions(+), 151 deletions(-) diff --git a/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp b/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp index 5d03191e1f..7b75c90f1c 100644 --- a/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp +++ b/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp @@ -1,151 +1,151 @@ -#include "global.h" -#include "LoadingWindow_GtkModule.h" -#include "RageUtil.h" -#include "RageSurface.h" -#include "RageSurfaceUtils.h" -#include "RageSurface_Load.h" - -#include - -static GtkWidget *label; -static GtkWidget *window; -static GtkWidget *splash; -static GtkWidget *progressBar; - -extern "C" const char *Init( int *argc, char ***argv ) -{ - // Need to use external library to load this image. Native loader seems broken :/ - const gchar *splash_image_path = "Data/splash.png"; - GtkWidget *vbox; - - gtk_disable_setlocale(); - if( !gtk_init_check(argc,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_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" ); - //gtk_window_set_icon( GTK_WINDOW(window), ); - gtk_widget_realize(window); - - splash = gtk_image_new_from_file(splash_image_path); - - label = gtk_label_new(nullptr); - gtk_label_set_justify(GTK_LABEL(label),GTK_JUSTIFY_CENTER); - gtk_label_set_ellipsize(GTK_LABEL(label),PANGO_ELLIPSIZE_END); - gtk_label_set_line_wrap(GTK_LABEL(label),FALSE); - - progressBar = gtk_progress_bar_new(); - gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), 0.0 ); - - vbox = gtk_vbox_new(FALSE,0); - gtk_container_add(GTK_CONTAINER(window),vbox); - gtk_box_pack_start(GTK_BOX(vbox),splash,FALSE,FALSE,0); - gtk_box_pack_end(GTK_BOX(vbox),progressBar,FALSE,FALSE,0); - gtk_box_pack_end(GTK_BOX(vbox),label,TRUE,TRUE,0); - - gtk_widget_show_all(window); - gtk_main_iteration_do(FALSE); - return nullptr; -} - -extern "C" void Shutdown() -{ - gtk_widget_hide(window); - g_signal_emit_by_name (G_OBJECT (window), "destroy"); - while( gtk_events_pending() ) - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetText( const char *s ) -{ - gtk_label_set_text(GTK_LABEL(label), s); - gtk_widget_show(label); - gtk_main_iteration_do(FALSE); -} - -void DeletePixels( guchar *pixels, gpointer data ) -{ - delete[] (uint8_t *)pixels; -} - -GdkPixbuf *MakePixbuf( const RageSurface *pSrc ) -{ - RageSurface *pSurface = CreateSurface( pSrc->w, pSrc->h, 32, - 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 ); - RageSurfaceUtils::Blit( pSrc, pSurface , -1, -1 ); - - GdkPixbuf *pBuf = gdk_pixbuf_new_from_data( pSurface->pixels, GDK_COLORSPACE_RGB, - true, 8, pSurface->w, pSurface->h , pSurface->pitch, DeletePixels, nullptr); - - if( pBuf != nullptr ) - pSurface->pixels_owned = false; - - delete pSurface; - return pBuf; -} - -extern "C" void SetIcon( const RageSurface *pSrcImg ) -{ - GdkPixbuf *pBuf = MakePixbuf( pSrcImg ); - if( pBuf != nullptr ) - { - gtk_window_set_icon( GTK_WINDOW(window), pBuf ); - g_object_unref(pBuf); - } - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetSplash( const RageSurface *pSplash ) -{ - GdkPixbuf *pBuf = MakePixbuf( pSplash ); - if( pBuf != nullptr ) - { - gtk_image_set_from_pixbuf(GTK_IMAGE(splash), pBuf); - g_object_unref(pBuf); - } - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetProgress( int progress, int totalWork ) -{ - gdouble fraction = ( totalWork > 0 ? progress / (gdouble)totalWork : 0 ); - if( fraction > 1.0 ) fraction = 1.0; - if( fraction < 0.0 ) fraction = 0.0; - gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), fraction ); - gtk_main_iteration_do(FALSE); -} - -extern "C" void SetIndeterminate( bool indeterminate ) -{ - gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressBar)); - gtk_main_iteration_do(FALSE); -} - -/* - * (c) 2003-2004 Glenn Maynard, Sean Burke - * All rights reserved. - * - * 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, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * 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 OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ +#include "global.h" +#include "LoadingWindow_GtkModule.h" +#include "RageUtil.h" +#include "RageSurface.h" +#include "RageSurfaceUtils.h" +#include "RageSurface_Load.h" + +#include + +static GtkWidget *label; +static GtkWidget *window; +static GtkWidget *splash; +static GtkWidget *progressBar; + +extern "C" const char *Init( int *argc, char ***argv ) +{ + // Need to use external library to load this image. Native loader seems broken :/ + const gchar *splash_image_path = "Data/splash.png"; + GtkWidget *vbox; + + gtk_disable_setlocale(); + if( !gtk_init_check(argc,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_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" ); + //gtk_window_set_icon( GTK_WINDOW(window), ); + gtk_widget_realize(window); + + splash = gtk_image_new_from_file(splash_image_path); + + label = gtk_label_new(nullptr); + gtk_label_set_justify(GTK_LABEL(label),GTK_JUSTIFY_CENTER); + gtk_label_set_ellipsize(GTK_LABEL(label),PANGO_ELLIPSIZE_END); + gtk_label_set_line_wrap(GTK_LABEL(label),FALSE); + + progressBar = gtk_progress_bar_new(); + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), 0.0 ); + + vbox = gtk_vbox_new(FALSE,0); + gtk_container_add(GTK_CONTAINER(window),vbox); + gtk_box_pack_start(GTK_BOX(vbox),splash,FALSE,FALSE,0); + gtk_box_pack_end(GTK_BOX(vbox),progressBar,FALSE,FALSE,0); + gtk_box_pack_end(GTK_BOX(vbox),label,TRUE,TRUE,0); + + gtk_widget_show_all(window); + gtk_main_iteration_do(FALSE); + return nullptr; +} + +extern "C" void Shutdown() +{ + gtk_widget_hide(window); + g_signal_emit_by_name (G_OBJECT (window), "destroy"); + while( gtk_events_pending() ) + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetText( const char *s ) +{ + gtk_label_set_text(GTK_LABEL(label), s); + gtk_widget_show(label); + gtk_main_iteration_do(FALSE); +} + +void DeletePixels( guchar *pixels, gpointer data ) +{ + delete[] (uint8_t *)pixels; +} + +GdkPixbuf *MakePixbuf( const RageSurface *pSrc ) +{ + RageSurface *pSurface = CreateSurface( pSrc->w, pSrc->h, 32, + 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 ); + RageSurfaceUtils::Blit( pSrc, pSurface , -1, -1 ); + + GdkPixbuf *pBuf = gdk_pixbuf_new_from_data( pSurface->pixels, GDK_COLORSPACE_RGB, + true, 8, pSurface->w, pSurface->h , pSurface->pitch, DeletePixels, nullptr); + + if( pBuf != nullptr ) + pSurface->pixels_owned = false; + + delete pSurface; + return pBuf; +} + +extern "C" void SetIcon( const RageSurface *pSrcImg ) +{ + GdkPixbuf *pBuf = MakePixbuf( pSrcImg ); + if( pBuf != nullptr ) + { + gtk_window_set_icon( GTK_WINDOW(window), pBuf ); + g_object_unref(pBuf); + } + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetSplash( const RageSurface *pSplash ) +{ + GdkPixbuf *pBuf = MakePixbuf( pSplash ); + if( pBuf != nullptr ) + { + gtk_image_set_from_pixbuf(GTK_IMAGE(splash), pBuf); + g_object_unref(pBuf); + } + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetProgress( int progress, int totalWork ) +{ + gdouble fraction = ( totalWork > 0 ? progress / (gdouble)totalWork : 0 ); + if( fraction > 1.0 ) fraction = 1.0; + if( fraction < 0.0 ) fraction = 0.0; + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), fraction ); + gtk_main_iteration_do(FALSE); +} + +extern "C" void SetIndeterminate( bool indeterminate ) +{ + gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressBar)); + gtk_main_iteration_do(FALSE); +} + +/* + * (c) 2003-2004 Glenn Maynard, Sean Burke + * All rights reserved. + * + * 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, and/or sell copies of the Software, and to permit persons to + * whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT + * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ From 63735535bfe46a8378bc1e72c050358cde4c826d Mon Sep 17 00:00:00 2001 From: RhythmLunatic Date: Wed, 2 Oct 2019 11:07:47 -0500 Subject: [PATCH 04/17] Fix pump couples mode --- src/GameManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GameManager.cpp b/src/GameManager.cpp index 86e36c4bd3..6922ca5601 100644 --- a/src/GameManager.cpp +++ b/src/GameManager.cpp @@ -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] From b26b711e4718b9c91820e93703bfe69d723b0644 Mon Sep 17 00:00:00 2001 From: Prcuvu Date: Fri, 4 Oct 2019 14:09:11 +0800 Subject: [PATCH 05/17] Reenable USE_FOLDERS --- StepmaniaCore.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/StepmaniaCore.cmake b/StepmaniaCore.cmake index fe8bd1e302..3d91931b24 100644 --- a/StepmaniaCore.cmake +++ b/StepmaniaCore.cmake @@ -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() From 46e141093252c3f5670b1df9042e8b96e3543791 Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 08:45:34 -0400 Subject: [PATCH 06/17] Remove DirectX SDK search from CMake The DirectX APIs are now part of the Windows SDK. We should stop relying on the ancient SDK. This is step one. (backport from master) --- StepmaniaCore.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/StepmaniaCore.cmake b/StepmaniaCore.cmake index 3d91931b24..502085ac96 100644 --- a/StepmaniaCore.cmake +++ b/StepmaniaCore.cmake @@ -276,8 +276,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) From cdc4bd9da2ef9af54f96e38666f5f42217699388 Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 08:48:19 -0400 Subject: [PATCH 07/17] Replace missing dxguid.lib functionality One thing that did not make it into the move to the Windows SDK is the dxguid.lib library, which defined the IIDs for all of the DirectX interfaces. This replaces that, defining the ones we use. Currently, we only need to define the DirectInput IIDs, so that is all that is here. (backport from master) --- src/CMakeData-os.cmake | 1 + src/archutils/Win32/DirectXGuids.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/archutils/Win32/DirectXGuids.cpp diff --git a/src/CMakeData-os.cmake b/src/CMakeData-os.cmake index 4da9486e4d..a8116942c0 100644 --- a/src/CMakeData-os.cmake +++ b/src/CMakeData-os.cmake @@ -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" diff --git a/src/archutils/Win32/DirectXGuids.cpp b/src/archutils/Win32/DirectXGuids.cpp new file mode 100644 index 0000000000..22ae05e658 --- /dev/null +++ b/src/archutils/Win32/DirectXGuids.cpp @@ -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 From dfb524a54787899b51cf28fcafdcba19170fc5d8 Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 08:56:03 -0400 Subject: [PATCH 08/17] Fix incorrect usage of GetLastError in LLW_Win32 GetLastError must be called before any other function which could possibly change it, otherwise we will lose the error code. (backport from master) --- .../LowLevelWindow/LowLevelWindow_Win32.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp b/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp index 25ace08fa5..35d23415bf 100644 --- a/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp +++ b/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp @@ -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") ); } } From dce0d0f91cf589790dba8eaa79008ffe7811b496 Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 08:58:05 -0400 Subject: [PATCH 09/17] Fix potential security issue with FormatMessage use From MSDN: Security Remarks If this function is called without FORMAT_MESSAGE_IGNORE_INSERTS, the Arguments parameter must contain enough parameters to satisfy all insertion sequences in the message string, and they must be of the correct type. Therefore, do not use untrusted or unknown message strings with inserts enabled because they can contain more insertion sequences than Arguments provides, or those that may be of the wrong type. In particular, it is unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS. (backport from master) --- src/archutils/Win32/ErrorStrings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/archutils/Win32/ErrorStrings.cpp b/src/archutils/Win32/ErrorStrings.cpp index 336c5a0324..4c79144b81 100644 --- a/src/archutils/Win32/ErrorStrings.cpp +++ b/src/archutils/Win32/ErrorStrings.cpp @@ -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) From e9ca966af71a1566cba7d7a279381f9eee81524f Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 09:00:24 -0400 Subject: [PATCH 10/17] Allow CreateScreenshot to return nullptr RageDisplay_D3D::CreateScreenshot will be returning nullptr until I get around to re-implementing it without using d3dx, which is another thing that did not make the move into the Windows SDK. (backport from master) --- src/RageDisplay.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/RageDisplay.cpp b/src/RageDisplay.cpp index 4aeebd4ab9..68e1c0558f 100644 --- a/src/RageDisplay.cpp +++ b/src/RageDisplay.cpp @@ -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. */ From 6aedffabf3097ee89a66aecd3a312016d3131c5e Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 09:29:01 -0400 Subject: [PATCH 11/17] Add GetErrorString to DirectXHelpers; Add error list * Another thing lost was DXGetErrorString. Re-implement it. * Include a partial list of errors. (backported from master, where it was two commits) Note: If we ever drop support for windows older than win8, we can remove this and just call FormatMessage. --- src/archutils/Win32/DirectXErrorList.h | 199 +++++++++++++++++++++++++ src/archutils/Win32/DirectXHelpers.cpp | 35 +++-- src/archutils/Win32/DirectXHelpers.h | 2 + 3 files changed, 221 insertions(+), 15 deletions(-) create mode 100644 src/archutils/Win32/DirectXErrorList.h diff --git a/src/archutils/Win32/DirectXErrorList.h b/src/archutils/Win32/DirectXErrorList.h new file mode 100644 index 0000000000..d2f670a5c0 --- /dev/null +++ b/src/archutils/Win32/DirectXErrorList.h @@ -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 \ No newline at end of file diff --git a/src/archutils/Win32/DirectXHelpers.cpp b/src/archutils/Win32/DirectXHelpers.cpp index 247417c56d..04423e8476 100644 --- a/src/archutils/Win32/DirectXHelpers.cpp +++ b/src/archutils/Win32/DirectXHelpers.cpp @@ -2,16 +2,6 @@ #include "DirectXHelpers.h" #include "RageUtil.h" -#include -#if defined(USE_DXERR9) -#include -#else -#include -#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 +#include +#include // dsound.h needs this +#include + +#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. diff --git a/src/archutils/Win32/DirectXHelpers.h b/src/archutils/Win32/DirectXHelpers.h index b8438f1fce..42c00f5d19 100644 --- a/src/archutils/Win32/DirectXHelpers.h +++ b/src/archutils/Win32/DirectXHelpers.h @@ -22,6 +22,8 @@ osvi.wServicePackMajor = 0; return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != false; } +RString GetErrorString(HRESULT hr); + #endif /* From 2bce815a1af0687a4ecd6994c32bb930d66be63f Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 09:35:44 -0400 Subject: [PATCH 12/17] Fix build errors with RageDisplay_D3D using Windows SDK Also: Implement d3d9 screenshots without d3dx9 This only implements the two most likely surface formats. Does anybody actually use 16-bit rendering anymore? (If yes, I'll do the slower path through StretchRect to convert) (backport from master, where it was two commits) --- src/RageDisplay_D3D.cpp | 55 +++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/src/RageDisplay_D3D.cpp b/src/RageDisplay_D3D.cpp index 0f112eadf5..2f044b9021 100644 --- a/src/RageDisplay_D3D.cpp +++ b/src/RageDisplay_D3D.cpp @@ -13,28 +13,20 @@ #include "DisplaySpec.h" #include "LocalizedString.h" -#include #include -#include #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 #include -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(); From 626e58700eba99a4038d2c408b079c2d254b713b Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 09:46:51 -0400 Subject: [PATCH 13/17] Fix build errors with IH_DirectInput using the Win SDK * dxguid.lib no longer exists. * older SDKs (like the v140_xp toolset) don't provide XUSER_MAX_COUNT. --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 6 ++++++ src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 86872fda52..d04196bf05 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -20,6 +20,12 @@ #include #include +// 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 Devices; diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index c582dc7066..04e2b857b9 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -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; From c1e4d56f5e7f615f7a64b6bcf6b65c3482201762 Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 09:53:20 -0400 Subject: [PATCH 14/17] Fix indentation in CMakeData-os.cmake --- src/CMakeData-os.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeData-os.cmake b/src/CMakeData-os.cmake index a8116942c0..63ef1a064b 100644 --- a/src/CMakeData-os.cmake +++ b/src/CMakeData-os.cmake @@ -42,7 +42,7 @@ else() "archutils/Win32/CrashHandlerNetworking.cpp" "archutils/Win32/DebugInfoHunt.cpp" "archutils/Win32/DialogUtil.cpp" - "archutils/Win32/DirectXGuids.cpp" + "archutils/Win32/DirectXGuids.cpp" "archutils/Win32/DirectXHelpers.cpp" "archutils/Win32/ErrorStrings.cpp" "archutils/Win32/GetFileInformation.cpp" From 8e7c4df49c8544f2d21a7e62f1b7addeba9afc25 Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 10:37:07 -0400 Subject: [PATCH 15/17] backport legacy credits from master (#1906) * Restore lost Stepmania Team credits Back in 2009, an overhaul was made to the theme to replace the credits screen. That new screen had a short list of credits, along with a note to "remake this list". That never happened, and over time, the original credits list was lost in the shuffle. People that worked on Stepmania in the past, who felt their contributions were enough to warrant credit, should still get credit. This list was pulled directly from the git history under hash fb1165e6be1cd1e40193b7d6a100c2525a670e04 It could probably be cleaned up a bit. (For instance, the theme has been completely redone. Should we still include the Graphics and Theme sections? Also, the web section. And the thanks section? Those are pretty much just shoutouts.) * Name change. Deal with it >8) * Change encoding of restored credits to utf-8 The list used "fancy" quotes. I should have saved this at utf-8 to begin with. --- Docs/credits.txt | 1 + Docs/credits_old_Stepmania_Team.txt | 112 ++++++++++++++++++++++++++++ src/BeginnerHelper.cpp | 2 +- src/BeginnerHelper.h | 2 +- src/ScreenHowToPlay.cpp | 2 +- src/ScreenHowToPlay.h | 2 +- stepmania.nsi | 1 + 7 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 Docs/credits_old_Stepmania_Team.txt diff --git a/Docs/credits.txt b/Docs/credits.txt index 0c7e7ddd79..96f229f08b 100644 --- a/Docs/credits.txt +++ b/Docs/credits.txt @@ -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. diff --git a/Docs/credits_old_Stepmania_Team.txt b/Docs/credits_old_Stepmania_Team.txt new file mode 100644 index 0000000000..a80428c798 --- /dev/null +++ b/Docs/credits_old_Stepmania_Team.txt @@ -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 diff --git a/src/BeginnerHelper.cpp b/src/BeginnerHelper.cpp index 2fcc92faec..5f6b5fe45e 100644 --- a/src/BeginnerHelper.cpp +++ b/src/BeginnerHelper.cpp @@ -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 diff --git a/src/BeginnerHelper.h b/src/BeginnerHelper.h index 4cfb5e5295..973b1afb9b 100644 --- a/src/BeginnerHelper.h +++ b/src/BeginnerHelper.h @@ -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. * diff --git a/src/ScreenHowToPlay.cpp b/src/ScreenHowToPlay.cpp index 83f878133d..5e2a7ac1fe 100644 --- a/src/ScreenHowToPlay.cpp +++ b/src/ScreenHowToPlay.cpp @@ -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 diff --git a/src/ScreenHowToPlay.h b/src/ScreenHowToPlay.h index ea75881df5..626dc6c4f0 100644 --- a/src/ScreenHowToPlay.h +++ b/src/ScreenHowToPlay.h @@ -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 diff --git a/stepmania.nsi b/stepmania.nsi index 293f612668..086d5e2f40 100644 --- a/stepmania.nsi +++ b/stepmania.nsi @@ -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" From d7f9c8d7b6915f0f1ebb25996e6fbf56fbea37bf Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Fri, 4 Oct 2019 11:34:24 -0400 Subject: [PATCH 16/17] Remove more DX CMake bits There is also a weird bit in here that seems like it should be whether to use system or included libpng, but it actually does the directx include dir on one side. --- src/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f68a758ae3..da33e8f4b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -481,9 +481,6 @@ if(WIN32) "setupapi.lib" "hid.lib") - get_filename_component(DIRECTX_LIBRARY_DIR "${DIRECTX_LIBRARIES}" DIRECTORY) - - sm_add_link_flag("${SM_EXE_NAME}" "/LIBPATH:\"${DIRECTX_LIBRARY_DIR}\"") sm_add_link_flag("${SM_EXE_NAME}" "/LIBPATH:\"${SM_EXTERN_DIR}/ffmpeg/lib\"") sm_add_link_flag("${SM_EXE_NAME}" "/LIBPATH:\"${SM_SRC_DIR}/archutils/Win32/ddk\"") @@ -665,7 +662,8 @@ else() endif() if(WIN32) - list(APPEND SM_INCLUDE_DIRS ${DIRECTX_INCLUDE_DIR}) + # FIXME: This makes no sense... + #list(APPEND SM_INCLUDE_DIRS ${DIRECTX_INCLUDE_DIR}) else() list(APPEND SM_INCLUDE_DIRS "${SM_EXTERN_DIR}/libpng/include") endif() From 8674dcca33a4cfe30a9f153e64ced47d449a3655 Mon Sep 17 00:00:00 2001 From: Prcuvu Date: Sat, 5 Oct 2019 22:30:28 +0800 Subject: [PATCH 17/17] Update AppVeyor CI badge [ci skip] (#1909) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aea897bb43..3c00c3e482 100644 --- a/README.md +++ b/README.md @@ -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