Procházet zdrojové kódy

Fixed bug 2726 - WinRT touches not setting 'which' field in virtual mouse events

This patch makes sure that any SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP, and
SDL_MOUSEMOTION events, as triggered by a touch event in a WinRT app, set the
event's 'which' field to SDL_TOUCH_MOUSEID.  Previously, this was getting set
to the same value as events from a real mouse, '0'.

Thanks to Diego for providing information on this bug, and to Tamas Hamor for
sending over a patch!
David Ludwig před 10 roky
rodič
revize
5575948b37

+ 1 - 1
build-scripts/g++-fat.sh

@@ -34,7 +34,7 @@ while test x$1 != x; do
             compile=no; link=no;;
         -c) link=no;;
         -o) output=$2;;
-        *.c|*.cc|*.cpp|*.S) source=$1;;
+        *.c|*.cc|*.cpp|*.S|*.m|*.mm) source=$1;;
     esac
     shift
 done

+ 1 - 1
build-scripts/gcc-fat.sh

@@ -35,7 +35,7 @@ while test x$1 != x; do
             compile=no; link=no;;
         -c) link=no;;
         -o) output=$2;;
-        *.c|*.cc|*.cpp|*.S) source=$1;;
+        *.c|*.cc|*.cpp|*.S|*.m|*.mm) source=$1;;
     esac
     shift
 done

+ 8 - 0
build-scripts/winrtbuild.bat

@@ -0,0 +1,8 @@
+@ECHO OFF
+REM
+REM winrtbuild.bat: a batch file to help launch the winrtbuild.ps1
+REM   Powershell script, either from Windows Explorer, or through Buildbot.
+REM
+SET ThisScriptsDirectory=%~dp0
+SET PowerShellScriptPath=%ThisScriptsDirectory%winrtbuild.ps1
+PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%PowerShellScriptPath%'";

+ 225 - 0
build-scripts/winrtbuild.ps1

@@ -0,0 +1,225 @@
+#
+# winrtbuild.ps1 -- A Powershell script to build all SDL/WinRT variants,
+#    across all WinRT platforms, in all of their supported, CPU architectures.
+#
+# Initial version written by David Ludwig <dludwig@pobox.com>
+#
+# This script can be launched from Windows Explorer by double-clicking
+# on winrtbuild.bat
+#
+# Output will be placed in the following subdirectories of the SDL source
+# tree:
+#   * VisualC-WinRT\lib\  -- final .dll, .lib, and .pdb files
+#   * VisualC-WinRT\obj\  -- intermediate build files
+#
+# Recommended Dependencies:
+#   * Windows 8.1 or higher
+#   * Powershell 4.0 or higher (included as part of Windows 8.1)
+#   * Visual C++ 2012, for building Windows 8.0 and Windows Phone 8.0 binaries.
+#   * Visual C++ 2013, for building Windows 8.1 and Windows Phone 8.1 binaries
+#   * SDKs for Windows 8.0, Windows 8.1, Windows Phone 8.0, and
+#     Windows Phone 8.1, as needed
+#
+# Commom parameters/variables may include, but aren't strictly limited to:
+#   * PlatformToolset: the name of one of Visual Studio's build platforms.
+#     Different PlatformToolsets output different binaries.  One
+#     PlatformToolset exists for each WinRT platform.  Possible values
+#     may include:
+#       - "v110": Visual Studio 2012 build tools, plus the Windows 8.0 SDK
+#       - "v110_wp80": Visual Studio 2012 build tools, plus the Windows Phone 8.0 SDK
+#       - "v120": Visual Studio 2013 build tools, plus the Windows 8.1 SDK
+#       - "v120_wp81": Visual Studio 2013 build tools, plus the Windows Phone 8.1 SDK
+#   * VSProjectPath: the full path to a Visual Studio or Visual C++ project file
+#   * VSProjectName: the internal name of a Visual Studio or Visual C++ project
+#     file.  Some of Visual Studio's own build tools use this name when
+#     calculating paths for build-output.
+#   * Platform: a Visual Studio platform name, which often maps to a CPU
+#     CPU architecture.  Possible values may include: "Win32" (for 32-bit x86),
+#     "ARM", or "x64" (for 64-bit x86).
+#
+
+
+# Gets the .bat file that sets up an MSBuild environment, given one of
+# Visual Studio's, "PlatformToolset"s.
+function Get-MSBuild-Env-Launcher
+{
+    param(
+        [Parameter(Mandatory=$true,Position=1)][string]$PlatformToolset
+    )
+
+    if ($PlatformToolset -eq "v110") {      # Windows 8.0 (not Windows Phone), via VS 2012
+        return "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
+    }
+    if ($PlatformToolset -eq "v110_wp80") { # Windows Phone 8.0, via VS 2012
+        return "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\WPSDK\WP80\vcvarsphoneall.bat"
+    }
+    if ($PlatformToolset -eq "v120") {      # Windows 8.1 (not Windows Phone), via VS 2013
+        return "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
+    }
+    if ($PlatformToolset -eq "v120_wp81") { # Windows Phone 8.1, via VS 2013
+        return "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
+    }
+    return ""
+}
+
+# Gets a string that identifies the build-variant of SDL/WinRT that is specific
+# to a particular Visual Studio PlatformToolset.
+function Get-SDL-WinRT-Variant-Name
+{
+    param(
+        [Parameter(Mandatory=$true,Position=1)][string]$PlatformToolset,
+
+        # If true, append a string to this function's output, identifying the
+        # build-variant's minimum-supported version of Visual Studio.
+        [switch]$IncludeVSSuffix = $false
+    )
+
+    if ($PlatformToolset -eq "v110") {      # Windows 8.0 (not Windows Phone), via VS 2012 project files
+        if ($IncludeVSSuffix) {
+            return "WinRT80_VS2012"
+        } else {
+            return "WinRT80"
+        }
+    }
+    if ($PlatformToolset -eq "v110_wp80") { # Windows Phone 8.0, via VS 2012 project files
+        if ($IncludeVSSuffix) {
+            return "WinPhone80_VS2012"
+        } else {
+            return "WinPhone80"
+        }
+    }
+    if ($PlatformToolset -eq "v120") {      # Windows 8.1 (not Windows Phone), via VS 2013 project files
+        if ($IncludeVSSuffix) {
+            return "WinRT81_VS2013"
+        } else {
+            return "WinRT81"
+        }
+    }
+    if ($PlatformToolset -eq "v120_wp81") { # Windows Phone 8.1, via VS 2013 project files
+        if ($IncludeVSSuffix) {
+            return "WinPhone81_VS2013"
+        } else {
+            return "WinPhone81"
+        }
+    }
+    return ""
+}
+
+# Returns the internal name of a Visual Studio Project.
+#
+# The internal name of a VS Project is encoded inside the project file
+# itself, inside a set of <ProjectName></ProjectName> XML tags.
+function Get-VS-ProjectName
+{
+    param(
+        [Parameter(Mandatory=$true,Position=1)]$VSProjectPath
+    )
+
+    # For now, just do a regex for the project name:
+    $matches = (Get-Content $VSProjectPath | Select-String -Pattern ".*<ProjectName>([^<]+)<.*").Matches
+    foreach ($match in $matches) {
+        if ($match.Groups.Count -ge 1) {
+            return $match.Groups[1].Value
+        }
+    }
+    return $null
+}
+
+# Build a specific variant of SDL/WinRT
+function Build-SDL-WinRT-Variant
+{
+    #
+    # Read in arguments:
+    #
+    param (
+        # name of an SDL project file, minus extensions and
+        # platform-identifying suffixes
+        [Parameter(Mandatory=$true,Position=1)][string]$SDLProjectName,
+
+        [Parameter(Mandatory=$true,Position=2)][string]$PlatformToolset,
+
+        [Parameter(Mandatory=$true,Position=3)][string]$Platform
+    )
+
+    #
+    # Derive other properties from read-in arguments:
+    #
+
+    # The .bat file to setup a platform-appropriate MSBuild environment:
+    $BatchFileForMSBuildEnv = Get-MSBuild-Env-Launcher $PlatformToolset
+
+    # The full path to the VS Project that'll be built:
+    $VSProjectPath = "$PSScriptRoot\..\VisualC-WinRT\$(Get-SDL-WinRT-Variant-Name $PlatformToolset -IncludeVSSuffix)\$SDLProjectName-$(Get-SDL-WinRT-Variant-Name $PlatformToolset).vcxproj"
+
+    # The internal name of the VS Project, used in some post-build steps:
+    $VSProjectName = Get-VS-ProjectName $VSProjectPath
+
+    # Where to place output binaries (.dll, .lib, and .pdb files):
+    $OutDir = "$PSScriptRoot\..\VisualC-WinRT\lib\$PlatformToolset\$Platform"
+
+    # Where to place intermediate build files:
+    $IntermediateDir = "$PSScriptRoot\..\VisualC-WinRT\obj\$SDLProjectName-$(Get-SDL-WinRT-Variant-Name $PlatformToolset)\$Platform"
+
+    #
+    # Build the VS Project:
+    #
+    cmd.exe /c " ""$BatchFileForMSBuildEnv"" x86 & msbuild ""$VSProjectPath"" /p:Platform=$Platform /p:OutDir=""$OutDir\\"" /p:IntDir=""$IntermediateDir\\""" | Out-Host
+    $BuildResult = $?
+
+    #
+    # Move .dll files into place.  This fixes a problem whereby MSBuild may
+    # put output files into a sub-directory of $OutDir, rather than $OutDir
+    # itself.
+    #
+    if (Test-Path "$OutDir\$VSProjectName\") {
+        Move-Item -Force "$OutDir\$VSProjectName\*" "$OutDir"
+    }
+
+    #
+    # Clean up unneeded files in $OutDir:
+    #
+    if (Test-Path "$OutDir\$VSProjectName\") {
+        Remove-Item -Recurse "$OutDir\$VSProjectName"
+    }
+    Remove-Item "$OutDir\*.exp"
+    Remove-Item "$OutDir\*.ilk"
+    Remove-Item "$OutDir\*.pri"
+
+    #
+    # All done.  Indicate success, or failure, to the caller:
+    #
+    #echo "RESULT: $BuildResult" | Out-Host
+    return $BuildResult
+}
+
+
+#
+# Build each variant, with corresponding .dll, .lib, and .pdb files:
+#
+$DidAnyFail = $false
+
+# Build for Windows Phone 8.0, via VC++ 2012:
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "ARM"))   { $DidAnyFail = $true }
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "Win32")) { $DidAnyFail = $true }
+
+# Build for Windows Phone 8.1, via VC++ 2013:
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "ARM"))   { $DidAnyFail = $true }
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "Win32")) { $DidAnyFail = $true }
+
+# Build for Windows 8.0 and Windows RT 8.0, via VC++ 2012:
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "ARM"))        { $DidAnyFail = $true }
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "Win32"))      { $DidAnyFail = $true }
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "x64"))        { $DidAnyFail = $true }
+
+# Build for Windows 8.1 and Windows RT 8.1, via VC++ 2013:
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "ARM"))        { $DidAnyFail = $true }
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "Win32"))      { $DidAnyFail = $true }
+if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "x64"))        { $DidAnyFail = $true }
+
+# Let the script's caller know whether or not any errors occurred.
+# Exit codes compatible with Buildbot are used (1 for error, 0 for success).
+if ($DidAnyFail -eq $true) {
+    exit 1
+} else {
+    exit 0
+}

+ 17 - 14
docs/README-winrt.md

@@ -19,21 +19,24 @@ Requirements
 ------------
 
 * Microsoft Visual C++ (aka Visual Studio), either 2013 or 2012 versions
-  - Free, "Express" editions may be used, so long as they include support for 
-    either "Windows Store" or "Windows Phone" apps.  Versions marked as
-    supporting "Windows Desktop" development typically do not include support
-    for creating WinRT apps.
-  - Visual C++ 2012 can only build apps that target versions 8.0 of Windows, or 
-    Windows Phone.  8.0-targetted apps will still run on devices running 
-    8.1 editions of Windows, however they will not be able to take advantage of 
+  - Free, "Community" or "Express" editions may be used, so long as they
+    include  support for either "Windows Store" or "Windows Phone" apps.
+    "Express" versions marked as supporting "Windows Desktop" development
+    typically do not include support for creating WinRT apps, to note.
+    (The "Community" edition of Visual C++ 2013 does, however, support both
+    desktop/Win32 and WinRT development).
+  - Visual C++ 2012 can only build apps that target versions 8.0 of Windows,
+    or  Windows Phone.  8.0-targetted apps will run on devices running 8.1
+    editions of Windows, however they will not be able to take advantage of
     8.1-specific features.
-  - Visual C++ 2013 can only create app projects that target 8.1 versions
-    of Windows, which do NOT run on 8.0 devices.  An optional Visual Studio
-    add-in, "Tools for Maintaining Store apps for Windows 8", allows projects
-    that are created with Visual C++ 2012, which can create Windows 8.0 apps,
-    to be loaded and built with non-Express editions of Visual C++ 2013.  More
-    details on targeting different versions of Windows can found at the
-    following web pages:
+  - Visual C++ 2013 cannot create app projects that target Windows 8.0.
+    Visual C++ 2013 Update 4, can create app projects for Windows Phone 8.0,
+    Windows Phone 8.1, and Windows 8.1, but not Windows 8.0.  An optional
+    Visual Studio add-in, "Tools for Maintaining Store apps for Windows 8",
+    allows Visual C++ 2013 to load and build Windows 8.0 projects that were
+    created with Visual C++ 2012, so long as Visual C++ 2012 is installed
+    on the same machine.  More details on targeting different versions of
+    Windows can found at the following web pages:
       - [Develop apps by using Visual Studio 2013](http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx)
       - [To add the Tools for Maintaining Store apps for Windows 8](http://msdn.microsoft.com/en-us/library/windows/apps/dn263114.aspx#AddMaintenanceTools)
 * A valid Microsoft account - This requirement is not imposed by SDL, but

+ 2 - 0
src/SDL.c

@@ -439,6 +439,8 @@ SDL_GetPlatform()
     return "Solaris";
 #elif __WIN32__
     return "Windows";
+#elif __WINRT__
+    return "WinRT";
 #elif __IPHONEOS__
     return "iOS";
 #elif __PSP__

+ 13 - 1
src/timer/windows/SDL_systimer.c

@@ -186,7 +186,19 @@ SDL_GetPerformanceFrequency(void)
     return frequency.QuadPart;
 }
 
-#ifdef __WINRT__
+/* Sleep() is not publicly available to apps in early versions of WinRT.
+ *
+ * Visual C++ 2013 Update 4 re-introduced Sleep() for Windows 8.1 and
+ * Windows Phone 8.1.
+ *
+ * Use the compiler version to determine availability.
+ *
+ * NOTE #1: _MSC_FULL_VER == 180030723 for Visual C++ 2013 Update 3.
+ * NOTE #2: Visual C++ 2013, when compiling for Windows 8.0 and
+ *    Windows Phone 8.0, uses the Visual C++ 2012 compiler to build
+ *    apps and libraries.
+ */
+#if defined(__WINRT__) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER <= 180030723)
 static void
 Sleep(DWORD timeout)
 {

+ 5 - 5
src/video/winrt/SDL_winrtpointerinput.cpp

@@ -233,8 +233,8 @@ void WINRT_ProcessPointerPressedEvent(SDL_Window *window, Windows::UI::Input::Po
 
         if (!WINRT_LeftFingerDown) {
             if (button) {
-                SDL_SendMouseMotion(window, 0, 0, (int)windowPoint.X, (int)windowPoint.Y);
-                SDL_SendMouseButton(window, 0, SDL_PRESSED, button);
+                SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, (int)windowPoint.X, (int)windowPoint.Y);
+                SDL_SendMouseButton(window, SDL_TOUCH_MOUSEID, SDL_PRESSED, button);
             }
 
             WINRT_LeftFingerDown = pointerPoint->PointerId;
@@ -262,9 +262,9 @@ WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPo
 
     if ( ! WINRT_IsTouchEvent(pointerPoint)) {
         SDL_SendMouseMotion(window, 0, 0, (int)windowPoint.X, (int)windowPoint.Y);
-    } else if (pointerPoint->PointerId == WINRT_LeftFingerDown) {
+    } else {
         if (pointerPoint->PointerId == WINRT_LeftFingerDown) {
-            SDL_SendMouseMotion(window, 0, 0, (int)windowPoint.X, (int)windowPoint.Y);
+            SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, (int)windowPoint.X, (int)windowPoint.Y);
         }
 
         SDL_SendTouchMotion(
@@ -291,7 +291,7 @@ void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::P
 
         if (WINRT_LeftFingerDown == pointerPoint->PointerId) {
             if (button) {
-                SDL_SendMouseButton(window, 0, SDL_RELEASED, button);
+                SDL_SendMouseButton(window, SDL_TOUCH_MOUSEID, SDL_RELEASED, button);
             }
             WINRT_LeftFingerDown = 0;
         }

+ 3 - 3
test/testautomation_audio.c

@@ -92,7 +92,7 @@ int audio_initQuitAudio()
 
         /* Loop over all available audio drivers */
         iMax = SDL_GetNumAudioDrivers();
-        SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers");
+        SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()");
         SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax);
         for (i = 0; i < iMax; i++) {
             audioDriver = SDL_GetAudioDriver(i);
@@ -149,7 +149,7 @@ int audio_initOpenCloseQuitAudio()
 
         /* Loop over all available audio drivers */
         iMax = SDL_GetNumAudioDrivers();
-        SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers");
+        SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()");
         SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax);
         for (i = 0; i < iMax; i++) {
             audioDriver = SDL_GetAudioDriver(i);
@@ -238,7 +238,7 @@ int audio_pauseUnpauseAudio()
 
         /* Loop over all available audio drivers */
         iMax = SDL_GetNumAudioDrivers();
-        SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers");
+        SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()");
         SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax);
         for (i = 0; i < iMax; i++) {
             audioDriver = SDL_GetAudioDriver(i);

+ 12 - 12
test/testautomation_rwops.c

@@ -647,22 +647,22 @@ rwops_testFileWriteReadEndian(void)
 
      /* Write test data */
      objectsWritten = SDL_WriteBE16(rw, BE16value);
-     SDLTest_AssertPass("Call to SDL_WriteBE16");
+     SDLTest_AssertPass("Call to SDL_WriteBE16()");
      SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
      objectsWritten = SDL_WriteBE32(rw, BE32value);
-     SDLTest_AssertPass("Call to SDL_WriteBE32");
+     SDLTest_AssertPass("Call to SDL_WriteBE32()");
      SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
      objectsWritten = SDL_WriteBE64(rw, BE64value);
-     SDLTest_AssertPass("Call to SDL_WriteBE64");
+     SDLTest_AssertPass("Call to SDL_WriteBE64()");
      SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
      objectsWritten = SDL_WriteLE16(rw, LE16value);
-     SDLTest_AssertPass("Call to SDL_WriteLE16");
+     SDLTest_AssertPass("Call to SDL_WriteLE16()");
      SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
      objectsWritten = SDL_WriteLE32(rw, LE32value);
-     SDLTest_AssertPass("Call to SDL_WriteLE32");
+     SDLTest_AssertPass("Call to SDL_WriteLE32()");
      SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
      objectsWritten = SDL_WriteLE64(rw, LE64value);
-     SDLTest_AssertPass("Call to SDL_WriteLE64");
+     SDLTest_AssertPass("Call to SDL_WriteLE64()");
      SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
 
      /* Test seek to start */
@@ -672,22 +672,22 @@ rwops_testFileWriteReadEndian(void)
 
      /* Read test data */
      BE16test = SDL_ReadBE16(rw);
-     SDLTest_AssertPass("Call to SDL_ReadBE16");
+     SDLTest_AssertPass("Call to SDL_ReadBE16()");
      SDLTest_AssertCheck(BE16test == BE16value, "Validate return value from SDL_ReadBE16, expected: %hu, got: %hu", BE16value, BE16test);
      BE32test = SDL_ReadBE32(rw);
-     SDLTest_AssertPass("Call to SDL_ReadBE32");
+     SDLTest_AssertPass("Call to SDL_ReadBE32()");
      SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %u, got: %u", BE32value, BE32test);
      BE64test = SDL_ReadBE64(rw);
-     SDLTest_AssertPass("Call to SDL_ReadBE64");
+     SDLTest_AssertPass("Call to SDL_ReadBE64()");
      SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %llu, got: %llu", BE64value, BE64test);
      LE16test = SDL_ReadLE16(rw);
-     SDLTest_AssertPass("Call to SDL_ReadLE16");
+     SDLTest_AssertPass("Call to SDL_ReadLE16()");
      SDLTest_AssertCheck(LE16test == LE16value, "Validate return value from SDL_ReadLE16, expected: %hu, got: %hu", LE16value, LE16test);
      LE32test = SDL_ReadLE32(rw);
-     SDLTest_AssertPass("Call to SDL_ReadLE32");
+     SDLTest_AssertPass("Call to SDL_ReadLE32()");
      SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %u, got: %u", LE32value, LE32test);
      LE64test = SDL_ReadLE64(rw);
-     SDLTest_AssertPass("Call to SDL_ReadLE64");
+     SDLTest_AssertPass("Call to SDL_ReadLE64()");
      SDLTest_AssertCheck(LE64test == LE64value, "Validate return value from SDL_ReadLE64, expected: %llu, got: %llu", LE64value, LE64test);
 
      /* Close handle */

+ 1 - 1
test/testautomation_surface.c

@@ -614,7 +614,7 @@ static const SDLTest_TestCaseReference surfaceTest8 =
 
 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
 static const SDLTest_TestCaseReference surfaceTest9 =
-        { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_DISABLED};
+        { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blitting routines with various blending modes", TEST_DISABLED};
 
 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
 static const SDLTest_TestCaseReference surfaceTest10 =

+ 1 - 1
test/testautomation_syswm.c

@@ -32,7 +32,7 @@ syswm_getWindowWMInfo(void *arg)
 
   /* Make call */
   result = SDL_GetWindowWMInfo(window, &info);
-  SDLTest_AssertPass("Call to SDL_GetWindowWMInfo");
+  SDLTest_AssertPass("Call to SDL_GetWindowWMInfo()");
   SDLTest_Log((result == SDL_TRUE) ? "Got window information" : "Couldn't get window information");
 
   SDL_DestroyWindow(window);

+ 9 - 9
test/testautomation_video.c

@@ -51,7 +51,7 @@ void _destroyVideoSuiteTestWindow(SDL_Window *window)
   if (window != NULL) {
      SDL_DestroyWindow(window);
      window = NULL;
-     SDLTest_AssertPass("Call to SDL_DestroyWindow");
+     SDLTest_AssertPass("Call to SDL_DestroyWindow()");
   }
 }
 
@@ -342,7 +342,7 @@ video_getWindowFlags(void *arg)
   window = _createVideoSuiteTestWindow(title);
   if (window != NULL) {
       actualFlags = SDL_GetWindowFlags(window);
-      SDLTest_AssertPass("Call to SDL_GetWindowFlags");
+      SDLTest_AssertPass("Call to SDL_GetWindowFlags()");
       SDLTest_AssertCheck((flags & actualFlags) == flags, "Verify returned value has flags %d set, got: %d", flags, actualFlags);
   }
 
@@ -364,7 +364,7 @@ video_getNumDisplayModes(void *arg)
 
   /* Get number of displays */
   displayNum = SDL_GetNumVideoDisplays();
-  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays");
+  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()");
 
   /* Make call for each display */
   for (i=0; i<displayNum; i++) {
@@ -388,7 +388,7 @@ video_getNumDisplayModesNegative(void *arg)
 
   /* Get number of displays */
   displayNum = SDL_GetNumVideoDisplays();
-  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays");
+  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()");
 
   /* Invalid boundary values */
   displayIndex =  SDLTest_RandomSint32BoundaryValue(0, displayNum, SDL_FALSE);
@@ -427,7 +427,7 @@ video_getClosestDisplayModeCurrentResolution(void *arg)
 
   /* Get number of displays */
   displayNum = SDL_GetNumVideoDisplays();
-  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays");
+  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()");
 
   /* Make calls for each display */
   for (i=0; i<displayNum; i++) {
@@ -435,7 +435,7 @@ video_getClosestDisplayModeCurrentResolution(void *arg)
 
     /* Get first display mode to get a sane resolution; this should always work */
     result = SDL_GetDisplayMode(i, 0, &current);
-    SDLTest_AssertPass("Call to SDL_GetDisplayMode");
+    SDLTest_AssertPass("Call to SDL_GetDisplayMode()");
     SDLTest_AssertCheck(result == 0, "Verify return value, expected: 0, got: %d", result);
     if (result != 0) {
       return TEST_ABORTED;
@@ -481,7 +481,7 @@ video_getClosestDisplayModeRandomResolution(void *arg)
 
   /* Get number of displays */
   displayNum = SDL_GetNumVideoDisplays();
-  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays");
+  SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()");
 
   /* Make calls for each display */
   for (i=0; i<displayNum; i++) {
@@ -521,7 +521,7 @@ video_getWindowBrightness(void *arg)
   window = _createVideoSuiteTestWindow(title);
   if (window != NULL) {
       result = SDL_GetWindowBrightness(window);
-      SDLTest_AssertPass("Call to SDL_GetWindowBrightness");
+      SDLTest_AssertPass("Call to SDL_GetWindowBrightness()");
       SDLTest_AssertCheck(result >= 0.0 && result <= 1.0, "Validate range of result value; expected: [0.0, 1.0], got: %f", result);
   }
 
@@ -583,7 +583,7 @@ video_getWindowDisplayMode(void *arg)
   window = _createVideoSuiteTestWindow(title);
   if (window != NULL) {
       result = SDL_GetWindowDisplayMode(window, &mode);
-      SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode");
+      SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode()");
       SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0, got: %d", result);
       SDLTest_AssertCheck(mode.w > 0, "Validate mode.w content; expected: >0, got: %d", mode.w);
       SDLTest_AssertCheck(mode.h > 0, "Validate mode.h content; expected: >0, got: %d", mode.h);