It's also possible if you don't want to use views for whatever reason and don't allow resizing is display_set_size(). Also remember to uncheck color interpolation in global settings, otherwise scaling will be blurry.
Ah! Thank you, I was trying to figure out what was causing the blur!