Skip to content

Commit

Permalink
version up to 0.79
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Mar 8, 2016
1 parent f1b510c commit fe8264f
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 40 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (C) 1991-2011 by Jamie Zawinski.
Copyright (C) 2013-2015 Katayama Hirofumi MZ.
Copyright (C) 2013-2016 Katayama Hirofumi MZ.

Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
Expand Down
4 changes: 2 additions & 2 deletions XScreenSaverWin.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B7914227-CD94-4B6F-859C-E3823C9552DA}
AppName=XScreenSaver for Windows
AppVerName=XScreenSaver for Windows v0.78
AppVerName=XScreenSaver for Windows v0.79
AppPublisher=Katayama Hirofumi MZ
AppPublisherURL=http://katahiromz.web.fc2.com/xscreensaverwin/eindex.html
AppSupportURL=http://katahiromz.web.fc2.com/xscreensaverwin/eindex.html
Expand All @@ -20,7 +20,7 @@ Compression=lzma
SolidCompression=yes
UninstallDisplayIcon={app}\xscreensaver.exe
LicenseFile=LICENSE.txt
VersionInfoVersion=0.77
VersionInfoVersion=0.79

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Expand Down
8 changes: 4 additions & 4 deletions debughelper/debughelper.rc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Version Info

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 7, 8, 0
PRODUCTVERSION 0, 7, 8, 0
FILEVERSION 0, 7, 9, 0
PRODUCTVERSION 0, 7, 9, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
Expand All @@ -33,10 +33,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Katayama Hirofumi MZ\0"
VALUE "FileDescription", "XScreenSaverWin debughelper\0"
VALUE "FileVersion", "0.78\0"
VALUE "FileVersion", "0.79\0"
VALUE "LegalCopyright", "Copyright (C) 2015 Katayama Hirofumi MZ.\0"
VALUE "ProductName", "XScreenSaverWin\0"
VALUE "ProductVersion", "0.78\0"
VALUE "ProductVersion", "0.79\0"
END
END
BLOCK "VarFileInfo"
Expand Down
8 changes: 4 additions & 4 deletions random/random.rc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Version Info

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 7, 8, 0
PRODUCTVERSION 0, 7, 8, 0
FILEVERSION 0, 7, 9, 0
PRODUCTVERSION 0, 7, 9, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
Expand All @@ -21,10 +21,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Katayama Hirofumi MZ\0"
VALUE "FileDescription", "XScreenSaverWin random screensaver\0"
VALUE "FileVersion", "0.78\0"
VALUE "FileVersion", "0.79\0"
VALUE "LegalCopyright", "Copyright (C) 2015 Katayama Hirofumi MZ.\0"
VALUE "ProductName", "XScreenSaverWin\0"
VALUE "ProductVersion", "0.78\0"
VALUE "ProductVersion", "0.79\0"
END
END
BLOCK "VarFileInfo"
Expand Down
20 changes: 16 additions & 4 deletions screenhack.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,13 @@ HBITMAP GetScreenShotBitmap(VOID)
HBITMAP hbm;
HGDIOBJ hbmOld;
BITMAPINFO bi;
INT cx, cy;
INT x, y, cx, cy;
LPVOID pvBits;

cx = GetSystemMetrics(SM_CXSCREEN);
cy = GetSystemMetrics(SM_CYSCREEN);
x = GetSystemMetrics(SM_XVIRTUALSCREEN);
y = GetSystemMetrics(SM_YVIRTUALSCREEN);
cx = GetSystemMetrics(SM_CXVIRTUALSCREEN);
cy = GetSystemMetrics(SM_CYVIRTUALSCREEN);

hwnd = GetDesktopWindow();
hdc = GetWindowDC(hwnd);
Expand All @@ -329,7 +331,7 @@ HBITMAP GetScreenShotBitmap(VOID)
if (hbm != NULL)
{
hbmOld = SelectObject(hdcMem, hbm);
BitBlt(hdcMem, 0, 0, cx, cy, hdc, 0, 0, SRCCOPY);
BitBlt(hdcMem, 0, 0, cx, cy, hdc, x, y, SRCCOPY);
SelectObject(hdcMem, hbmOld);
GdiFlush();
}
Expand Down Expand Up @@ -468,6 +470,16 @@ BOOL ss_init(HWND hwnd)
#undef ya_rand_init
ya_rand_init(0);

// multiple monitor support
if (!fChildPreview)
{
int x = GetSystemMetrics(SM_XVIRTUALSCREEN);
int y = GetSystemMetrics(SM_YVIRTUALSCREEN);
int cx = GetSystemMetrics(SM_CXVIRTUALSCREEN);
int cy = GetSystemMetrics(SM_CYVIRTUALSCREEN);
MoveWindow(hwnd, x, y, cx, cy, TRUE);
}

GetClientRect(hwnd, &rc);
ss.x0 = rc.left;
ss.y0 = rc.top;
Expand Down
8 changes: 4 additions & 4 deletions screenhack.rc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ FONT 8, "Arial"
// Version Info

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 7, 8, 0
PRODUCTVERSION 0, 7, 8, 0
FILEVERSION 0, 7, 9, 0
PRODUCTVERSION 0, 7, 9, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
Expand All @@ -91,10 +91,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Katayama Hirofumi MZ\0"
VALUE "FileDescription", "XScreenSaverWin screenhack\0"
VALUE "FileVersion", "0.78\0"
VALUE "FileVersion", "0.79\0"
VALUE "LegalCopyright", "Copyright (C) 2015 Katayama Hirofumi MZ.\0"
VALUE "ProductName", "XScreenSaverWin\0"
VALUE "ProductVersion", "0.78\0"
VALUE "ProductVersion", "0.79\0"
END
END
BLOCK "VarFileInfo"
Expand Down
24 changes: 18 additions & 6 deletions xlockmore.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,13 @@ HBITMAP GetScreenShotBitmap(VOID)
HBITMAP hbm;
HGDIOBJ hbmOld;
BITMAPINFO bi;
INT cx, cy;
INT x, y, cx, cy;
LPVOID pvBits;

cx = GetSystemMetrics(SM_CXSCREEN);
cy = GetSystemMetrics(SM_CYSCREEN);
x = GetSystemMetrics(SM_XVIRTUALSCREEN);
y = GetSystemMetrics(SM_YVIRTUALSCREEN);
cx = GetSystemMetrics(SM_CXVIRTUALSCREEN);
cy = GetSystemMetrics(SM_CYVIRTUALSCREEN);

hwnd = GetDesktopWindow();
hdc = GetWindowDC(hwnd);
Expand All @@ -329,7 +331,7 @@ HBITMAP GetScreenShotBitmap(VOID)
if (hbm != NULL)
{
hbmOld = SelectObject(hdcMem, hbm);
BitBlt(hdcMem, 0, 0, cx, cy, hdc, 0, 0, SRCCOPY);
BitBlt(hdcMem, 0, 0, cx, cy, hdc, x, y, SRCCOPY);
SelectObject(hdcMem, hbmOld);
GdiFlush();
}
Expand Down Expand Up @@ -439,9 +441,9 @@ Bool set_saver_name(const char *name)
{
LPVOID p;
SECURITY_ATTRIBUTES sa;
ZeroMemory(&sa, sizeof(sa));
ZeroMemory(&sa, sizeof(sa));
sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE;
sa.bInheritHandle = TRUE;

g_hMapping = CreateFileMappingA(INVALID_HANDLE_VALUE, &sa, PAGE_READWRITE,
0, 256, "Katayama Hirofumi MZ XScreenSaverWin");
Expand All @@ -464,6 +466,16 @@ BOOL ss_init(HWND hwnd)
#undef ya_rand_init
ya_rand_init(0);

// multiple monitor support
if (!fChildPreview)
{
int x = GetSystemMetrics(SM_XVIRTUALSCREEN);
int y = GetSystemMetrics(SM_YVIRTUALSCREEN);
int cx = GetSystemMetrics(SM_CXVIRTUALSCREEN);
int cy = GetSystemMetrics(SM_CYVIRTUALSCREEN);
MoveWindow(hwnd, x, y, cx, cy, TRUE);
}

GetClientRect(hwnd, &rc);
ss.x0 = rc.left;
ss.y0 = rc.top;
Expand Down
8 changes: 4 additions & 4 deletions xlockmore.rc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ FONT 8, "Arial"
// Version Info

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 7, 8, 0
PRODUCTVERSION 0, 7, 8, 0
FILEVERSION 0, 7, 9, 0
PRODUCTVERSION 0, 7, 9, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
Expand All @@ -91,10 +91,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Katayama Hirofumi MZ\0"
VALUE "FileDescription", "XScreenSaverWin xlockmore\0"
VALUE "FileVersion", "0.78\0"
VALUE "FileVersion", "0.79\0"
VALUE "LegalCopyright", "Copyright (C) 2015 Katayama Hirofumi MZ.\0"
VALUE "ProductName", "XScreenSaverWin\0"
VALUE "ProductVersion", "0.78\0"
VALUE "ProductVersion", "0.79\0"
END
END
BLOCK "VarFileInfo"
Expand Down
2 changes: 1 addition & 1 deletion xscreensaver-text/xscreensaver-text.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const char *saver_key = "Software\\Katayama Hirofumi MZ\\%s";

void show_version(void)
{
fprintf(stderr, "XScreenSaver for Windows v0.78 text client utility\n");
fprintf(stderr, "XScreenSaver for Windows v0.79 text client utility\n");
fprintf(stderr, "Written by Katayama Hirofumi MZ\n");
}

Expand Down
8 changes: 4 additions & 4 deletions xscreensaver-text/xscreensaver-text.rc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Version Info

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 7, 8, 0
PRODUCTVERSION 0, 7, 8, 0
FILEVERSION 0, 7, 9, 0
PRODUCTVERSION 0, 7, 9, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
Expand All @@ -21,10 +21,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Katayama Hirofumi MZ\0"
VALUE "FileDescription", "XScreenSaverWin text\0"
VALUE "FileVersion", "0.78\0"
VALUE "FileVersion", "0.79\0"
VALUE "LegalCopyright", "Copyright (C) 2015 Katayama Hirofumi MZ.\0"
VALUE "ProductName", "XScreenSaverWin\0"
VALUE "ProductVersion", "0.78\0"
VALUE "ProductVersion", "0.79\0"
END
END
BLOCK "VarFileInfo"
Expand Down
19 changes: 18 additions & 1 deletion xscreensaver/xscreensaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ VOID OnInitDialog(HWND hDlg)
}

CenterDialog(hDlg);

{
RECT rcPreview;
HWND hwndPreview = GetDlgItem(hDlg, ID_PREVIEW);
HDC hdcPreview = GetWindowDC(hwndPreview);
GetClientRect(hwndPreview, &rcPreview);
FillRect(hdcPreview, &rcPreview, (HBRUSH)GetStockObject(BLACK_BRUSH));
}
}

INT_PTR CALLBACK DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Expand All @@ -253,7 +261,16 @@ INT_PTR CALLBACK DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPara
OnInitDialog(hDlg);
return TRUE;


// Why doesn't it work?
//case WM_CTLCOLORSTATIC:
// if (GetDlgCtrlID((HWND)lParam) == ID_PREVIEW) {
// HDC hDC = (HDC)wParam;
// SetTextColor(hDC, 0);
// SetBkColor(hDC, 0);
// return (INT_PTR)GetStockObject(BLACK_BRUSH);
// }
// break;

case WM_COMMAND:
switch (LOWORD(wParam))
{
Expand Down
10 changes: 5 additions & 5 deletions xscreensaver/xscreensaver.rc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Version Info

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 7, 8, 0
PRODUCTVERSION 0, 7, 8, 0
FILEVERSION 0, 7, 9, 0
PRODUCTVERSION 0, 7, 9, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
Expand All @@ -28,10 +28,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Katayama Hirofumi MZ\0"
VALUE "FileDescription", "XScreenSaverWin\0"
VALUE "FileVersion", "0.78\0"
VALUE "FileVersion", "0.79\0"
VALUE "LegalCopyright", "Copyright (C) 2015 Katayama Hirofumi MZ.\0"
VALUE "ProductName", "XScreenSaverWin\0"
VALUE "ProductVersion", "0.78\0"
VALUE "ProductVersion", "0.79\0"
END
END
BLOCK "VarFileInfo"
Expand All @@ -56,7 +56,7 @@ END

1 DIALOGEX 0, 0, 215, 180
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "XScreenSaver for Windows v0.78"
CAPTION "XScreenSaver for Windows v0.79"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 9, "Arial"
{
Expand Down

0 comments on commit fe8264f

Please sign in to comment.