Unified · Split
| @@ -10,7 +10,7 @@ CC=$(MING)gcc · 9 unmodified lines | ||
| 10 | 10 | AS=$(MING)as |
| 11 | 11 | RANLIB=$(MING)ranlib |
| 12 | 12 | WINDRES=$(MING)windres |
| 13 | −CFLAGS=-Wall -Wno-missing-braces -I$(ROOT)/include -I$(ROOT) -I$(ROOT)/kern -c -D_X86_ -DIS_32 -DWINDOWS -O2 | |
| 13 | +CFLAGS=-Wall -Wno-missing-braces -I$(ROOT)/include -I$(ROOT) -I$(ROOT)/kern -c -D_X86_ -DIS_32 -DWINDOWS -DUNICODE -O2 | |
| 14 | 14 | O=o |
| 15 | 15 | FS=fs-win32 |
| 16 | 16 | IP=win32 |
| @@ -1,3 +1,4 @@ | ||
| 1 | +#define _WIN32_WINNT 0x0500 | |
| 1 | 2 | #include <windows.h> |
| 2 | 3 | |
| 3 | 4 | #undef Rectangle |
| @@ -188,13 +189,13 @@ winproc(void *a) · 184 unmodified lines | ||
| 188 | 189 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); |
| 189 | 190 | wc.hbrBackground = GetStockObject(WHITE_BRUSH); |
| 190 | 191 | wc.lpszMenuName = 0; |
| 191 | − wc.lpszClassName = "9pmgraphics"; | |
| 192 | + wc.lpszClassName = L"9pmgraphics"; | |
| 192 | 193 | RegisterClass(&wc); |
| 193 | 194 | |
| 194 | 195 | window = CreateWindowEx( |
| 195 | 196 | 0, /* extended style */ |
| 196 | − "9pmgraphics", /* class */ | |
| 197 | − "drawterm screen", /* caption */ | |
| 197 | + L"9pmgraphics", /* class */ | |
| 198 | + L"drawterm screen", /* caption */ | |
| 198 | 199 | WS_OVERLAPPEDWINDOW, /* style */ |
| 199 | 200 | CW_USEDEFAULT, /* init. x pos */ |
| 200 | 201 | CW_USEDEFAULT, /* init. y pos */ |
| @@ -338,6 +339,11 @@ WindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) · 137 unmodified lines | ||
| 338 | 339 | return 1; |
| 339 | 340 | } |
| 340 | 341 | return DefWindowProc(hwnd, msg, wparam, lparam); |
| 342 | + case WM_MOUSEWHEEL: | |
| 343 | + if ((int)(wparam & 0xFFFF0000)>0) | |
| 344 | + b|=8; | |
| 345 | + else | |
| 346 | + b|=16; | |
| 341 | 347 | case WM_MOUSEMOVE: |
| 342 | 348 | case WM_LBUTTONUP: |
| 343 | 349 | case WM_MBUTTONUP: |