-rw-r--r-- | noncore/apps/zsafe/main.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 4fe319b..5f48f77 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp | |||
@@ -1,27 +1,35 @@ | |||
1 | /* | 1 | /* |
2 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> | 2 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> |
3 | ** | 3 | ** |
4 | ** $Id$ | 4 | ** $Id$ |
5 | ** | 5 | ** |
6 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html | 6 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
10 | #include "zsafe.h" | 10 | #include "zsafe.h" |
11 | |||
12 | /* OPIE */ | ||
13 | #include <opie2/odebug.h> | ||
14 | using namespace Opie::Core; | ||
15 | |||
16 | /* QT */ | ||
11 | #ifdef DESKTOP | 17 | #ifdef DESKTOP |
12 | #include <qapplication.h> | 18 | #include <qapplication.h> |
13 | #else | 19 | #else |
14 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
15 | #endif | 21 | #endif |
22 | |||
23 | /* STD */ | ||
16 | #include <stdio.h> | 24 | #include <stdio.h> |
17 | #include <signal.h> | 25 | #include <signal.h> |
18 | 26 | ||
19 | ZSafe *zs; | 27 | ZSafe *zs; |
20 | #ifdef DESKTOP | 28 | #ifdef DESKTOP |
21 | QApplication *appl; | 29 | QApplication *appl; |
22 | #else | 30 | #else |
23 | QPEApplication *appl; | 31 | QPEApplication *appl; |
24 | #endif | 32 | #endif |
25 | 33 | ||
26 | int DeskW; | 34 | int DeskW; |
27 | int DeskH; | 35 | int DeskH; |
@@ -49,53 +57,50 @@ int main( int argc, char ** argv ) | |||
49 | #else | 57 | #else |
50 | QPEApplication a( argc, argv ); | 58 | QPEApplication a( argc, argv ); |
51 | #endif | 59 | #endif |
52 | appl = &a; | 60 | appl = &a; |
53 | 61 | ||
54 | #ifdef DESKTOP | 62 | #ifdef DESKTOP |
55 | if (argc >= 3) | 63 | if (argc >= 3) |
56 | { | 64 | { |
57 | #ifndef WIN32 | 65 | #ifndef WIN32 |
58 | DeskW = atoi(argv[1]); | 66 | DeskW = atoi(argv[1]); |
59 | DeskH = atoi(argv[2]); | 67 | DeskH = atoi(argv[2]); |
60 | #else | 68 | #else |
61 | int w, h; | 69 | int w, h; |
62 | sscanf (argv[1], "%d", &w); | 70 | sscanf (argv[1], "%d", &w); |
63 | sscanf (argv[2], "%d", &h); | 71 | sscanf (argv[2], "%d", &h); |
64 | DeskW = w; | 72 | DeskW = w; |
65 | DeskH = h; | 73 | DeskH = h; |
66 | #endif | 74 | #endif |
67 | } | 75 | } |
68 | else | 76 | else |
69 | { | 77 | { |
70 | DeskW = 600; | 78 | DeskW = 600; |
71 | DeskH = 400; | 79 | DeskH = 400; |
72 | } | 80 | } |
73 | #else | 81 | #else |
74 | DeskW = a.desktop()->width(); | 82 | DeskW = a.desktop()->width(); |
75 | DeskH = a.desktop()->height(); | 83 | DeskH = a.desktop()->height(); |
76 | 84 | ||
77 | char buf[128]; | 85 | owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; |
78 | sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH); | ||
79 | qWarning (buf); | ||
80 | 86 | ||
81 | #ifdef JPATCH_HDE | 87 | #ifdef JPATCH_HDE |
82 | // nothings | 88 | // nothings |
83 | #else | 89 | #else |
84 | if (DeskW > 240) | 90 | if (DeskW > 240) |
85 | { | 91 | { |
86 | DeskW -= 20; | 92 | DeskW -= 20; |
87 | DeskH += 25; | 93 | DeskH += 25; |
88 | sprintf (buf, "Changed width: %d Height: %d\n", DeskW, DeskH); | 94 | owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; |
89 | qWarning (buf); | ||
90 | } | 95 | } |
91 | #endif | 96 | #endif |
92 | 97 | ||
93 | #endif | 98 | #endif |
94 | 99 | ||
95 | ZSafe mw; | 100 | ZSafe mw; |
96 | zs = &mw; | 101 | zs = &mw; |
97 | 102 | ||
98 | #ifndef WIN32 | 103 | #ifndef WIN32 |
99 | signal (SIGCONT, resume); | 104 | signal (SIGCONT, resume); |
100 | #endif | 105 | #endif |
101 | #ifdef DESKTOP | 106 | #ifdef DESKTOP |