Files
eden/externals/ps4sup/stub.cpp
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
758 B
C++
Raw Normal View History

2026-01-22 19:16:13 +00:00
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
2026-01-22 19:13:56 +00:00
#include <stdio.h>
#define STUB_WEAK(name) \
extern "C" void name() { \
printf("called " #name); \
asm volatile("ud2"); \
}
2026-03-08 23:07:56 +00:00
extern "C" int __pthread_cxa_finalize();
extern "C" void __cxa_thread_atexit_impl() {
//printf("__cxa_thread_atexit_impl called!\n");
//__pthread_cxa_finalize();
}
2026-01-22 19:13:56 +00:00
STUB_WEAK(__assert)
STUB_WEAK(ZSTD_trace_compress_begin)
STUB_WEAK(ZSTD_trace_compress_end)
STUB_WEAK(ZSTD_trace_decompress_begin)
STUB_WEAK(ZSTD_trace_decompress_end)
2026-02-26 01:07:06 +00:00
2026-01-22 19:13:56 +00:00
FILE* __stderrp = stdout;
2026-02-26 01:07:06 +00:00
FILE* __stdinp = stdin;
2026-01-22 19:13:56 +00:00
#undef STUB_WEAK
2026-01-24 06:48:07 +00:00
// THIS MAKES STD::COUT AND SUCH WORK :)
#include <iostream>
std::ios_base::Init init;