Skip to content

Commit

Permalink
Merge pull request #9 from silbinarywolf/feature/update-to-zig-0.13-a…
Browse files Browse the repository at this point in the history
…nd-more

Feature/update to zig 0.13 and more
  • Loading branch information
IridescentRose authored May 28, 2024
2 parents 3715997 + b6c21af commit 0177c4d
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 90 deletions.
44 changes: 22 additions & 22 deletions build-psp.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ pub const PSPBuildInfo = struct {
//Title
title: []const u8,
//Optional customizations
icon0: []const u8 = "NULL",
icon1: []const u8 = "NULL",
pic0: []const u8 = "NULL",
pic1: []const u8 = "NULL",
snd0: []const u8 = "NULL",
icon0: []const u8 = &[0]u8{},
icon1: []const u8 = &[0]u8{},
pic0: []const u8 = &[0]u8{},
pic1: []const u8 = &[0]u8{},
snd0: []const u8 = &[0]u8{},
};

const append: []const u8 = switch (builtin.os.tag) {
Expand Down Expand Up @@ -43,33 +43,34 @@ pub fn build_psp(b: *std.Build, comptime build_info: PSPBuildInfo) !void {
//Build from your main file!
const exe = b.addExecutable(.{
.name = "main",
.root_source_file = .{ .path = build_info.src_file },
.root_source_file = b.path(build_info.src_file),
.target = target,
.optimize = optimize,
.strip = false, // disable as cannot be used with "link_emit_relocs = true"
// .single_threaded = true,
});

exe.setLinkerScriptPath(.{ .path = build_info.path_to_sdk ++ "tools/linkfile.ld" });
exe.setLinkerScriptPath(b.path(build_info.path_to_sdk ++ "tools/linkfile.ld"));

exe.link_eh_frame_hdr = true;
exe.link_emit_relocs = true;
// exe.strip = true;
// exe.single_threaded = true;
// exe.install();
// b.installArtifact(exe);

// exe.setOutputDir("zig-cache/");

//Post-build actions
const hostTarget = b.standardTargetOptions(.{});
const hostOptimize = b.standardOptimizeOption(.{});
const prx = b.addExecutable(.{
.name = "prxgen",
.root_source_file = .{ .path = build_info.path_to_sdk ++ "tools/prxgen/stub.zig" },
.root_source_file = b.path(build_info.path_to_sdk ++ "tools/prxgen/stub.zig"),
.link_libc = true,
.target = hostTarget,
.optimize = .ReleaseFast,
});
prx.addCSourceFile(.{
.file = .{ .path = build_info.path_to_sdk ++ "tools/prxgen/psp-prxgen.c" },
.file = b.path(build_info.path_to_sdk ++ "tools/prxgen/psp-prxgen.c"),
.flags = &[_][]const u8{
"-std=c99",
"-Wno-address-of-packed-member",
Expand All @@ -91,9 +92,9 @@ pub fn build_psp(b: *std.Build, comptime build_info: PSPBuildInfo) !void {
//Build SFO
const sfo = b.addExecutable(.{
.name = "sfotool",
.root_source_file = .{ .path = build_info.path_to_sdk ++ "tools/sfo/src/main.zig" },
.root_source_file = b.path(build_info.path_to_sdk ++ "tools/sfo/src/main.zig"),
.target = hostTarget,
.optimize = optimize,
.optimize = hostOptimize,
});
// sfo.setOutputDir(build_info.path_to_sdk ++ "tools/bin");
b.installArtifact(sfo);
Expand All @@ -109,24 +110,23 @@ pub fn build_psp(b: *std.Build, comptime build_info: PSPBuildInfo) !void {
//Build PBP
const PBP = b.addExecutable(.{
.name = "pbptool",
.root_source_file = .{ .path = build_info.path_to_sdk ++ "tools/pbp/src/main.zig" },
.root_source_file = b.path(build_info.path_to_sdk ++ "tools/pbp/src/main.zig"),
.target = hostTarget,
.optimize = .ReleaseFast,
.optimize = hostOptimize,
});
// PBP.setOutputDir(build_info.path_to_sdk ++ "tools/bin");

//Pack the PBP executable
const pack_pbp = b.addRunArtifact(PBP);
pack_pbp.addArg("pack");
const eboot_file = pack_pbp.addOutputFileArg("EBOOT.PBP");
pack_pbp.addFileArg(sfo_file);
pack_pbp.addFileArg(.{ .path = build_info.icon0 });
pack_pbp.addFileArg(.{ .path = build_info.icon1 });
pack_pbp.addFileArg(.{ .path = build_info.pic0 });
pack_pbp.addFileArg(.{ .path = build_info.pic1 });
pack_pbp.addFileArg(.{ .path = build_info.snd0 });
if (build_info.icon0.len > 0) pack_pbp.addFileArg(b.path(build_info.icon0)) else pack_pbp.addArg("NULL");
if (build_info.icon1.len > 0) pack_pbp.addFileArg(b.path(build_info.icon1)) else pack_pbp.addArg("NULL");
if (build_info.pic0.len > 0) pack_pbp.addFileArg(b.path(build_info.pic0)) else pack_pbp.addArg("NULL");
if (build_info.pic1.len > 0) pack_pbp.addFileArg(b.path(build_info.pic1)) else pack_pbp.addArg("NULL");
if (build_info.snd0.len > 0) pack_pbp.addFileArg(b.path(build_info.snd0)) else pack_pbp.addArg("NULL");
pack_pbp.addFileArg(prx_file);
pack_pbp.addArg("NULL");
pack_pbp.addArg("NULL"); //DATA.PSAR not necessary.

const install_file = b.addInstallBinFile(eboot_file, "EBOOT.PBP");
b.getInstallStep().dependOn(&install_file.step);
Expand Down
2 changes: 1 addition & 1 deletion src/psp/os/system.zig
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ pub fn lseek(fd: fd_t, off: i64, whence: c_int) c_int {

switch (fdman.__psp_descriptormap[fd].?.ftype) {
.File => {
std.debug.warn("{}", .{whence});
std.log.warn("{}", .{whence});
//If you need to seek past 4GB, you have a real problem.
return pspErrToErrno(@as(u32, @bitCast(pspiofilemgr.sceIoLseek32(fdman.__psp_descriptormap[fd].?.sce_descriptor, @as(c_int, @truncate(off)), whence))));
},
Expand Down
2 changes: 1 addition & 1 deletion src/psp/sdk/cos.zig
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn cos_(comptime T: type, x_: T) T {
}

var sign = false;
x = math.fabs(x);
x = @abs(x);

var y = math.floor(x * m4pi);
var j = @as(I, @intFromFloat(y));
Expand Down
2 changes: 1 addition & 1 deletion src/psp/sdk/pspge.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub const SceGeStack = extern struct {
stack: [8]c_uint,
};

pub const PspGeCallback = ?fn (c_int, ?*anyopaque) callconv(.C) void;
pub const PspGeCallback = ?*const fn (c_int, ?*anyopaque) callconv(.C) void;
pub const PspGeCallbackData = extern struct {
signal_func: PspGeCallback,
signal_arg: ?*anyopaque,
Expand Down
34 changes: 17 additions & 17 deletions src/psp/sdk/pspguimpl.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test {
}

//Internals
pub const GuCallback = ?fn (c_int) callconv(.C) void;
pub const GuCallback = ?*const fn (c_int) callconv(.C) void;

const GuSettings = struct {
sig: GuCallback,
Expand Down Expand Up @@ -1044,7 +1044,7 @@ pub fn sceGuSetAllStatus(status: c_int) void {
}
}

pub fn sceGuSetCallback(signal: c_int, callback: ?fn (c_int) callconv(.C) void) GuCallback {
pub fn sceGuSetCallback(signal: c_int, callback: ?*const fn (c_int) callconv(.C) void) GuCallback {
var old_callback: GuCallback = undefined;

switch (@as(pspgutypes.GuCallbackId, @enumFromInt(signal))) {
Expand All @@ -1062,15 +1062,15 @@ pub fn sceGuSetCallback(signal: c_int, callback: ?fn (c_int) callconv(.C) void)
return old_callback;
}

pub fn sceGuSetDither(matrix: *const pspgutypes.ScePspIMatrix4) void {
pub fn sceGuSetDither(matrix: *const psptypes.ScePspIMatrix4) void {
@setRuntimeSafety(false);
sendCommandi(226, (matrix.x.x & 0x0f) | ((matrix.x.y & 0x0f) << 4) | ((matrix.x.z & 0x0f) << 8) | ((matrix.x.w & 0x0f) << 12));
sendCommandi(227, (matrix.y.x & 0x0f) | ((matrix.y.y & 0x0f) << 4) | ((matrix.y.z & 0x0f) << 8) | ((matrix.y.w & 0x0f) << 12));
sendCommandi(228, (matrix.z.x & 0x0f) | ((matrix.z.y & 0x0f) << 4) | ((matrix.z.z & 0x0f) << 8) | ((matrix.z.w & 0x0f) << 12));
sendCommandi(229, (matrix.w.x & 0x0f) | ((matrix.w.y & 0x0f) << 4) | ((matrix.w.z & 0x0f) << 8) | ((matrix.w.w & 0x0f) << 12));
}

pub fn sceGuSetMatrix(typec: c_int, matrix: [*c]pspgutypes.ScePspFMatrix4) void {
pub fn sceGuSetMatrix(typec: c_int, matrix: [*c]psptypes.ScePspFMatrix4) void {
@setRuntimeSafety(false);

const fmatrix: [*]f32 = @as([*]f32, @ptrCast(matrix));
Expand Down Expand Up @@ -1184,7 +1184,7 @@ pub fn sceGuSwapBuffers() ?*anyopaque {
}

if (gu_display_on != 0) {
_ = pspge.sceDisplaySetFrameBuf(@as(*anyopaque, @ptrFromInt(@intFromPtr(ge_edram_address) + @intFromPtr(gu_draw_buffer.disp_buffer))), gu_draw_buffer.frame_width, gu_draw_buffer.pixel_size, gu_settings.swapBuffersBehaviour);
_ = display.sceDisplaySetFrameBuf(@as(*anyopaque, @ptrFromInt(@intFromPtr(ge_edram_address) + @intFromPtr(gu_draw_buffer.disp_buffer))), gu_draw_buffer.frame_width, gu_draw_buffer.pixel_size, gu_settings.swapBuffersBehaviour);
}

gu_current_frame ^= 1;
Expand Down Expand Up @@ -1383,7 +1383,7 @@ const ge_init_list = [_]c_uint{

pub fn sceGuInit() void {
@setRuntimeSafety(false);
var callback: pspgutypes.PspGeCallbackData = undefined;
var callback: pspge.PspGeCallbackData = undefined;
callback.signal_func = callbackSig;
callback.signal_arg = &gu_settings;
callback.finish_func = callbackFin;
Expand All @@ -1398,7 +1398,7 @@ pub fn sceGuInit() void {
ge_list_executed[0] = pspge.sceGeListEnQueue((@as(*anyopaque, @ptrFromInt(@intFromPtr(&ge_init_list) & 0x1fffffff))), null, gu_settings.ge_callback_id, 0);

resetValues();
gu_settings.kernel_event_flag = pspge.sceKernelCreateEventFlag("SceGuSignal", 512, 3, 0);
gu_settings.kernel_event_flag = pspthreadman.sceKernelCreateEventFlag("SceGuSignal", 512, 3, 0);

_ = pspge.sceGeListSync(ge_list_executed[0], 0);
}
Expand Down Expand Up @@ -1429,12 +1429,12 @@ pub fn sceGuStart(cont: pspgutypes.GuContextType, list: ?*anyopaque) void {
3, -1, 2, -2,
};

display.sceGuSetDither(@as(*pspgutypes.ScePspIMatrix4, @ptrCast(&dither_matrix)));
display.sceGuPatchDivide(16, 16);
display.sceGuColorMaterial(@intFromEnum(pspgutypes.GuLightBitFlags.Ambient) | @intFromEnum(pspgutypes.GuLightBitFlags.Diffuse) | @intFromEnum(pspgutypes.GuLightBitFlags.Specular));
sceGuSetDither(@as(*psptypes.ScePspIMatrix4, @ptrCast(&dither_matrix)));
sceGuPatchDivide(16, 16);
sceGuColorMaterial(@intFromEnum(pspgutypes.GuLightBitFlags.Ambient) | @intFromEnum(pspgutypes.GuLightBitFlags.Diffuse) | @intFromEnum(pspgutypes.GuLightBitFlags.Specular));

display.sceGuSpecular(1.0);
display.sceGuTexScale(1.0, 1.0);
sceGuSpecular(1.0);
sceGuTexScale(1.0, 1.0);
gu_init = 1;
}

Expand Down Expand Up @@ -1472,7 +1472,7 @@ pub fn sceGuClear(flags: c_int) void {
}

const count: i32 = @divTrunc(gu_draw_buffer.width + 63, 64) * 2;
const vertices: [*]Vertex = @as([*]Vertex, @ptrCast(sceGuGetMemory(@as(c_uint, @intCast(count)) * @sizeOf(Vertex))));
const vertices: [*]Vertex = @ptrCast(@alignCast(sceGuGetMemory(@as(c_uint, @intCast(count)) * @sizeOf(Vertex))));

var i: usize = 0;
var curr: [*]Vertex = vertices;
Expand All @@ -1494,9 +1494,9 @@ pub fn sceGuClear(flags: c_int) void {
const VertexTypeFlags = pspgutypes.VertexTypeFlags;
const GuPrimitive = pspgutypes.GuPrimitive;

display.sendCommandi(211, ((flags & (@intFromEnum(ClearBitFlags.ColorBuffer) | @intFromEnum(ClearBitFlags.StencilBuffer) | @intFromEnum(ClearBitFlags.DepthBuffer))) << 8) | 0x01);
display.sceGuDrawArray(GuPrimitive.Sprites, @intFromEnum(VertexTypeFlags.Color8888) | @intFromEnum(VertexTypeFlags.Vertex16Bit) | @intFromEnum(VertexTypeFlags.Transform2D), @as(c_int, @intCast(count)), null, vertices);
display.sendCommandi(211, 0);
sendCommandi(211, ((flags & (@intFromEnum(ClearBitFlags.ColorBuffer) | @intFromEnum(ClearBitFlags.StencilBuffer) | @intFromEnum(ClearBitFlags.DepthBuffer))) << 8) | 0x01);
sceGuDrawArray(GuPrimitive.Sprites, @intFromEnum(VertexTypeFlags.Color8888) | @intFromEnum(VertexTypeFlags.Vertex16Bit) | @intFromEnum(VertexTypeFlags.Transform2D), @as(c_int, @intCast(count)), null, vertices);
sendCommandi(211, 0);
}

pub fn sceGuGetMemory(size: c_uint) *anyopaque {
Expand All @@ -1519,7 +1519,7 @@ pub fn sceGuGetMemory(size: c_uint) *anyopaque {
gu_list.?.current = new_ptr;

if (gu_curr_context == 0) {
_ = display.sceGeListUpdateStallAddr(ge_list_executed[0], new_ptr);
_ = pspge.sceGeListUpdateStallAddr(ge_list_executed[0], new_ptr);
}
return @as(*anyopaque, @ptrFromInt(@intFromPtr(orig_ptr + 2)));
}
10 changes: 5 additions & 5 deletions src/psp/sdk/pspgumimpl.zig
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ var gum_stack_depth: [4][*]psptypes.ScePspFMatrix4 = [_][*]psptypes.ScePspFMatri
var gum_matrix_stack: [4][32]psptypes.ScePspFMatrix4 = undefined;

pub fn sceGumDrawArray(prim: pspgu.GuPrimitive, vtype: c_int, count: c_int, indices: ?*const anyopaque, vertices: ?*const anyopaque) void {
pspgu.sceGumUpdateMatrix();
sceGumUpdateMatrix();
pspgu.sceGuDrawArray(prim, vtype, count, indices, vertices);
}

pub fn sceGumDrawArrayN(prim: c_int, vtype: c_int, count: c_int, a3: c_int, indices: ?*const anyopaque, vertices: ?*const anyopaque) void {
pspgu.sceGumUpdateMatrix();
sceGumUpdateMatrix();
pspgu.sceGuDrawArrayN(prim, vtype, count, a3, indices, vertices);
}

pub fn sceGumDrawBezier(vtype: c_int, ucount: c_int, vcount: c_int, indices: ?*const anyopaque, vertices: ?*const anyopaque) void {
pspgu.sceGumUpdateMatrix();
sceGumUpdateMatrix();
pspgu.sceGuDrawBezier(vtype, ucount, vcount, indices, vertices);
}

pub fn sceGumDrawSpline(vtype: c_int, ucount: c_int, vcount: c_int, uedge: c_int, vedge: c_int, indices: ?*const anyopaque, vertices: ?*const anyopaque) void {
pspgu.sceGumUpdateMatrix();
sceGumUpdateMatrix();
pspgu.sceGuDrawSpline(vtype, ucount, vcount, uedge, vedge, indices, vertices);
}

Expand Down Expand Up @@ -335,7 +335,7 @@ pub fn sceGumFullInverse() void {
d3 = gum_current_matrix.y.x * gum_current_matrix.z.y * gum_current_matrix.w.z + gum_current_matrix.y.y * gum_current_matrix.z.z * gum_current_matrix.w.x + gum_current_matrix.y.z * gum_current_matrix.z.x * gum_current_matrix.w.y - gum_current_matrix.w.x * gum_current_matrix.z.y * gum_current_matrix.y.z - gum_current_matrix.w.y * gum_current_matrix.z.z * gum_current_matrix.y.x - gum_current_matrix.w.z * gum_current_matrix.z.x * gum_current_matrix.y.y;
d = gum_current_matrix.x.x * d0 - gum_current_matrix.x.y * d1 + gum_current_matrix.x.z * d2 - gum_current_matrix.x.w * d3;

if (std.math.fabs(d) < 0.000001) {
if (@abs(d) < 0.000001) {
_ = memset(@as([*]u8, @ptrCast(gum_current_matrix)), 0, @sizeOf(psptypes.ScePspFMatrix4));

var i: usize = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/psp/sdk/psphttp.zig
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const enum_unnamed_9 = enum(c_int) {
pub const PspHttpAddHeaderMode = enum_unnamed_9;
pub const PspHttpMallocFunction = ?*const fn (SceSize) callconv(.C) ?*anyopaque;
pub const PspHttpReallocFunction = ?*const fn (?*anyopaque, SceSize) callconv(.C) ?*anyopaque;
pub const PspHttpFreeFunction = ?fn (?*anyopaque) callconv(.C) void;
pub const PspHttpPasswordCB = ?fn (c_int, PspHttpAuthType, [*c]const u8, [*c]u8, [*c]u8, SceBool, [*c][*c]u8, [*c]SceSize, [*c]SceBool) callconv(.C) c_int;
pub const PspHttpFreeFunction = ?*const fn (?*anyopaque) callconv(.C) void;
pub const PspHttpPasswordCB = ?*const fn (c_int, PspHttpAuthType, [*c]const u8, [*c]u8, [*c]u8, SceBool, [*c][*c]u8, [*c]SceSize, [*c]SceBool) callconv(.C) c_int;
pub extern fn sceHttpInit(unknown1: c_uint) c_int;
pub extern fn sceHttpEnd() c_int;
pub extern fn sceHttpCreateTemplate(agent: [*c]u8, unknown1: c_int, unknown2: c_int) c_int;
Expand Down
44 changes: 22 additions & 22 deletions src/psp/sdk/pspiofilemgr.zig
Original file line number Diff line number Diff line change
Expand Up @@ -134,28 +134,28 @@ pub const struct_PspIoDrvFileArg = extern struct {
};
pub const PspIoDrvFileArg = struct_PspIoDrvFileArg;
pub const struct_PspIoDrvFuncs = extern struct {
IoInit: ?fn ([*c]PspIoDrvArg) callconv(.C) c_int,
IoExit: ?fn ([*c]PspIoDrvArg) callconv(.C) c_int,
IoOpen: ?fn ([*c]PspIoDrvFileArg, [*c]u8, c_int, SceMode) callconv(.C) c_int,
IoClose: ?fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoRead: ?fn ([*c]PspIoDrvFileArg, [*c]u8, c_int) callconv(.C) c_int,
IoWrite: ?fn ([*c]PspIoDrvFileArg, [*c]const u8, c_int) callconv(.C) c_int,
IoLseek: ?fn ([*c]PspIoDrvFileArg, SceOff, c_int) callconv(.C) SceOff,
IoIoctl: ?fn ([*c]PspIoDrvFileArg, c_uint, ?*anyopaque, c_int, ?*anyopaque, c_int) callconv(.C) c_int,
IoRemove: ?fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoMkdir: ?fn ([*c]PspIoDrvFileArg, [*c]const u8, SceMode) callconv(.C) c_int,
IoRmdir: ?fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoDopen: ?fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoDclose: ?fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoDread: ?fn ([*c]PspIoDrvFileArg, [*c]SceIoDirent) callconv(.C) c_int,
IoGetstat: ?fn ([*c]PspIoDrvFileArg, [*c]const u8, [*c]SceIoStat) callconv(.C) c_int,
IoChstat: ?fn ([*c]PspIoDrvFileArg, [*c]const u8, [*c]SceIoStat, c_int) callconv(.C) c_int,
IoRename: ?fn ([*c]PspIoDrvFileArg, [*c]const u8, [*c]const u8) callconv(.C) c_int,
IoChdir: ?fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoMount: ?fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoUmount: ?fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoDevctl: ?fn ([*c]PspIoDrvFileArg, [*c]const u8, c_uint, ?*anyopaque, c_int, ?*anyopaque, c_int) callconv(.C) c_int,
IoUnk21: ?fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoInit: ?*const fn ([*c]PspIoDrvArg) callconv(.C) c_int,
IoExit: ?*const fn ([*c]PspIoDrvArg) callconv(.C) c_int,
IoOpen: ?*const fn ([*c]PspIoDrvFileArg, [*c]u8, c_int, SceMode) callconv(.C) c_int,
IoClose: ?*const fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoRead: ?*const fn ([*c]PspIoDrvFileArg, [*c]u8, c_int) callconv(.C) c_int,
IoWrite: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8, c_int) callconv(.C) c_int,
IoLseek: ?*const fn ([*c]PspIoDrvFileArg, SceOff, c_int) callconv(.C) SceOff,
IoIoctl: ?*const fn ([*c]PspIoDrvFileArg, c_uint, ?*anyopaque, c_int, ?*anyopaque, c_int) callconv(.C) c_int,
IoRemove: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoMkdir: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8, SceMode) callconv(.C) c_int,
IoRmdir: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoDopen: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoDclose: ?*const fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoDread: ?*const fn ([*c]PspIoDrvFileArg, [*c]SceIoDirent) callconv(.C) c_int,
IoGetstat: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8, [*c]SceIoStat) callconv(.C) c_int,
IoChstat: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8, [*c]SceIoStat, c_int) callconv(.C) c_int,
IoRename: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8, [*c]const u8) callconv(.C) c_int,
IoChdir: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8) callconv(.C) c_int,
IoMount: ?*const fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoUmount: ?*const fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
IoDevctl: ?*const fn ([*c]PspIoDrvFileArg, [*c]const u8, c_uint, ?*anyopaque, c_int, ?*anyopaque, c_int) callconv(.C) c_int,
IoUnk21: ?*const fn ([*c]PspIoDrvFileArg) callconv(.C) c_int,
};
pub const PspIoDrvFuncs = struct_PspIoDrvFuncs;
pub const PspIoDrv = struct_PspIoDrv;
Expand Down
2 changes: 1 addition & 1 deletion src/psp/sdk/pspmpeg.zig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub const SceMpegYCrCbBuffer = extern struct {

pub const SceMpeg = ScePVoid;
pub const SceMpegStream = SceVoid;
pub const sceMpegRingbufferCB = ?fn (ScePVoid, SceInt32, ScePVoid) callconv(.C) SceInt32;
pub const sceMpegRingbufferCB = ?*const fn (ScePVoid, SceInt32, ScePVoid) callconv(.C) SceInt32;

pub const SceMpegRingbuffer = extern struct {
iPackets: SceInt32,
Expand Down
Loading

0 comments on commit 0177c4d

Please sign in to comment.