mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Symbian: Fix not compiling, fix crashing from using Waitable, drbug printing
This commit is contained in:
parent
ee232ad635
commit
396d18ff3b
9
.github/workflows/build_android.yml
vendored
9
.github/workflows/build_android.yml
vendored
@ -1,5 +1,11 @@
|
|||||||
name: Build latest (Android2)
|
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:
|
concurrency:
|
||||||
group: ${{ github.ref }}-android
|
group: ${{ github.ref }}-android
|
||||||
@ -7,7 +13,6 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.ref_name == github.event.repository.default_branch
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/saschpe/android-ndk:34-jdk17.0.8_7-ndk25.2.9519653-cmake3.22.1
|
image: ghcr.io/saschpe/android-ndk:34-jdk17.0.8_7-ndk25.2.9519653-cmake3.22.1
|
||||||
|
@ -554,7 +554,6 @@ typedef cc_uint8 cc_bool;
|
|||||||
#elif defined __SYMBIAN32__
|
#elif defined __SYMBIAN32__
|
||||||
#define CC_BUILD_SYMBIAN
|
#define CC_BUILD_SYMBIAN
|
||||||
#define CC_BUILD_MOBILE
|
#define CC_BUILD_MOBILE
|
||||||
#define CC_BUILD_POSIX
|
|
||||||
#define CC_BUILD_GLES
|
#define CC_BUILD_GLES
|
||||||
#define CC_BUILD_EGL
|
#define CC_BUILD_EGL
|
||||||
#define CC_BUILD_MAXSTACK (16 * 1024)
|
#define CC_BUILD_MAXSTACK (16 * 1024)
|
||||||
|
@ -40,6 +40,7 @@ extern "C" {
|
|||||||
#include <stdapis/netdb.h>
|
#include <stdapis/netdb.h>
|
||||||
}
|
}
|
||||||
#include <e32base.h>
|
#include <e32base.h>
|
||||||
|
#include <e32debug.h>
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
|
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
|
||||||
@ -86,10 +87,15 @@ void Mem_Free(void* mem) {
|
|||||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
void Platform_Log(const char* msg, int len) {
|
void Platform_Log(const char* msg, int len) {
|
||||||
int ret;
|
TPtrC8 ptr((const TUint8*)msg, len);
|
||||||
/* Avoid "ignoring return value of 'write' declared with attribute 'warn_unused_result'" warning */
|
cc_string str;
|
||||||
ret = write(STDOUT_FILENO, msg, len);
|
|
||||||
ret = write(STDOUT_FILENO, "\n", 1);
|
str = String_Init(msg, len, len);
|
||||||
|
Logger_Log(&str);
|
||||||
|
str = String_FromReadonly("\r\n");
|
||||||
|
Logger_Log(&str);
|
||||||
|
|
||||||
|
RDebug::RawPrint(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeMS DateTime_CurrentUTC(void) {
|
TimeMS DateTime_CurrentUTC(void) {
|
||||||
@ -372,23 +378,17 @@ void Waitable_Free(void* handle) {
|
|||||||
|
|
||||||
void Waitable_Signal(void* handle) {
|
void Waitable_Signal(void* handle) {
|
||||||
RSemaphore* sem = (RSemaphore*)handle;
|
RSemaphore* sem = (RSemaphore*)handle;
|
||||||
|
|
||||||
sem->Signal();
|
sem->Signal();
|
||||||
delete sem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Waitable_Wait(void* handle) {
|
void Waitable_Wait(void* handle) {
|
||||||
RSemaphore* sem = (RSemaphore*)handle;
|
RSemaphore* sem = (RSemaphore*)handle;
|
||||||
|
|
||||||
sem->Wait();
|
sem->Wait();
|
||||||
delete sem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Waitable_WaitFor(void* handle, cc_uint32 milliseconds) {
|
void Waitable_WaitFor(void* handle, cc_uint32 milliseconds) {
|
||||||
RSemaphore* sem = (RSemaphore*)handle;
|
RSemaphore* sem = (RSemaphore*)handle;
|
||||||
|
|
||||||
sem->Wait(milliseconds * 1000);
|
sem->Wait(milliseconds * 1000);
|
||||||
delete sem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user