maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   Palm Pre gets SDL! native gaming (https://talk.maemo.org/showthread.php?t=39809)

Airtux 2010-10-25 04:52

Re: Palm Pre gets SDL! native gaming
 
@maluka looks here: http://talk.maemo.org/showpost.php?p...1&postcount=77

maluka 2010-10-25 05:00

Re: Palm Pre gets SDL! native gaming
 
Quote:

Originally Posted by Airtux (Post 850066)

got it already thanks :)

Bundyo 2010-10-25 05:07

Re: Palm Pre gets SDL! native gaming
 
@javispedro: I have some additions, according to the SDK (All functions return Pre-related stuff).

Code:

--- PDL.h      2010-10-25 07:46:35.980774034 +0300
+++ PDL.h--    2010-10-25 07:51:22.065576828 +0300
@@ -49,14 +49,25 @@
        double aspectRatio;
 } PDL_ScreenMetrics;
 
+typedef struct {
+      int majorVersion;
+      int minorVersion;
+      int revision;
+      const char *versionStr;
+} PDL_OSVersion;
+
 PDL_Err PDL_BannerMessagesEnable(PDL_bool enable);
 PDL_Err PDL_CustomPauseUiEnable(PDL_bool enable);
 PDL_Err PDL_GetCallingPath(char *buffer, int bufferLen);
 PDL_Err PDL_GetDeviceName(char *buffer, int bufferLen);
+const char * PDL_GetError();
 PDL_Err PDL_GetLanguage(char *buffer, int bufferLen);
 PDL_Err PDL_GetNetInfo(const char *interfaceName, PDL_NetInfo * interfaceInfo);
 PDL_Err PDL_GetScreenMetrics(PDL_ScreenMetrics* metrics);
 PDL_Err PDL_GetUniqueID(char *buffer, int bufferLen);
+PDL_Err PDL_GetOSVersion(PDL_OSVersion *version);
+const char * PDL_GetHardware();
+int PDL_isAppLicensedForDevice(const char *appid);
 PDL_Err PDL_LaunchBrowser(const char* url);
 PDL_Err PDL_NotifyMusicPlaying(PDL_bool musicPlaying);
 PDL_Err PDL_ScreenTimeoutEnable(PDL_bool enable);

Code:

--- pdl.c      2010-10-25 07:46:35.980774034 +0300
+++ pdl.c--    2010-10-25 07:56:01.502404858 +0300
@@ -217,6 +217,12 @@
        return PDL_NOERROR;
 }
 
+const char * PDL_GetError()
+{
+      // Not implemented
+      return "Something happened!";
+}
+
 PDL_Err PDL_GetLanguage(char *buffer, int bufferLen)
 {
        if (!buffer || bufferLen <= 0) {
@@ -242,6 +248,16 @@
        return PDL_INVALIDINPUT;
 }
 
+const char * PDL_GetHardware()
+{
+      return "pre";
+}
+
+int PDL_isAppLicensedForDevice(const char *appid)
+{
+      return 1;
+}
+
 PDL_Err PDLNet_Get_Info(const char *interfaceName, PDL_NetInfo * interfaceInfo)
 {
        return PDL_GetNetInfo(interfaceName, interfaceInfo);
@@ -249,8 +265,21 @@
 
 PDL_Err PDL_GetScreenMetrics(PDL_ScreenMetrics* metrics)
 {
-      TRACE("Application asks for screen metrics; what to say here?");
-      return PDL_EOTHER;
+      metrics->horizontalPixels = 480;
+      metrics->verticalPixels = 800;
+      metrics->horizontalDPI = 213;
+      metrics->verticalDPI = 183;
+      metrics->aspectRatio = 1.164;
+      return PDL_NOERROR;
+}
+
+PDL_Err PDL_GetOSVersion(PDL_OSVersion *version)
+{
+      version->majorVersion = 1;
+      version->minorVersion = 4;
+      version->revision = 5;
+      version->versionStr = "Palm WebOS 1.4.5.1";
+      return PDL_NOERROR;
 }
 
 PDL_Err PDL_GetUniqueID(char *buffer, int bufferLen)

Also you wrote TODO in PDL_GetCallingPath, but according to the SDK docs it is deprecated and returns "./" every time. :)

anwar71839 2010-10-25 05:31

Re: Palm Pre gets SDL! native gaming
 
Someone please help me I am a 'extreme noob' when it comes to terminal. I am trying to launch nfsuc. It always given an error like can't cd path/path. I have been trying for over an hour.

Bratag 2010-10-25 07:01

Re: Palm Pre gets SDL! native gaming
 
Very cool Javis. Had some issues with undefined symbol SDL_memcmp. That should hopefully be an easy one to add a tag for.

Frappacino 2010-10-25 07:35

Re: Palm Pre gets SDL! native gaming
 
javispedro: do you have a paypal donation link ?

If not, please consider setting one up.

I realize you are not doing it for $$$, but in a way allows those of us to make it less tedious for you (and maybe help motivate you :) to fix more bugs.

I am sure many here wont mind chipping in some money for coke and pizza at least for you :)

osama 2010-10-25 08:20

Re: Palm Pre gets SDL! native gaming
 
Need For Speed Undercover

http://www.youtube.com/watch?v=JD98O0rVev0

longcat 2010-10-25 08:36

Re: Palm Pre gets SDL! native gaming
 
stupid question: i've installed preenv, but where to get those fancy games ?

Turkishflavor 2010-10-25 08:45

Re: Palm Pre gets SDL! native gaming
 
Quote:

Originally Posted by maluka (Post 850071)
got it already thanks :)

how did YOU solve the problem?!

PREENV is down! where can i get it now? :(

porselinaheart 2010-10-25 09:47

Re: Palm Pre gets SDL! native gaming
 
@zehjotkah, hi bro mind sharing how u overcame the 'segmentation fault' error when using SSH to transfer the game files??


All times are GMT. The time now is 09:59.

vBulletin® Version 3.8.8