Guest User

Untitled

a guest
Jan 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. static int animation_acceleration_write_proc(struct file *file, const char *buffer,
  2. unsigned long count, void *data)
  3. {
  4. char proto;
  5.  
  6. if (count < 1)
  7. return -EINVAL;
  8.  
  9. if (copy_from_user(&proto, buffer, 1))
  10. return -EFAULT;
  11.  
  12. if (proto == '0') {
  13. if (g_animation_acceleration) {
  14. gpinfo->lcd.vsync_enable = save_vsync_enable;
  15. gpinfo->lcd.hw_vsync_mode = save_hw_vsync_mode;
  16. g_animation_acceleration = 0;
  17. }
  18. } else {
  19. if (!g_animation_acceleration) {
  20. save_vsync_enable = gpinfo->lcd.vsync_enable;
  21. save_hw_vsync_mode = gpinfo->lcd.hw_vsync_mode;
  22. gpinfo->lcd.vsync_enable = FALSE;
  23. gpinfo->lcd.hw_vsync_mode = FALSE;
  24. g_animation_acceleration = 1;
  25. }
  26. }
  27.  
  28. return count;
  29. }
  30. #endif
Add Comment
Please, Sign In to add comment