Skip to content

Commit 76b4f22

Browse files
committed
[Nokia N-Gage] Remove redundant code after cleaning up the native Symbian API, this fixes several compiler warnings.
1 parent 7780006 commit 76b4f22

File tree

13 files changed

+25
-46
lines changed

13 files changed

+25
-46
lines changed

src/SDL.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_MICRO_VERSION_max, SDL_MICRO_VERSION <= 999);
9393
extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
9494
SDL_NORETURN void SDL_ExitProcess(int exitcode)
9595
{
96-
#if defined(SDL_PLATFORM_NGAGE)
97-
extern void NGAGE_ExitApp(int exitcode);
98-
NGAGE_ExitApp(exitcode);
99-
#elif defined(SDL_PLATFORM_WINDOWS)
96+
#if defined(SDL_PLATFORM_WINDOWS)
10097
/* "if you do not know the state of all threads in your process, it is
10198
better to call TerminateProcess than ExitProcess"
10299
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */

src/audio/ngage/SDL_ngageaudio.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ TInt CAudio::ProcessThreadCB(TAny* aPtr)
242242
{
243243
if (device)
244244
{
245-
SDL_PrivateAudioData* phdata = (SDL_PrivateAudioData*)device->hidden;
246245
SDL_PlaybackAudioThreadIterate(device);
247246
}
248247
else
@@ -355,7 +354,8 @@ TInt AudioThreadCB(TAny* aParams)
355354
while (gAudioRunning)
356355
{
357356
// Allow active scheduler to process any events.
358-
CActiveScheduler::RunIfReady(0, CActive::EPriorityIdle);
357+
TInt error;
358+
CActiveScheduler::RunIfReady(error, CActive::EPriorityIdle);
359359

360360
if (!once)
361361
{

src/core/ngage/SDL_ngage.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
*/
2121
#include "SDL_internal.h"
2222

23-
#ifdef NULL
24-
#undef NULL
25-
#endif
26-
2723
#include <e32std.h>
2824
#include <e32svr.h>
2925
#include <hal.h>
@@ -32,11 +28,6 @@
3228
extern "C" {
3329
#endif
3430

35-
void NGAGE_ExitApp(int exitcode)
36-
{
37-
User::Exit(exitcode);
38-
}
39-
4031
bool NGAGE_IsClassicModel()
4132
{
4233
int phone_id;

src/filesystem/ngage/SDL_sysfilesystem.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ extern "C" {
2828
}
2929
#endif
3030

31-
#ifdef NULL
32-
#undef NULL
33-
#endif
34-
3531
#include <e32base.h>
3632
#include <e32std.h>
3733
#include <f32file.h>

src/locale/ngage/SDL_syslocale.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
#include "SDL_internal.h"
2222
#include "../SDL_syslocale.h"
2323

24-
#ifdef NULL
25-
#undef NULL
26-
#endif
27-
2824
#include <e32std.h>
2925
#include <bautils.h>
3026
#include <e32base.h>

src/main/ngage/SDL_sysmain_main.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ extern "C" {
2828
}
2929
#endif
3030

31-
#ifdef NULL
32-
#undef NULL
33-
#endif
34-
3531
#include <e32std.h>
3632
#include <estlib.h>
3733
#include <stdlib.h>

src/render/ngage/SDL_render_ngage.c

+20
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,26 @@
2222

2323
#ifdef SDL_VIDEO_RENDER_NGAGE
2424

25+
#ifndef M_PI
26+
#define M_PI 3.14159265358979323846
27+
#endif
28+
29+
#ifndef Int2Fix
30+
#define Int2Fix(i) ((i)<<16)
31+
#endif
32+
33+
#ifndef Fix2Int
34+
#define Fix2Int(i) ((((unsigned int)(i)>0xFFFF0000)?0:((i)>>16)))
35+
#endif
36+
37+
#ifndef Fix2Real
38+
#define Fix2Real(i) ((i)/65536.0)
39+
#endif
40+
41+
#ifndef Real2Fix
42+
#define Real2Fix(i) ((int)((i)*65536.0))
43+
#endif
44+
2545
#include "SDL_render_ngage_c.h"
2646
#include "../SDL_sysrender.h"
2747

src/render/ngage/SDL_render_ngage_c.h

-6
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ extern "C" {
3131

3232
#include "../SDL_sysrender.h"
3333

34-
#define M_PI 3.14159265358979323846
35-
#define Int2Fix(i) ((i)<<16)
36-
#define Fix2Int(i) ((((unsigned int)(i)>0xFFFF0000)?0:((i)>>16)))
37-
#define Fix2Real(i) ((i)/65536.0)
38-
#define Real2Fix(i) ((int)((i)*65536.0))
39-
4034
typedef struct NGAGE_RendererData
4135
{
4236
SDL_Rect* viewport;

src/render/ngage/SDL_render_ngage_c.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CRenderer: public MDirectScreenAccess
3131
{
3232
public:
3333
static CRenderer* NewL();
34-
~CRenderer();
34+
virtual ~CRenderer();
3535

3636
// Rendering functions.
3737
void Clear(TUint32 iColor);

src/render/ngage/SDL_render_ops.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121
#include "SDL_internal.h"
2222

23+
#include <3dtypes.h>
2324
#include "SDL_render_ops.hpp"
2425

2526
void ApplyColorMod(void *dest, void *source, int pitch, int width, int height, SDL_FColor color)

src/time/ngage/SDL_systime.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
*/
2121
#include "SDL_internal.h"
2222

23-
#ifdef NULL
24-
#undef NULL
25-
#endif
26-
2723
#include <bautils.h>
2824
#include <e32base.h>
2925
#include <e32cons.h>

src/timer/ngage/SDL_systimer.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
*/
2121
#include "SDL_internal.h"
2222

23-
#ifdef NULL
24-
#undef NULL
25-
#endif
26-
2723
#include <e32std.h>
2824
#include <e32hal.h>
2925

src/video/ngage/SDL_ngagevideo.h

-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
#ifndef _SDL_ngagevideo_h
2828
#define _SDL_ngagevideo_h
2929

30-
#ifdef NULL
31-
#undef NULL
32-
#endif
33-
3430
typedef struct SDL_VideoData
3531
{
3632
SDL_DisplayMode mode;

0 commit comments

Comments
 (0)