Author: janderwald
Date: Fri Feb 2 12:17:45 2007
New Revision: 25684
URL:
http://svn.reactos.org/svn/reactos?rev=25684&view=rev
Log:
- Fix include path
- Make code c compatible
- Fix bug in parsing routine
Modified:
trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c
Modified: trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c (original)
+++ trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c Fri Feb 2 12:17:45
2007
@@ -18,8 +18,8 @@
*/
#include <windows.h>
-#include <gl.h>
-#include <glu.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
#include <tchar.h>
#define APPNAME _T("Cylfrac")
@@ -159,9 +159,9 @@
case WM_PAINT:
{
DWORD ticks = oldticks;
+ POINT currpoint;
oldticks = GetTickCount();
DrawScene(hwnd, dc, oldticks - ticks);
- POINT currpoint;
if(fullscreen)
{
GetCursorPos(&currpoint);
@@ -187,10 +187,11 @@
{
int width = LOWORD(lParam);
int height = HIWORD(lParam);
+ float fscale;
glViewport(0, 0, width, height);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- float fscale = 0.8/(float)lvls;
+ fscale = 0.8/(float)lvls;
glScalef(fscale, fscale, fscale);
break;
}
@@ -236,7 +237,12 @@
void ParseCommandLine(PSTR szCmdLine, int *chOption, HWND *hwndParent)
{
- int ch = *szCmdLine++;
+ int ch;
+
+ if (!strlen(szCmdLine))
+ return;
+
+ ch = *szCmdLine++;
if(ch == '-' || ch == '/')
ch = *szCmdLine++;
@@ -245,6 +251,10 @@
ch += 'a' - 'A';
*chOption = ch;
+
+ if (ch == 's' || ch == 'c')
+ return;
+
ch = *szCmdLine++;
if(ch == ':')
@@ -268,7 +278,7 @@
int iCmdShow)
{
HWND hwndParent;
- int chOption;
+ int chOption = 0;
MSG Message;
hInstance = hInst;