gameux: IGameStatistics::GetMaxCategoryLength implementation.
authorMariusz Pluciński <vshader@gmail.com>
Thu, 23 Sep 2010 13:39:30 +0000 (15:39 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 24 Sep 2010 13:45:53 +0000 (15:45 +0200)
dlls/gameux/gamestatistics.c
dlls/gameux/tests/gamestatistics.c

index 69781735dfa6e3aa211ba655151b81a0f4e7ccfe..063fbd53cb1fb054c1917ec160f144eb6c0cf8f5 100644 (file)
@@ -31,6 +31,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(gameux);
 
+#define MAX_CATEGORY_LENGTH 60
 /*******************************************************************************
  * IGameStatistics implementation
  */
@@ -108,8 +109,12 @@ static HRESULT WINAPI GameStatisticsImpl_GetMaxCategoryLength(
     IGameStatistics *iface,
     UINT *cch)
 {
-    FIXME("stub\n");
-    return E_NOTIMPL;
+    TRACE("(%p, %p)\n", iface, cch);
+    if(!cch)
+        return E_INVALIDARG;
+
+    *cch = MAX_CATEGORY_LENGTH;
+    return S_OK;
 }
 
 static HRESULT WINAPI GameStatisticsImpl_GetMaxNameLength(
index 7641157ae0a9ad9b63a7b704e8ca4f7e4c5724c2..80e4e9181ebe209346bcb1db1b626a8526b9de8e 100644 (file)
@@ -244,8 +244,8 @@ static void test_gamestatisticsmgr( void )
     {
         /* test of limit values returned from interface */
         hr = IGameStatistics_GetMaxCategoryLength(gs, &uMaxCategoryLength);
-        todo_wine ok(hr==S_OK, "getting maximum length of category failed\n");
-        todo_wine ok(uMaxCategoryLength==60, "getting maximum length of category returned invalid value: %d\n", uMaxCategoryLength);
+        ok(hr==S_OK, "getting maximum length of category failed\n");
+        ok(uMaxCategoryLength==60, "getting maximum length of category returned invalid value: %d\n", uMaxCategoryLength);
 
         hr = IGameStatistics_GetMaxNameLength(gs, &uMaxNameLength);
         todo_wine ok(hr==S_OK, "getting maximum name length failed\n");