Symbian: Fix not compiling, fix crashing from using Waitable, drbug printing

This commit is contained in:
UnknownShadow200 2025-05-23 07:38:28 +10:00
parent ee232ad635
commit 396d18ff3b
3 changed files with 17 additions and 13 deletions

View File

@ -1,5 +1,11 @@
name: Build latest (Android2)
on: [push]
# trigger via either push to selected branches or on manual run
on:
push:
branches:
- main
- master
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-android
@ -7,7 +13,6 @@ concurrency:
jobs:
build:
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
container:
image: ghcr.io/saschpe/android-ndk:34-jdk17.0.8_7-ndk25.2.9519653-cmake3.22.1

View File

@ -554,7 +554,6 @@ typedef cc_uint8 cc_bool;
#elif defined __SYMBIAN32__
#define CC_BUILD_SYMBIAN
#define CC_BUILD_MOBILE
#define CC_BUILD_POSIX
#define CC_BUILD_GLES
#define CC_BUILD_EGL
#define CC_BUILD_MAXSTACK (16 * 1024)

View File

@ -40,6 +40,7 @@ extern "C" {
#include <stdapis/netdb.h>
}
#include <e32base.h>
#include <e32debug.h>
#include <hal.h>
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
@ -86,10 +87,15 @@ void Mem_Free(void* mem) {
*------------------------------------------------------Logging/Time-------------------------------------------------------*
*#########################################################################################################################*/
void Platform_Log(const char* msg, int len) {
int ret;
/* Avoid "ignoring return value of 'write' declared with attribute 'warn_unused_result'" warning */
ret = write(STDOUT_FILENO, msg, len);
ret = write(STDOUT_FILENO, "\n", 1);
TPtrC8 ptr((const TUint8*)msg, len);
cc_string str;
str = String_Init(msg, len, len);
Logger_Log(&str);
str = String_FromReadonly("\r\n");
Logger_Log(&str);
RDebug::RawPrint(ptr);
}
TimeMS DateTime_CurrentUTC(void) {
@ -372,23 +378,17 @@ void Waitable_Free(void* handle) {
void Waitable_Signal(void* handle) {
RSemaphore* sem = (RSemaphore*)handle;
sem->Signal();
delete sem;
}
void Waitable_Wait(void* handle) {
RSemaphore* sem = (RSemaphore*)handle;
sem->Wait();
delete sem;
}
void Waitable_WaitFor(void* handle, cc_uint32 milliseconds) {
RSemaphore* sem = (RSemaphore*)handle;
sem->Wait(milliseconds * 1000);
delete sem;
}