Merge branch 'master' of ssh://forgejo.nishi.boats:2221/pyrite-dev/milsko

This commit is contained in:
IoI_xD 2026-03-23 12:36:12 -07:00
commit 6277c8837a
9 changed files with 236 additions and 234 deletions

View file

@ -52,7 +52,9 @@ static void draw(void) {
glPopMatrix(); glPopMatrix();
} }
static void idle(void) { deg += 1.0; } static void idle(void) {
deg += 1.0;
}
static void reshape(int width, int height) { static void reshape(int width, int height) {
GLfloat lpos[4]; GLfloat lpos[4];
@ -86,4 +88,6 @@ static void init(void) {
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
} }
static void key(int k) { (void)k; } static void key(int k) {
(void)k;
}

View file

@ -113,7 +113,6 @@
MwBool pointerLocked; MwBool pointerLocked;
MwBool mouseMoved; MwBool mouseMoved;
} }
+ (MilskoCocoa*)newWithParent:(MwLL)parent + (MilskoCocoa*)newWithParent:(MwLL)parent

View file

@ -589,8 +589,8 @@ HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
int y, x, ys, xs; int y, x, ys, xs;
xs = -mask->x + image->x; xs = -mask->x + image->x;
ys = MwCursorDataHeight + mask->y; ys = mask->height + mask->y;
ys = MwCursorDataHeight + image->y - ys; ys = image->height + image->y - ys;
memset(dmask, 0xff, (MwCursorDataHeight / 8) * MwCursorDataHeight); memset(dmask, 0xff, (MwCursorDataHeight / 8) * MwCursorDataHeight);
memset(dimage, 0, (MwCursorDataHeight / 8) * MwCursorDataHeight); memset(dimage, 0, (MwCursorDataHeight / 8) * MwCursorDataHeight);
@ -621,7 +621,7 @@ HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
} }
} }
cursor = CreateCursor(GetModuleHandle(NULL), xs, ys, MwCursorDataHeight, MwCursorDataHeight, dmask, dimage); cursor = CreateCursor(GetModuleHandle(NULL), xs - image->x, ys + (MwCursorDataHeight + image->y), MwCursorDataHeight, MwCursorDataHeight, dmask, dimage);
free(dimage); free(dimage);
free(dmask); free(dmask);

View file

@ -811,8 +811,8 @@ Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
XColor cfg, cbg; XColor cfg, cbg;
xs = -mask->x + image->x; xs = -mask->x + image->x;
ys = MwCursorDataHeight + mask->y; ys = mask->height + mask->y;
ys = MwCursorDataHeight + image->y - ys; ys = image->height + image->y - ys;
memset(cimage->data, 0, cimage->bytes_per_line * cimage->height); memset(cimage->data, 0, cimage->bytes_per_line * cimage->height);
memset(cmask->data, 0, cmask->bytes_per_line * cmask->height); memset(cmask->data, 0, cmask->bytes_per_line * cmask->height);
@ -849,7 +849,7 @@ Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
XPutImage(display, pimage, imagegc, cimage, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight); XPutImage(display, pimage, imagegc, cimage, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
XPutImage(display, pmask, maskgc, cmask, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight); XPutImage(display, pmask, maskgc, cmask, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs, ys); cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs - image->x, ys + (MwCursorDataHeight + image->y));
XFreePixmap(display, pimage); XFreePixmap(display, pimage);
XFreePixmap(display, pmask); XFreePixmap(display, pmask);

View file

@ -70,8 +70,7 @@ void* MwFontLoad(unsigned char* data, unsigned int size) {
} }
void MwFontFree(void* handle) { void MwFontFree(void* handle) {
if(MwFLFontFree) if(MwFLFontFree) MwFLFontFree(handle);
return MwFLFontFree(handle);
} }
static void bitmap_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color) { static void bitmap_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color) {

View file

@ -87,7 +87,8 @@ static void func_handler(MwWidget handle, const char *name, void *out,
self->pixelFormat = self->pixelFormat =
[[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttributes]; [[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttributes];
self->glc = self->glc =
[[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil]; [[NSOpenGLContext alloc] initWithFormat:pixelFormat
shareContext:nil];
[self->glc setView:[w getView]]; [self->glc setView:[w getView]];
self->_win = w; self->_win = w;
return self; return self;

View file

@ -58,8 +58,7 @@ l(
l(""); l("");
c("Requirements"); c("Requirements");
l(""); l("");
l( l(" Milsko requires either");
" Milsko requires either");
l(" * A Windows environment with GDI (so anything NT or 9x)"); l(" * A Windows environment with GDI (so anything NT or 9x)");
l(" * A MacOS environment with Cocoa (10.4 or above supported)"); l(" * A MacOS environment with Cocoa (10.4 or above supported)");
l(" * A Unix-like environment with X11 for runtime."); l(" * A Unix-like environment with X11 for runtime.");