#!/bin/bash

. /etc/pm/functions

case "$(get_video_type)" in
        ATI)
		. /etc/pm/functions-ati
	;;
	nVidia)
		. /etc/pm/functions-nvidia
	;;
	Intel)
		. /etc/pm/functions-intel
	;;
esac

DO_RESUME=yes
if [ "x$PM_MODE" == "xhibernate" -a \
		"x$HIBERNATE_RESUME_POST_VIDEO" != "xyes" ]; then
	DO_RESUME=no
fi

case "$1" in
	suspend)
		suspend_video
		;;
	resume)
		if [ "$DO_RESUME" == "yes" ]; then
			resume_video
		fi
		;;
	*)
		;;
esac

exit $?
