I was under the impression you had a 240x320 screen, But you have a 240x400 screen. So instead of subtracting 320, you need to subtract 400.
I was under the impression you had a 240x320 screen, But you have a 240x400 screen. So instead of subtracting 320, you need to subtract 400.