|
From: falcovorbis <fal...@us...> - 2024-06-30 16:48:00
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "A pseudo Operating System for the Dreamcast.".
The branch, master has been updated
via ac4210b0617eecf8e808fe2da217b5ee5f389fb4 (commit)
via 408d021de11f64b46024deeece6c6efd8ec3d40e (commit)
via bc278be5facf916d1bff2e05f6bdbe9092acc078 (commit)
via c956a2f5eeae51a6991ed58a8d74e8cefa544ad9 (commit)
from f3e270e97b3fb71da3c7b2da2d9b6fd9965b6813 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ac4210b0617eecf8e808fe2da217b5ee5f389fb4
Author: Andy Barajas <and...@gm...>
Date: Sun Jun 30 09:47:09 2024 -0700
/sd directories viewed as files (#647)
* All directories read as files even with attr O_DIR set because the size wasnt set to -1
* No need to set time to 0
commit 408d021de11f64b46024deeece6c6efd8ec3d40e
Author: Paul Cercueil <pa...@cr...>
Date: Thu Jun 27 15:19:47 2024 +0200
pthread: Add dummy pthread_atfork() for CMake detection (#611)
Add a stub for pthread_atfork(), whose purpose is only for CMake's
FindThreads to detect threading support in KallistiOS properly.
Signed-off-by: Paul Cercueil <pa...@cr...>
Co-authored-by: Falco Girgis <gyr...@gm...>
commit bc278be5facf916d1bff2e05f6bdbe9092acc078
Author: Donald Haase <qu...@ya...>
Date: Thu Jun 27 09:13:41 2024 -0400
Clean up after the allocation of the sphere texture data and font data. (#630)
Co-authored-by: QuzarDC <qu...@co...>
commit c956a2f5eeae51a6991ed58a8d74e8cefa544ad9
Author: Donald Haase <qu...@ya...>
Date: Thu Jun 27 09:12:31 2024 -0400
Properly free assets at exit. (#633)
Co-authored-by: QuzarDC <qu...@co...>
-----------------------------------------------------------------------
Summary of changes:
addons/libkosfat/fs_fat.c | 4 +++-
examples/dreamcast/parallax/raster_melt/raster_melt.c | 1 +
examples/dreamcast/parallax/serpent_dma/perfmeter.c | 7 +++++++
examples/dreamcast/parallax/serpent_dma/serpent.c | 8 ++++++--
kernel/libc/pthreads/pthread_thd.c | 5 +++++
5 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/addons/libkosfat/fs_fat.c b/addons/libkosfat/fs_fat.c
index 7c25bd41..55732379 100644
--- a/addons/libkosfat/fs_fat.c
+++ b/addons/libkosfat/fs_fat.c
@@ -936,8 +936,10 @@ static dirent_t *fs_fat_readdir(void *h) {
fh[fd].dent.size = dent->size;
fh[fd].dent.time = fat_time_to_stat(dent->mdate, dent->mtime);
- if(dent->attr & FAT_ATTR_DIRECTORY)
+ if(dent->attr & FAT_ATTR_DIRECTORY) {
fh[fd].dent.attr = O_DIR;
+ fh[fd].dent.size = -1;
+ }
/* We're done. Return the static dirent_t. */
mutex_unlock(&fat_mutex);
diff --git a/examples/dreamcast/parallax/raster_melt/raster_melt.c b/examples/dreamcast/parallax/raster_melt/raster_melt.c
index 09f069e0..37e3a82f 100644
--- a/examples/dreamcast/parallax/raster_melt/raster_melt.c
+++ b/examples/dreamcast/parallax/raster_melt/raster_melt.c
@@ -83,6 +83,7 @@ int main(int argc, char **argv) {
y += 2.0f;
}
+ plx_txr_destroy(txr);
return 0;
}
diff --git a/examples/dreamcast/parallax/serpent_dma/perfmeter.c b/examples/dreamcast/parallax/serpent_dma/perfmeter.c
index 8934e7e7..5c67f13a 100644
--- a/examples/dreamcast/parallax/serpent_dma/perfmeter.c
+++ b/examples/dreamcast/parallax/serpent_dma/perfmeter.c
@@ -7,6 +7,7 @@
/* Adapted from FoF/Tryptonite */
#include <kos.h>
+#include <stdlib.h>
#include <plx/font.h>
#include <plx/prim.h>
#include <plx/context.h>
@@ -14,9 +15,15 @@
plx_font_t * font;
plx_fcxt_t * fcxt;
+void pm_shutdown(void) {
+ plx_fcxt_destroy(fcxt);
+ plx_font_destroy(font);
+}
+
void pm_init(void) {
font = plx_font_load("/rd/font.txf");
fcxt = plx_fcxt_create(font, PVR_LIST_TR_POLY);
+ atexit(pm_shutdown);
}
void pm_drawbar(float pct, float posx, float posy, float posz,
diff --git a/examples/dreamcast/parallax/serpent_dma/serpent.c b/examples/dreamcast/parallax/serpent_dma/serpent.c
index 8f5cdcfe..11c3924c 100644
--- a/examples/dreamcast/parallax/serpent_dma/serpent.c
+++ b/examples/dreamcast/parallax/serpent_dma/serpent.c
@@ -44,6 +44,9 @@ typedef struct {
pvr_vertex_t *data;
} sphere_t;
+static sphere_t big_sphere = { 1.2f, 20, 20, NULL };
+static sphere_t small_sphere = { 0.8f, 20, 20, NULL };
+
static void sphere(sphere_t *s) { /* {{{ */
int i, j;
float pitch, pitch2;
@@ -153,8 +156,6 @@ static float r = 0;
static void sphere_frame(void) {
int i;
//uint64 start;
- static sphere_t big_sphere = { 1.2f, 20, 20, NULL };
- static sphere_t small_sphere = { 0.8f, 20, 20, NULL };
if(!big_sphere.data)
sphere(&big_sphere);
@@ -294,6 +295,9 @@ int main(int argc, char **argv) {
dbglog(DBG_DEBUG, "3D Stats: %u vblanks, frame rate ~%f fps, max vertex used %u bytes\n",
stats.vbl_count, stats.frame_rate, stats.vtx_buffer_used_max);
+ free(big_sphere.data);
+ free(small_sphere.data);
+
return 0;
}
diff --git a/kernel/libc/pthreads/pthread_thd.c b/kernel/libc/pthreads/pthread_thd.c
index ff65ecb9..9217c9e8 100644
--- a/kernel/libc/pthreads/pthread_thd.c
+++ b/kernel/libc/pthreads/pthread_thd.c
@@ -70,3 +70,8 @@ pthread_t pthread_self(void) {
int pthread_equal(pthread_t t1, pthread_t t2) {
return t1 == t2;
}
+
+int pthread_atfork(void (*)(void), void (*)(void), void (*)(void))
+{
+ return 0;
+}
hooks/post-receive
--
A pseudo Operating System for the Dreamcast.
|