Fix butterflies' build
authorColin Finck <colin@reactos.org>
Wed, 20 Feb 2008 22:14:36 +0000 (22:14 +0000)
committerColin Finck <colin@reactos.org>
Wed, 20 Feb 2008 22:14:36 +0000 (22:14 +0000)
All screensavers using the scrnsave library must be compiled with Unicode now.

svn path=/trunk/; revision=32439

rosapps/applications/screensavers/butterflies/butterflies.c
rosapps/applications/screensavers/butterflies/butterflies.rbuild

index 906e530..b11a45d 100644 (file)
@@ -1,5 +1,6 @@
 #include <windows.h>
 #include <scrnsave.h>
 #include <windows.h>
 #include <scrnsave.h>
+#include <tchar.h>
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -12,7 +13,7 @@ HINSTANCE             hInstance;                      // Holds The Instance Of The Application
 
 GLuint texture[3];                     //stores texture objects and display list
 
 
 GLuint texture[3];                     //stores texture objects and display list
 
-LPCTSTR registryPath = ("Software\\Microsoft\\ScreenSavers\\Butterflies");
+LPCTSTR registryPath = _T("Software\\Microsoft\\ScreenSavers\\Butterflies");
 BOOL dRotate;
 
 
 BOOL dRotate;
 
 
@@ -50,7 +51,7 @@ void ReadRegistry(){
 
        valsize=sizeof(val);
 
 
        valsize=sizeof(val);
 
-       result = RegQueryValueEx(skey, "Rotate", 0, &valtype, (LPBYTE)&val, &valsize);
+       result = RegQueryValueEx(skey, _T("Rotate"), 0, &valtype, (LPBYTE)&val, &valsize);
        if(result == ERROR_SUCCESS)
                dRotate = val;
        RegCloseKey(skey);
        if(result == ERROR_SUCCESS)
                dRotate = val;
        RegCloseKey(skey);
@@ -66,7 +67,7 @@ void WriteRegistry(){
                return;
 
        val = dRotate;
                return;
 
        val = dRotate;
-       RegSetValueEx(skey, "Rotate", 0, REG_DWORD, (CONST BYTE*)&val, sizeof(val));
+       RegSetValueEx(skey, _T("Rotate"), 0, REG_DWORD, (CONST BYTE*)&val, sizeof(val));
 
        RegCloseKey(skey);
 }
 
        RegCloseKey(skey);
 }
@@ -246,10 +247,10 @@ BOOL AboutProc(HWND hdlg, UINT msg, WPARAM wpm, LPARAM lpm){
                        EndDialog(hdlg, LOWORD(wpm));
                        break;
                case WEBPAGE1:
                        EndDialog(hdlg, LOWORD(wpm));
                        break;
                case WEBPAGE1:
-                       ShellExecute(NULL, "open", "http://nehe.gamedev.net", NULL, NULL, SW_SHOWNORMAL);
+                       ShellExecute(NULL, _T("open"), _T("http://nehe.gamedev.net"), NULL, NULL, SW_SHOWNORMAL);
                        break;
                case WEBPAGE2:
                        break;
                case WEBPAGE2:
-                       ShellExecute(NULL, "open", "http://www.thaputer.com", NULL, NULL, SW_SHOWNORMAL);
+                       ShellExecute(NULL, _T("open"), _T("http://www.thaputer.com"), NULL, NULL, SW_SHOWNORMAL);
                        break;
                }
        }
                        break;
                }
        }
index d8a6b07..8da00a1 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
-<module name="butterflies" type="win32scr" installbase="system32" installname="butterflies.scr" allowwarnings="true">
+<module name="butterflies" type="win32scr" installbase="system32" installname="butterflies.scr" unicode="yes">
        <importlibrary definition="butterflies.def" />
        <include base="butterflies">.</include>
        <library>scrnsave</library>
        <importlibrary definition="butterflies.def" />
        <include base="butterflies">.</include>
        <library>scrnsave</library>
@@ -10,7 +10,7 @@
        <library>opengl32</library>
        <library>glu32</library>
        <library>advapi32</library>
        <library>opengl32</library>
        <library>glu32</library>
        <library>advapi32</library>
-        <library>shell32</library>
+       <library>shell32</library>
 
        <metadata description = "OpenGL Butterflies screensaver" />
 
 
        <metadata description = "OpenGL Butterflies screensaver" />