×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    4

    Screen update behaves differently on s60v3 and symbian^3

    I've been maintaining a game engine based on pyS60 2.0.0 for a year, I use a function called update_screen() to manually update the screen in the game. But recently I find the code behaves differently on s60v3 and symbian^3 (s60v5 behaves the same as symbian^3).
    This is a test code I wrote:
    Code:
    import appuifw
    from graphics import *
    import e32
    
    def handle_redraw(rect):
        global final_img, canvas
        if final_img:
            canvas.blit(final_img)
    
    def update_screen():
        global final_img, canvas
        canvas.begin_redraw()
        handle_redraw(())
        canvas.end_redraw()
    
    final_img=None
    appuifw.app.screen='full'
    appuifw.app.directional_pad = False
    appuifw.app.body=canvas=appuifw.Canvas(redraw_callback=handle_redraw)
    if canvas.size[1]>canvas.size[0]:
        appuifw.app.orientation='landscape'
    final_img=Image.new(canvas.size)
    i=0
    while i<256:
        final_img.clear((i,i,i))
        update_screen()
        e32.ao_sleep(0.01)
        i+=1
    This code works fine on symbian^3 devices, but on s60v3 devices the screen will not show anything.
    If I change the update_screen() function to the following:
    Code:
    def update_screen():
        handle_redraw(())
    Then s60v3 devices works fine, but symbian^3 devices will display only after e32.ao_yield() is involked, and the framerate is sluggish.

    Any ideas? What code do you use to update the screen?
    Last edited by chen_xin_ming; 2012-07-19 at 22:20.

  2. #2
    Registered User
    Join Date
    Nov 2011
    Posts
    4

    Re: Screen update behaves differently on s60v3 and symbian^3

    I noticed this conflict too. But I simply put determine the S60 version info and define two methods for compatibility

  3. #3
    Registered User
    Join Date
    Jul 2012
    Posts
    4

    Re: Screen update behaves differently on s60v3 and symbian^3

    Well, this is a solution. But can we correctly classify these two behaviors by the S60 version? I mean, no false positive or false negative?
    Can you post the code you use to determine the render mode? Thanks!

Similar Threads

  1. will there be home screen widget for s60v3?
    By lizhengkun in forum Symbian Web Runtime
    Replies: 7
    Last Post: 2009-03-26, 14:06
  2. device and emulator behaves differently
    By hfoffani in forum Mobile Java General
    Replies: 5
    Last Post: 2006-08-10, 12:20
  3. WTK23 and Nokia 6630 behaves differently
    By unugurn in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2006-01-31, 09:20
  4. Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •