Skip to content

Commit

Permalink
modules/SceError: Implement GetExternalString.
Browse files Browse the repository at this point in the history
  • Loading branch information
Macdu authored and Zangetsu38 committed Nov 26, 2024
1 parent f028514 commit 6474f25
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
10 changes: 7 additions & 3 deletions vita3k/modules/SceDriverUser/SceErrorUser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <module/module.h>
#include <../SceError/SceError.h>

EXPORT(int, sceErrorGetExternalString) {
return UNIMPLEMENTED();
#include <util/tracy.h>
TRACY_MODULE_NAME(SceErrorUser);

EXPORT(SceInt32, sceErrorGetExternalString, char *result, int err) {
TRACY_FUNC(sceErrorGetExternalString, result, err);
return CALL_EXPORT(_sceErrorGetExternalString, result, err);
}

EXPORT(int, sceErrorHistoryClearError) {
Expand Down
11 changes: 8 additions & 3 deletions vita3k/modules/SceError/SceError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <module/module.h>
#include "SceError.h"

EXPORT(int, _sceErrorGetExternalString) {
return UNIMPLEMENTED();
#include <util/tracy.h>
TRACY_MODULE_NAME(SceError);

EXPORT(SceInt32, _sceErrorGetExternalString, char *result, int err) {
TRACY_FUNC(_sceErrorGetExternalString, result, err);
sprintf(result, "0x%08X", err);
return 0;
}

EXPORT(int, _sceErrorHistoryClearError) {
Expand Down
22 changes: 22 additions & 0 deletions vita3k/modules/SceError/SceError.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Vita3K emulator project
// Copyright (C) 2024 Vita3K team
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#pragma once

#include <module/module.h>

DECL_EXPORT(SceInt32, _sceErrorGetExternalString, char *result, int err);

0 comments on commit 6474f25

Please sign in to comment.