new wallpaper

This commit is contained in:
boreddevnl 2026-03-01 17:29:43 +01:00
parent 5cf552fd14
commit 42bcc1ad7c
10 changed files with 12 additions and 13 deletions

BIN
.DS_Store vendored

Binary file not shown.

View file

@ -1,15 +1,14 @@
# BoredOS
BoredOS has now exited Beta stage and is "stable enough" to be put out as a "stable" product.
<div align="center">
<pre style="text-align: left; display: inline-block; font-weight: bold;">
<div style="font-family: monospace; white-space: pre; text-align: left; display: inline-block; font-weight: bold;">
<span style="color:#B589D6">====================== </span><span style="color:#FFFFFF">__ ____ ____ </span>
<span style="color:#B589D6">===================== </span><span style="color:#FFFFFF">/ /_ / __ \/ ___\</span>
<span style="color:#569CD6">==================== </span><span style="color:#FFFFFF">/ __ \/ / / /\___ \</span>
<span style="color:#569CD6">=================== </span><span style="color:#FFFFFF">/ /_/ / /_/ /____/ /</span>
<span style="color:#4EC9B0">================== </span><span style="color:#FFFFFF">/_.___/\____//_____/ </span>
<span style="color:#4EC9B0">================= </span>
</pre>
</div>
</div>
BoredOS is a simple x86_64 hobbyist operating system.
It features a DE (and WM), a FAT32 filesystem, customizable UI and much much more!

Binary file not shown.

BIN
src/.DS_Store vendored

Binary file not shown.

BIN
src/kernel/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

View file

@ -3,6 +3,7 @@
// This header needs to maintain in any file it is present in, as per the GPL license terms.
#include "libc/syscall.h"
#include "libc/libui.h"
#include "libc/stdlib.h"
#include "nanojpeg.h"
#include <stddef.h>
#include <stdint.h>
@ -145,8 +146,8 @@ static void load_wallpapers(void) {
if (fd >= 0) {
int size = sys_seek(fd, 0, 2); // SEEK_END
sys_seek(fd, 0, 0); // SEEK_SET
if (size > 0 && size < 1024 * 1024) {
unsigned char *buf = (unsigned char *)sys_sbrk(size);
if (size > 0 && size < 8 * 1024 * 1024) {
unsigned char *buf = (unsigned char *)malloc(size);
if (buf) {
sys_read(fd, buf, size);
njInit();
@ -155,7 +156,7 @@ static void load_wallpapers(void) {
wp->valid = 1;
}
njDone();
sys_sbrk(-size); // Release memory
free(buf); // Release memory
}
}
sys_close(fd);

View file

@ -574,7 +574,7 @@ static uint32_t* thumb_cache_decode(const char *path) {
if (!fh) return NULL;
uint32_t file_size = fh->size;
if (file_size == 0 || file_size > 2 * 1024 * 1024) {
if (file_size == 0 || file_size > 8 * 1024 * 1024) {
fat32_close(fh);
return NULL;
}
@ -1161,7 +1161,9 @@ void wm_paint(void) {
if (str_ends_with(icon->name, ".elf")) draw_elf_icon(icon->x, icon->y, icon->name);
else if (str_ends_with(icon->name, ".pnt")) draw_paint_icon(icon->x, icon->y, icon->name);
else if (str_ends_with(icon->name, ".jpg") || str_ends_with(icon->name, ".JPG")) {
draw_image_icon(icon->x, icon->y, icon->name);
char full_path[128] = "/Desktop/";
int p=9; int n=0; while(icon->name[n] && p < 127) full_path[p++] = icon->name[n++]; full_path[p]=0;
draw_image_icon(icon->x, icon->y, full_path);
draw_icon_label(icon->x, icon->y, icon->name);
}
else draw_document_icon(icon->x, icon->y, icon->name);
@ -2367,15 +2369,12 @@ void wm_process_deferred_thumbs(void) {
}
path[i] = 0;
serial_write("[WM] Processing deferred thumb: ");
serial_write(path);
serial_write("\n");
// Pop from queue
thumb_queue_head = (thumb_queue_head + 1) % THUMB_QUEUE_SIZE;
// Process (this takes time but it's okay because we are in the main loop with IRQs enabled)
thumb_cache_decode(path);
force_redraw = true;
}
void wm_init(void) {